|
@@ -2,425 +2,414 @@
|
|
|
<section>
|
|
|
<!--工具条-->
|
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
|
- <el-form :inline="true">
|
|
|
- <el-form-item>
|
|
|
- <el-button type="text" @click="backToList" icon="el-icon-back" class="back">返回</el-button>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item class="divLine"></el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <span class="projectTitle">{{moldDetail.modelName}}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item class="state">
|
|
|
- 当前状态:
|
|
|
- <a style="color: #909399; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 0">静止</a>
|
|
|
- <a style="color: #00CD66; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 1">运行</a>
|
|
|
- <a style="color: #F56C6C; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 2">告警</a>
|
|
|
- <a style="color: #909399; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 3">待报废</a>
|
|
|
- <a style="color: #909399; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 4">已报废</a>
|
|
|
- <span class="tips">(点击查看运行状态)</span>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <el-form :inline="true">
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="text" @click="backToList" icon="el-icon-back" class="back">返回</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="divLine"></el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <span class="projectTitle">{{moldDetail.modelName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="state">
|
|
|
+ 当前状态:
|
|
|
+ <a style="color: #909399; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 0">静止</a>
|
|
|
+ <a style="color: #00CD66; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 1">运行</a>
|
|
|
+ <a style="color: #F56C6C; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 2">告警</a>
|
|
|
+ <a style="color: #909399; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 3">待报废</a>
|
|
|
+ <a style="color: #909399; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 4">已报废</a>
|
|
|
+ <span class="tips">(点击查看运行状态)</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
</el-col>
|
|
|
|
|
|
<!-- 主区域 -->
|
|
|
<el-col :span="24" :style="allDetail">
|
|
|
- <el-col :span="24" class="title">
|
|
|
- 模具基本信息
|
|
|
- <!-- <i class="el-icon-edit editDetail" v-if="user.id == moldDetail.managerId || user.id == moldDetail.creatorId" @click="edit"></i> -->
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="24" class="main">
|
|
|
- <el-col :span="6" class="detail">
|
|
|
- 模具编号:
|
|
|
- <span class="info">{{moldDetail.modelNo}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6" class="detail">
|
|
|
- 云模盒编号:
|
|
|
- <span class="info">{{moldDetail.equipmentNo}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6" class="detail">
|
|
|
- 设备电量:
|
|
|
- <span class="info">{{moldDetail.hillNumber}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6" class="detail">
|
|
|
- 倒计时:
|
|
|
- <span class="info">{{moldDetail.diffTime}}</span>
|
|
|
+ <el-col :span="24" class="title">
|
|
|
+ 模具基本信息
|
|
|
+ <!-- <i class="el-icon-edit editDetail" v-if="user.id == moldDetail.managerId || user.id == moldDetail.creatorId" @click="edit"></i> -->
|
|
|
</el-col>
|
|
|
- <el-col :span="6" class="detail">
|
|
|
- 初始模次:
|
|
|
- <span class="info">{{moldDetail.initialModulus}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6" class="detail">
|
|
|
- 模次寿命:
|
|
|
- <span class="info">{{moldDetail.settingLife}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6" class="detail">
|
|
|
- 对应RFID码:
|
|
|
- <span class="info">{{moldDetail.rfid}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6" class="detail">
|
|
|
- 穴数:
|
|
|
- <span class="info">{{moldDetail.holes}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12" class="detail">
|
|
|
- 所属项目:
|
|
|
- <span class="info belongPro" @click="toPro(moldDetail.projectId)">{{moldDetail.projectName}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="detail">
|
|
|
- 生产方:
|
|
|
- <!-- <span class="info" v-for="(item, index) in customCompany">
|
|
|
- {{item.companyName}}
|
|
|
- <span v-if="index != customCompany.length-1">、</span>
|
|
|
- </span> -->
|
|
|
- <span class="info">{{moldDetail.produceCompany}}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="detail">
|
|
|
- 生产方地址:
|
|
|
- <!-- <span class="info" v-for="(item, index) in customCompany">
|
|
|
- {{item.companyName}}
|
|
|
- <span v-if="index != customCompany.length-1">、</span>
|
|
|
- </span> -->
|
|
|
- <span class="info">{{moldDetail.area}}</span>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
|
|
|
- <el-col :span="24" class="title">
|
|
|
- 文档资料
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
+ 模具编号:
|
|
|
+ <span class="info">{{moldDetail.modelNo}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
+ 云模盒编号:
|
|
|
+ <span class="info">{{moldDetail.equipmentNo}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
+ 设备电量:
|
|
|
+ <span class="info">{{moldDetail.hillNumber}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
+ 倒计时:
|
|
|
+ <span class="info">{{moldDetail.diffTime}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
+ 初始模次:
|
|
|
+ <span class="info">{{moldDetail.initialModulus}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
+ 模次寿命:
|
|
|
+ <span class="info">{{moldDetail.settingLife}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
+ 对应RFID码:
|
|
|
+ <span class="info">{{moldDetail.rfid}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
+ 穴数:
|
|
|
+ <span class="info">{{moldDetail.holes}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="detail">
|
|
|
+ 所属项目:
|
|
|
+ <span class="info belongPro" @click="toPro(moldDetail.projectId)">{{moldDetail.projectName}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="detail">
|
|
|
+ 生产方:
|
|
|
+ <span class="info">{{moldDetail.produceCompany}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="detail">
|
|
|
+ 生产方地址:
|
|
|
+ <span class="info">{{moldDetail.area}}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
|
|
|
- <!-- 上传 模具0 时 -->
|
|
|
- <el-dropdown trigger="click" style="float: right;" v-show="activeTab == 0 && update == 1">
|
|
|
- <el-button size="mini" type="primary" :loading="uploading">
|
|
|
+ <el-col :span="24" class="title">
|
|
|
+ 文档资料
|
|
|
+
|
|
|
+ <!-- 上传 模具0 时 -->
|
|
|
+ <el-dropdown trigger="click" style="float: right;" v-show="activeTab == 0 && update == 1">
|
|
|
+ <el-button size="mini" type="primary" :loading="uploading">
|
|
|
+ 上传
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-upload ref="upload" action="customize" :http-request="uploadFile" :show-file-list="false" multiple :limit="5" style="float:right;">
|
|
|
+ <el-dropdown-item @click.native="fileType = 0">2D图档</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="fileType = 1">3D图档</el-dropdown-item>
|
|
|
+ </el-upload>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
+ <!-- 上传 零件1 时 -->
|
|
|
+ <el-button size="mini" type="primary" style="float:right;" v-show="activeTab == 1 && update == 1" @click.native="fileType = 0;centerDialog4Visible = true;">
|
|
|
上传
|
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-upload ref="upload" action="customize" :http-request="uploadFile" :show-file-list="false" multiple :limit="5" style="float:right;">
|
|
|
- <el-dropdown-item @click.native="fileType = 0">2D图档</el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="fileType = 1">3D图档</el-dropdown-item>
|
|
|
- </el-upload>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
-
|
|
|
- <!-- 上传 零件1 时 -->
|
|
|
- <el-button size="mini" type="primary" style="float:right;" v-show="activeTab == 1 && update == 1" @click.native="fileType = 0;centerDialog4Visible = true;">
|
|
|
- 上传
|
|
|
- </el-button>
|
|
|
-
|
|
|
- <!-- 零件1 新建零件 -->
|
|
|
- <el-dropdown trigger="click" style="float: right; margin-right: 10px;" v-show=" activeTab == 1 && update == 1">
|
|
|
- <el-button size="mini" type="primary">
|
|
|
- 新建零件
|
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
- </el-button>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item @click.native="centerDialog3Visible = true">单个新建</el-dropdown-item>
|
|
|
- <el-dropdown-item>
|
|
|
- <a class="download" href="/upload/零件信息导入模板示例.xlsx" download="零件信息导入模板示例.xlsx">
|
|
|
- 下载模板
|
|
|
- </a>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item>
|
|
|
- <el-upload ref="upload" action="customize" :http-request="uploadPart" :show-file-list="false" :limit="1">
|
|
|
- 批量导入
|
|
|
- </el-upload>
|
|
|
- </el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
-
|
|
|
- <!-- 上传 试模2 保养3 时 -->
|
|
|
- <el-upload ref="upload"
|
|
|
- v-show="(activeTab == 2 || activeTab == 3) && update == 1"
|
|
|
- action="customize"
|
|
|
- :http-request="uploadFile"
|
|
|
- :show-file-list="false"
|
|
|
- multiple
|
|
|
- :limit="5"
|
|
|
- style="float:right;"
|
|
|
- >
|
|
|
- <el-button size="mini" type="primary" :loading="uploading">上传</el-button>
|
|
|
- </el-upload>
|
|
|
|
|
|
- <!-- 更新4 -->
|
|
|
- <el-button
|
|
|
- v-show="activeTab == 4 && user.id == moldDetail.managerId && canInitiate && updateAble"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- style="float: right;"
|
|
|
- @click="updateRequest"
|
|
|
- >申请</el-button>
|
|
|
-
|
|
|
- <!-- 上传 报废5 时 -->
|
|
|
- <el-button
|
|
|
- v-show="activeTab == 5 && update == 1 && abandonAble && moldDetail.managerId == user.id"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- style="float: right;"
|
|
|
- @click="centerDialog2Visible = true;"
|
|
|
- >上传</el-button>
|
|
|
- </el-col>
|
|
|
+ <!-- 零件1 新建零件 -->
|
|
|
+ <el-dropdown trigger="click" style="float: right; margin-right: 10px;" v-show=" activeTab == 1 && update == 1">
|
|
|
+ <el-button size="mini" type="primary">
|
|
|
+ 新建零件
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item @click.native="centerDialog3Visible = true">单个新建</el-dropdown-item>
|
|
|
+ <el-dropdown-item>
|
|
|
+ <a class="download" href="/upload/零件信息导入模板示例.xlsx" download="零件信息导入模板示例.xlsx">
|
|
|
+ 下载模板
|
|
|
+ </a>
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-upload ref="upload" action="customize" :http-request="uploadPart" :show-file-list="false" :limit="1">
|
|
|
+ 批量导入
|
|
|
+ </el-upload>
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
+ <!-- 上传 试模2 保养3 时 -->
|
|
|
+ <el-upload ref="upload" v-show="(activeTab == 2 || activeTab == 3) && update == 1" action="customize" :http-request="uploadFile" :show-file-list="false" multiple :limit="5" style="float:right;">
|
|
|
+ <el-button size="mini" type="primary" :loading="uploading">上传</el-button>
|
|
|
+ </el-upload>
|
|
|
|
|
|
- <!-- 文档列表部分 -->
|
|
|
- <el-col :span="24">
|
|
|
- <el-tabs v-model="activePage" @tab-click="handleClick">
|
|
|
- <!-- 模具文档 -->
|
|
|
- <el-tab-pane label="模具文档" name="0">
|
|
|
- <el-table
|
|
|
- :data="documents.mould"
|
|
|
- highlight-current-row
|
|
|
- v-loading="listLoading"
|
|
|
- style="width: 100%;"
|
|
|
- >
|
|
|
- <el-table-column type="index" width="40"></el-table-column>
|
|
|
- <el-table-column prop="fileName" label="名称" sortable></el-table-column>
|
|
|
- <el-table-column prop="fileSize" label="大小" width="200" align="center" sortable></el-table-column>
|
|
|
- <el-table-column prop="uploadtor" label="上传者" width="200" align="center" sortable></el-table-column>
|
|
|
- <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
- <el-table-column label="状态" width="120" align="center" sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <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)">审批</el-button>
|
|
|
- <a :href="scope.row.fileUrl" :download="scope.row.fileName" v-if="download == 1 && scope.row.state == 3">
|
|
|
- <el-button size="small" @click="dowloadfile(scope.row.id)">下载</el-button>
|
|
|
- </a>
|
|
|
- <el-button size="small"
|
|
|
- v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)"
|
|
|
- @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
-
|
|
|
- <!-- 零件文档 -->
|
|
|
- <el-tab-pane label="零件文档" name="1">
|
|
|
- <el-table
|
|
|
- :data="documents.part"
|
|
|
- highlight-current-row
|
|
|
- v-loading="listLoading"
|
|
|
- style="width: 100%;"
|
|
|
- >
|
|
|
- <el-table-column type="index" width="40"></el-table-column>
|
|
|
- <el-table-column prop="partNo" label="零件编号" width="150" sortable></el-table-column>
|
|
|
- <el-table-column prop="partName" label="零件名称" sortable></el-table-column>
|
|
|
- <el-table-column prop="partLife" label="寿命次数" align="center" width="100" sortable></el-table-column>
|
|
|
- <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>
|
|
|
- <template slot-scope="scope" v-if="scope.row.part3dFile != null">
|
|
|
- <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 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>
|
|
|
- <el-table-column label="状态" width="120" align="center" sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <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="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 ">
|
|
|
- <a :href="scope.row.fileUrl" :download="scope.row.fileName">下载 </a>
|
|
|
- </el-button> -->
|
|
|
- <el-button size="small"
|
|
|
- v-if="scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0"
|
|
|
- @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
-
|
|
|
- <!-- 试模及验收 -->
|
|
|
- <el-tab-pane label="试模及验收" name="2">
|
|
|
- <el-table
|
|
|
- :data="documents.check"
|
|
|
- highlight-current-row
|
|
|
- v-loading="listLoading"
|
|
|
- style="width: 100%;"
|
|
|
- >
|
|
|
- <el-table-column type="index" width="40"></el-table-column>
|
|
|
- <el-table-column prop="fileName" label="名称" sortable></el-table-column>
|
|
|
- <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
- <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
- <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
- <el-table-column label="状态" width="120" sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <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" 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)">审批</el-button>
|
|
|
- <a :href="scope.row.fileUrl" :download="scope.row.fileName" v-if="download == 1 && scope.row.state == 3">
|
|
|
- <el-button size="small" @click="dowloadfile(scope.row.id)">下载</el-button>
|
|
|
- </a>
|
|
|
- <el-button size="small"
|
|
|
- v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)"
|
|
|
- @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
-
|
|
|
- <!-- 保养方案 -->
|
|
|
- <el-tab-pane label="保养方案" name="3">
|
|
|
- <el-table
|
|
|
- :data="documents.maintain"
|
|
|
- highlight-current-row
|
|
|
- v-loading="listLoading"
|
|
|
- style="width: 100%;"
|
|
|
- >
|
|
|
- <el-table-column type="index" width="40"></el-table-column>
|
|
|
- <el-table-column prop="fileName" label="名称" sortable></el-table-column>
|
|
|
- <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
- <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
- <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
- <el-table-column label="状态" width="120" sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <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" 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)">审批</el-button>
|
|
|
- <a :href="scope.row.fileUrl" :download="scope.row.fileName" v-if="download == 1 && scope.row.state == 3">
|
|
|
- <el-button size="small" @click="dowloadfile(scope.row.id)">下载</el-button>
|
|
|
- </a>
|
|
|
- <el-button size="small"
|
|
|
- v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)"
|
|
|
- @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
-
|
|
|
- <!-- 模具更新 -->
|
|
|
- <el-tab-pane label="模具更新" name="4">
|
|
|
- <el-table :data="documents.update" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
- <el-table-column type="index" width="40"></el-table-column>
|
|
|
- <el-table-column prop="uploadtor" label="申请人" sortable></el-table-column>
|
|
|
- <el-table-column prop="indate" label="申请时间" width="200" sortable></el-table-column>
|
|
|
- <el-table-column label="状态" width="120" sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <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" sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button size="small" @click="checkUpdate(scope.row.id, true)" type="primary"
|
|
|
- v-if="approve == 1 && (scope.row.state == 0 || (scope.row.state == 1 && user.subordinateType == 1) || (scope.row.state == 2 && user.subordinateType == 0))"
|
|
|
- >通过</el-button>
|
|
|
- <el-button size="small" @click="checkUpdate(scope.row.id, false)" type="danger"
|
|
|
- v-if="approve == 1 && (scope.row.state == 0 || (scope.row.state == 1 && user.subordinateType == 1) || (scope.row.state == 2 && user.subordinateType == 0))"
|
|
|
- >不通过</el-button>
|
|
|
- <el-button size="small" @click="showAdd(scope.row.id)" type="primary"
|
|
|
- v-if="scope.row.uplodtorId == user.id && scope.row.state == 3 && moldDetail.equipmentNo != null">更新模具</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
-
|
|
|
- <!-- 模具报废 -->
|
|
|
- <el-tab-pane label="模具报废" name="5">
|
|
|
- <el-table :data="documents.abandon" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
- <el-table-column type="index" width="40"></el-table-column>
|
|
|
- <el-table-column prop="fileName" label="申请单名称" sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.fileUrl != null">
|
|
|
- <a style="color:#20a0ff" v-if="download == 1 && scope.row.state == 3" :href="scope.row.fileUrl" :download="scope.row.fileName" @click="dowloadfile(scope.row.id)">
|
|
|
- {{scope.row.fileName}}
|
|
|
+ <!-- 更新4 -->
|
|
|
+ <el-button v-show="activeTab == 4 && user.id == moldDetail.managerId && canInitiate && updateAble" size="mini" type="primary" style="float: right;" @click="updateRequest">
|
|
|
+ 申请
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <!-- 上传 报废5 时 -->
|
|
|
+ <el-button v-show="activeTab == 5 && update == 1 && abandonAble && moldDetail.managerId == user.id" size="mini" type="primary" style="float: right;" @click="centerDialog2Visible = true;">
|
|
|
+ 上传
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <!-- 文档列表部分 -->
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-tabs v-model="activePage" @tab-click="handleClick">
|
|
|
+ <!-- 模具文档 -->
|
|
|
+ <el-tab-pane label="模具文档" name="0">
|
|
|
+ <el-table :data="documents.mould" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
+ <el-table-column label="名称" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link v-if="view == 1" type="primary" @click="viewFile(scope.row)">{{scope.row.fileName}}</el-link>
|
|
|
+ <span v-else>{{scope.row.fileName}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="fileSize" label="大小" width="200" align="center" sortable></el-table-column>
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="200" align="center" sortable></el-table-column>
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column label="状态" width="120" align="center" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <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" @click="checkOpen(scope.row)"
|
|
|
+ v-if="approve == 1 && (scope.row.state == 0 || (scope.row.state == 1 && user.subordinateType == 1) || (scope.row.state == 2 && user.subordinateType == 0))">审批</el-button>
|
|
|
+ <a :href="scope.row.fileUrl" :download="scope.row.fileName" v-if="download == 1 && scope.row.state == 3">
|
|
|
+ <el-button size="small" @click="dowloadfile(scope.row.id)">下载</el-button>
|
|
|
</a>
|
|
|
- </div>
|
|
|
- <span v-else>{{scope.row.fileName}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="fileSize" label="申请单大小" width="130" sortable></el-table-column>
|
|
|
- <el-table-column prop="fileName2" label="报废单名称" sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.fileUrl != null">
|
|
|
- <a style="color:#20a0ff" v-if="download == 1 && scope.row.state == 3" :href="scope.row.fileUrl2" :download="scope.row.fileName2" @click="dowloadfile(scope.row.id)">
|
|
|
- {{scope.row.fileName2}}
|
|
|
+ <el-button size="small"
|
|
|
+ v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)"
|
|
|
+ @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <!-- 零件文档 -->
|
|
|
+ <el-tab-pane label="零件文档" name="1">
|
|
|
+ <el-table :data="documents.part" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
+ <el-table-column prop="partNo" label="零件编号" width="150" sortable></el-table-column>
|
|
|
+ <el-table-column prop="partName" label="零件名称" sortable></el-table-column>
|
|
|
+ <el-table-column prop="partLife" label="寿命次数" align="center" width="100" sortable></el-table-column>
|
|
|
+ <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>
|
|
|
+ <template slot-scope="scope" v-if="scope.row.part3dFile != null">
|
|
|
+ <!-- <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> -->
|
|
|
+ <el-link v-if="view == 1" type="primary" @click="viewFile(scope.row)">{{scope.row.part3dFile.fileName}}</el-link>
|
|
|
+ <span v-else>{{scope.row.part3dFile.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 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> -->
|
|
|
+ <el-link v-if="view == 1" type="primary" @click="viewFile(scope.row)">{{scope.row.part2dFile.fileName}}</el-link>
|
|
|
+ <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>
|
|
|
+ <el-table-column label="状态" width="120" align="center" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <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="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,1,scope.row)" v-if="download == 1 && scope.row.state == 3 ">
|
|
|
+ <!-- <a :href="scope.row.fileUrl" :download="scope.row.fileName">下载 </a> -->
|
|
|
+ 下载
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ v-if="scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0"
|
|
|
+ @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <!-- 试模及验收 -->
|
|
|
+ <el-tab-pane label="试模及验收" name="2">
|
|
|
+ <el-table :data="documents.check" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
+ <el-table-column label="名称" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link v-if="view == 1" type="primary" @click="viewFile(scope.row)">{{scope.row.fileName}}</el-link>
|
|
|
+ <span v-else>{{scope.row.fileName}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column label="状态" width="120" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <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" 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)">审批</el-button>
|
|
|
+ <a :href="scope.row.fileUrl" :download="scope.row.fileName" v-if="download == 1 && scope.row.state == 3">
|
|
|
+ <el-button size="small" @click="dowloadfile(scope.row.id)">下载</el-button>
|
|
|
</a>
|
|
|
- </div>
|
|
|
- <span v-else>{{scope.row.fileName2}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="fileSize2" label="报废单大小" width="130" sortable></el-table-column>
|
|
|
- <el-table-column prop="uploadtor" label="上传者" width="150" sortable></el-table-column>
|
|
|
- <el-table-column prop="indate" label="上传时间" width="180" sortable></el-table-column>
|
|
|
- <el-table-column label="状态" width="120" sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
+ <el-button size="small"
|
|
|
+ v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)"
|
|
|
+ @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <!-- 保养方案 -->
|
|
|
+ <el-tab-pane label="保养方案" name="3">
|
|
|
+ <el-table :data="documents.maintain" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
+ <el-table-column label="名称" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link v-if="view == 1" type="primary" @click="viewFile(scope.row)">{{scope.row.fileName}}</el-link>
|
|
|
+ <span v-else>{{scope.row.fileName}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column label="状态" width="120" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
<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" 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)">审批</el-button>
|
|
|
- <el-button size="small"
|
|
|
- v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)"
|
|
|
- @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </el-col>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="200" 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)">审批</el-button>
|
|
|
+ <a :href="scope.row.fileUrl" :download="scope.row.fileName" v-if="download == 1 && scope.row.state == 3">
|
|
|
+ <el-button size="small" @click="dowloadfile(scope.row.id)">下载</el-button>
|
|
|
+ </a>
|
|
|
+ <el-button size="small"
|
|
|
+ v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)"
|
|
|
+ @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <!-- 模具更新 -->
|
|
|
+ <el-tab-pane label="模具更新" name="4">
|
|
|
+ <el-table :data="documents.update" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
+ <el-table-column prop="uploadtor" label="申请人" sortable></el-table-column>
|
|
|
+ <el-table-column prop="indate" label="申请时间" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column label="状态" width="120" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <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" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="small" @click="checkUpdate(scope.row.id, true)" type="primary"
|
|
|
+ v-if="approve == 1 && (scope.row.state == 0 || (scope.row.state == 1 && user.subordinateType == 1) || (scope.row.state == 2 && user.subordinateType == 0))"
|
|
|
+ >通过</el-button>
|
|
|
+ <el-button size="small" @click="checkUpdate(scope.row.id, false)" type="danger"
|
|
|
+ v-if="approve == 1 && (scope.row.state == 0 || (scope.row.state == 1 && user.subordinateType == 1) || (scope.row.state == 2 && user.subordinateType == 0))"
|
|
|
+ >不通过</el-button>
|
|
|
+ <el-button size="small" @click="showAdd(scope.row.id)" type="primary"
|
|
|
+ v-if="scope.row.uplodtorId == user.id && scope.row.state == 3 && moldDetail.equipmentNo != null">更新模具</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <!-- 模具报废 -->
|
|
|
+ <el-tab-pane label="模具报废" name="5">
|
|
|
+ <el-table :data="documents.abandon" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
+ <el-table-column prop="fileName" label="申请单名称" sortable>
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.fileUrl != null">
|
|
|
+ <a style="color:#20a0ff" v-if="download == 1 && scope.row.state == 3" :href="scope.row.fileUrl" :download="scope.row.fileName" @click="dowloadfile(scope.row.id)">
|
|
|
+ {{scope.row.fileName}}
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <span v-else>{{scope.row.fileName}}</span>
|
|
|
+ </template> -->
|
|
|
+ <template slot-scope="scope" v-if="scope.row.fileUrl != null">
|
|
|
+ <el-link v-if="view == 1" type="primary" @click="viewFile(scope.row,0)">{{scope.row.fileName}}</el-link>
|
|
|
+ <span v-else>{{scope.row.fileName}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="fileSize" label="申请单大小" width="130" sortable></el-table-column>
|
|
|
+ <el-table-column prop="fileName2" label="报废单名称" sortable>
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.fileUrl != null">
|
|
|
+ <a style="color:#20a0ff" v-if="download == 1 && scope.row.state == 3" :href="scope.row.fileUrl2" :download="scope.row.fileName2" @click="dowloadfile(scope.row.id)">
|
|
|
+ {{scope.row.fileName2}}
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <span v-else>{{scope.row.fileName2}}</span>
|
|
|
+ </template> -->
|
|
|
+ <template slot-scope="scope" v-if="scope.row.fileUrl2 != null">
|
|
|
+ <el-link v-if="view == 1" type="primary" @click="viewFile(scope.row,1)">{{scope.row.fileName2}}</el-link>
|
|
|
+ <span v-else>{{scope.row.fileName2}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="fileSize2" label="报废单大小" width="130" sortable></el-table-column>
|
|
|
+ <el-table-column prop="uploadtor" label="上传者" width="150" sortable></el-table-column>
|
|
|
+ <el-table-column prop="indate" label="上传时间" width="180" sortable></el-table-column>
|
|
|
+ <el-table-column label="状态" width="120" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <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" 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)">审批</el-button>
|
|
|
+ <el-button size="small" @click="dowloadfile(scope.row.id,5,scope.row)" v-if="download == 1 && scope.row.state == 3 ">
|
|
|
+ <!-- <a :href="scope.row.fileUrl" :download="scope.row.fileName">下载 </a> -->
|
|
|
+ 下载
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)"
|
|
|
+ @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </el-col>
|
|
|
|
|
|
<!-- 操作记录 -->
|
|
|
<el-col :span="24" class="title">
|
|
@@ -1143,19 +1132,31 @@
|
|
|
},
|
|
|
|
|
|
//文件下载
|
|
|
- dowloadfile(id) {
|
|
|
- this.http.post( this.port.mold.moldFileDowload, {
|
|
|
- id: id
|
|
|
- },
|
|
|
+ dowloadfile(id,type,all) {
|
|
|
+ var data = {};
|
|
|
+ if(type == 1) {
|
|
|
+ data.partId = id;
|
|
|
+ } else {
|
|
|
+ data.id = id;
|
|
|
+ }
|
|
|
+ this.http.post( this.port.mold.moldFileDowload, data,
|
|
|
res => {
|
|
|
- // const elink = document.createElement('a')
|
|
|
- // elink.download = row.fileName
|
|
|
- // elink.style.display = 'none'
|
|
|
- // const blob = new Blob([res])
|
|
|
- // elink.href = URL.createObjectURL(blob)
|
|
|
- // document.body.appendChild(elink)
|
|
|
- // elink.click()
|
|
|
- // document.body.removeChild(elink)
|
|
|
+ if(type == 1) {
|
|
|
+ if(all.part2dFile != null) {
|
|
|
+ this.downloadByA(all.part2dFile.fileUrl,all.part2dFile.fileName)
|
|
|
+ }
|
|
|
+ if(all.part3dFile != null) {
|
|
|
+ this.downloadByA(all.part3dFile.fileUrl,all.part3dFile.fileName)
|
|
|
+ }
|
|
|
+ } else if(type == 5) {
|
|
|
+ if(all.fileUrl != null) {
|
|
|
+ this.downloadByA(all.fileUrl,all.fileName)
|
|
|
+ }
|
|
|
+
|
|
|
+ if(all.fileUrl2 != null) {
|
|
|
+ this.downloadByA(all.fileUrl2,all.fileName2)
|
|
|
+ }
|
|
|
+ }
|
|
|
this.getOperationRecord(this.activePage);
|
|
|
},
|
|
|
error => {
|
|
@@ -1634,6 +1635,54 @@
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ },
|
|
|
+
|
|
|
+ // 在线预览
|
|
|
+ viewFile(row,type) {
|
|
|
+ var data = {
|
|
|
+ fileId: row.id,
|
|
|
+ type: 0
|
|
|
+ };
|
|
|
+ if(this.activeTab == 5) {
|
|
|
+ if(type == 0) {
|
|
|
+ data.sourceFileUrl = row.fileUrl;
|
|
|
+ } else {
|
|
|
+ data.sourceFileUrl = row.fileUrl2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.http.post(this.port.file.view, data,
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.openWin(res.data);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ openWin(url) {
|
|
|
+ var el = document.createElement("a");
|
|
|
+ document.body.appendChild(el);
|
|
|
+ el.href = encodeURI(url);
|
|
|
+ el.target = '_blank';
|
|
|
+ el.click();
|
|
|
+ document.body.removeChild(el);
|
|
|
+ },
|
|
|
+
|
|
|
+ downloadByA(url,name) {
|
|
|
+ const a = document.createElement('a'); // 创建a标签
|
|
|
+ a.setAttribute('download', name);// download属性
|
|
|
+ a.setAttribute('href', url);// href链接
|
|
|
+ a.click();// 自执行点击事件
|
|
|
+ a.remove();
|
|
|
}
|
|
|
},
|
|
|
created() {
|