|
@@ -61,7 +61,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12" class="detail">
|
|
|
所属项目:
|
|
|
- <span class="info">{{moldDetail.projectName}}</span>
|
|
|
+ <span class="info belongPro" @click="toPro(moldDetail.projectId)">{{moldDetail.projectName}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="detail">
|
|
|
生产方:
|
|
@@ -84,9 +84,9 @@
|
|
|
<el-col :span="24" class="title">
|
|
|
文档资料
|
|
|
|
|
|
- <!-- 上传 模具0 零件1 时 -->
|
|
|
- <el-dropdown trigger="click" style="float:right;" v-show="activeTab == 0 && update == 1">
|
|
|
- <el-button size="small" type="primary">
|
|
|
+ <!-- 上传 模具0 时 -->
|
|
|
+ <el-dropdown trigger="click" style="float: right;" v-show="activeTab == 0 && update == 1">
|
|
|
+ <el-button size="small" type="primary" :loading="uploading[0]">
|
|
|
上传
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
@@ -98,13 +98,13 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
|
|
|
- <!-- 上传 模具0 零件1 时 -->
|
|
|
+ <!-- 上传 零件1 时 -->
|
|
|
<el-button size="small" 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-dropdown trigger="click" style="float: right; margin-right: 10px;" v-show=" activeTab == 1 && update == 1">
|
|
|
<el-button size="small" type="primary">
|
|
|
新建零件
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
@@ -124,7 +124,7 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
|
|
|
- <!-- 上传 试模2 保养3 更新4 时 -->
|
|
|
+ <!-- 上传 试模2 保养3 时 -->
|
|
|
<el-upload ref="upload"
|
|
|
v-show="(activeTab == 2 || activeTab == 3 || activeTab == 4) && update == 1"
|
|
|
action="customize"
|
|
@@ -134,19 +134,29 @@
|
|
|
:limit="5"
|
|
|
style="float:right;"
|
|
|
>
|
|
|
- <el-button size="small" type="primary">上传</el-button>
|
|
|
+ <el-button size="small" type="primary" :loading="uploading[1]">上传</el-button>
|
|
|
</el-upload>
|
|
|
|
|
|
+ <!-- 更新4 --><!-- 目前还没加入权限 -->
|
|
|
+ <el-button
|
|
|
+ v-show="activeTab == 4"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ style="float: right;"
|
|
|
+ @click="updateRequest"
|
|
|
+ >申请</el-button>
|
|
|
+
|
|
|
<!-- 上传 报废5 时 -->
|
|
|
<el-button
|
|
|
v-show="activeTab == 5 && update == 1"
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
- style="float:right;"
|
|
|
+ style="float: right;"
|
|
|
@click="centerDialog2Visible = true;"
|
|
|
>上传</el-button>
|
|
|
</el-col>
|
|
|
|
|
|
+ <!-- 文档列表部分 -->
|
|
|
<el-col :span="24">
|
|
|
<el-tabs v-model="activePage" @tab-click="handleClick">
|
|
|
<!-- 模具文档 -->
|
|
@@ -329,31 +339,13 @@
|
|
|
<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="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="申请人" sortable></el-table-column>
|
|
|
+ <el-table-column label="申请时间" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column label="状态" width="120" sortable></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.id, scope.row.fileName)">审批</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"
|
|
|
- @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
+ <el-button size="small" @click="updateApproval(scope.row.id, true)" type="primary">通过</el-button>
|
|
|
+ <el-button size="small" @click="updateApproval(scope.row.id, false)">拒绝</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -396,7 +388,10 @@
|
|
|
</el-col>
|
|
|
|
|
|
<!-- 操作记录 -->
|
|
|
- <el-col :span="24" class="title">操作记录</el-col>
|
|
|
+ <el-col :span="24" class="title">
|
|
|
+ 操作记录
|
|
|
+ <el-button size="small" type="primary" style="float: right;" @click="centerDialog5Visible = true">导出</el-button>
|
|
|
+ </el-col>
|
|
|
<el-table :data="operations" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
<el-table-column type="index" width="40"></el-table-column>
|
|
|
<el-table-column prop="content" label="操作" width="120" sortable></el-table-column>
|
|
@@ -426,21 +421,31 @@
|
|
|
<el-button size="small" type="primary">上传</el-button>
|
|
|
</el-upload>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="confirmUpload">确定</el-button>
|
|
|
+ <el-button @click="confirmUpload" :loading="uploading[3]">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 零件文档上传弹窗 -->
|
|
|
- <el-dialog title="零件文档上传" v-if="centerDialog4Visible" :visible.sync="centerDialog4Visible" width="100" :before-close="clearFileRecord" center>
|
|
|
+ <el-dialog title="零件文档上传" v-if="centerDialog4Visible" :visible.sync="centerDialog4Visible" width="100" :before-close="clearFileRecord2" center>
|
|
|
<p style="color:#ccc;">文件命名规则:零件编号+2D/3D 如 LJ001+2D.dwg</p>
|
|
|
<el-upload ref="upload4" action="uploadFile" :http-request="uploadPartFile" :show-file-list="true" :before-remove="beforeRemove" multiple>
|
|
|
- <el-button size="small" type="primary">上传</el-button>
|
|
|
+ <el-button size="small" type="primary" :loading="uploading[2]">上传</el-button>
|
|
|
</el-upload>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="uploadFilePart">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 批量导出操作记录弹窗 -->
|
|
|
+ <el-dialog title="批量导出操作记录" v-if="centerDialog5Visible" :visible.sync="centerDialog5Visible" width="50" center>
|
|
|
+ <span style="line-height: 40px;">请输入需要导出的时间段</span>
|
|
|
+ <el-date-picker v-model="recordTime" type="datetimerange" placeholder="选择日期时间" style="float: right;"></el-date-picker>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="centerDialog5Visible = false">取消</el-button>
|
|
|
+ <el-button @click="exportRecords">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!-- 单个新增零件弹窗 -->
|
|
|
<el-dialog title="新增零件" v-if="centerDialog3Visible" :visible.sync="centerDialog3Visible" :close-on-click-modal="false" customClass="customWidth">
|
|
|
<el-form :model="newParts" label-width="100px" :rules="formRules" ref="newParts" :inline="true" class="demo-form-inline">
|
|
@@ -531,13 +536,15 @@
|
|
|
moldDetail: {},
|
|
|
customCompany: [],
|
|
|
boxes: [],
|
|
|
+ //操作记录的时间
|
|
|
+ recordTime: "",
|
|
|
//单独新增零件时所需的三个变量
|
|
|
newParts: {
|
|
|
number: "",
|
|
|
name: "",
|
|
|
life: ""
|
|
|
},
|
|
|
-
|
|
|
+ uploading:[false, false, false, false],
|
|
|
editParts: {
|
|
|
id: 0,
|
|
|
number: "",
|
|
@@ -599,6 +606,7 @@
|
|
|
centerDialog2Visible: false, //模具界面
|
|
|
centerDialog3Visible: false, //创建零件界面
|
|
|
centerDialog4Visible: false, //零件文档上传界面
|
|
|
+ centerDialog5Visible: false, //批量导出操作界面
|
|
|
editPortVisible: false,//编辑零件界面
|
|
|
|
|
|
listLoading: false,
|
|
@@ -638,6 +646,10 @@
|
|
|
this.$router.push("/detection");
|
|
|
},
|
|
|
|
|
|
+ toPro(id) {
|
|
|
+ this.$router.push('/project/' + id);
|
|
|
+ },
|
|
|
+
|
|
|
//标签页面切换时
|
|
|
handleClick(tab, event) {
|
|
|
this.activeTab = tab.name;
|
|
@@ -852,9 +864,13 @@
|
|
|
//清理报废文档上传窗口中的文件
|
|
|
clearFileRecord() {
|
|
|
this.centerDialog2Visible = false;
|
|
|
- this.centerDialog4Visible = false;
|
|
|
this.$refs.upload1.clearFiles();
|
|
|
this.$refs.upload2.clearFiles();
|
|
|
+ },
|
|
|
+
|
|
|
+ //清理零件文档上传窗口中的文件
|
|
|
+ clearFileRecord2() {
|
|
|
+ this.centerDialog4Visible = false;
|
|
|
this.$refs.upload4.clearFiles();
|
|
|
},
|
|
|
|
|
@@ -1096,7 +1112,7 @@
|
|
|
list[i].state = 100;
|
|
|
}
|
|
|
}
|
|
|
- console.log(list)
|
|
|
+ // console.log(list)
|
|
|
this.documents.part = list;
|
|
|
} else {
|
|
|
this.$message({
|
|
@@ -1212,6 +1228,25 @@
|
|
|
type: "error"
|
|
|
});
|
|
|
});
|
|
|
+ },
|
|
|
+
|
|
|
+ //更新申请
|
|
|
+ updateRequest(){
|
|
|
+ console.log("发起了申请,但什么都没有发生")
|
|
|
+ },
|
|
|
+
|
|
|
+ //更新批准
|
|
|
+ updateApproval(id, approval){
|
|
|
+ if(approval){
|
|
|
+ console.log("批准通过了" + id + "的申请,但什么都没有发生");
|
|
|
+ }else{
|
|
|
+ console.log("批准拒绝了" + id + "的申请,但什么都没有发生");
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ //导出操作记录
|
|
|
+ exportRecords(){
|
|
|
+ console.log("想要导出记录,但什么都没有发生");
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -1283,6 +1318,11 @@
|
|
|
color: grey;
|
|
|
}
|
|
|
|
|
|
+ .belongPro {
|
|
|
+ cursor: pointer;
|
|
|
+ color:#20a0ff;
|
|
|
+ }
|
|
|
+
|
|
|
.main {
|
|
|
padding-left: 10px;
|
|
|
}
|