sunyadv 5 سال پیش
والد
کامیت
3484ad3e47
4فایلهای تغییر یافته به همراه42 افزوده شده و 14 حذف شده
  1. 1 1
      ys_vue/build/webpack.dev.conf.js
  2. 2 0
      ys_vue/src/port.js
  3. 35 10
      ys_vue/src/views/mold/moldDetail.vue
  4. 4 3
      ys_vue/src/views/project/projectDetail.vue

+ 1 - 1
ys_vue/build/webpack.dev.conf.js

@@ -30,7 +30,7 @@ module.exports = merge(baseWebpackConfig, {
       filename: 'index.html',
       template: 'index.html',
       inject: true,
-      favicon: './favicon.ico'
+      favicon: './cloud.ico'
     }),
     new FriendlyErrorsPlugin()
   ]

+ 2 - 0
ys_vue/src/port.js

@@ -56,6 +56,8 @@ export default {
         moldFileCheck: '/mouldfile/check', //审批模具文档 
         exportOperationExcel: '/mouldfile/downloadFileListExcel', //下载操作记录
 
+        chooseModelList: '/mould/chooseModelList', //编辑项目时显示的模具列表
+
         moldFileDelete: '/mouldfile/delFile', //项目文档的删除
         moldOperationList: '/mouldoperationdynamics/list', //项目操作记录列表
 

+ 35 - 10
ys_vue/src/views/mold/moldDetail.vue

@@ -365,12 +365,24 @@
                 <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></el-table-column>
-                        <el-table-column prop="fileSize" label="申请单大小" width="200" sortable></el-table-column>
-                        <el-table-column prop="fileName2" label="报废单名称" sortable></el-table-column>
-                        <el-table-column prop="fileSize2" 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 prop="fileName" label="申请单名称" sortable>
+                            <template slot-scope="scope" v-if="scope.row.fileUrl != null">
+                                <a 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>
+                            </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" v-if="scope.row.fileUrl != null">
+                                <a 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>
+                            </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>
@@ -386,9 +398,6 @@
                                 <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"
                                     @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
@@ -432,7 +441,16 @@
 
         <!-- 审批弹窗 -->
         <el-dialog title="审批" :visible.sync="centerDialogVisible" width="450px">
-            <a v-if="this.activeFileName != null" :href="this.fileUrl" :download="this.activeFileName"><el-link type="primary">{{this.activeFileName}}</el-link></a>
+            <a v-if="this.activeFileName != null && this.fileUrl2 == null" :href="this.fileUrl" :download="this.activeFileName"><el-link type="primary">{{this.activeFileName}}</el-link></a>
+            <div v-if="this.fileUrl2 != null">
+                <div v-if="this.activeFileName != null">
+                    申请单:<a :href="this.fileUrl" :download="this.activeFileName"><el-link type="primary">{{this.activeFileName}}</el-link></a>
+                </div>
+                </br>
+                <div v-if="this.fileUrl2 != null">
+                    报废单:<a :href="this.fileUrl2" :download="this.fileUrl2Name"><el-link type="primary">{{this.fileUrl2Name}}</el-link></a>
+                </div>
+            </div>
             <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>
@@ -658,6 +676,8 @@
                 activeArticleId: null,
                 activeFileName: null,
                 fileUrl: null,
+                fileUrl2: null,
+                fileUrl2Name: null,
                 part2dFile: null,
                 part3dFile: null,
                 
@@ -921,6 +941,8 @@
                 this.activeArticleId = row.id;
                 this.activeFileName = row.fileName;
                 this.fileUrl = row.fileUrl;
+                this.fileUrl2 = row.fileUrl2;
+                this.fileUrl2Name = row.fileName2;
                 this.twoId = null;
                 this.threeId = null;
                 this.centerDialogVisible = true;
@@ -942,6 +964,9 @@
                 this.activeArticleId = null;
                 this.activeFileName = null;
                 this.centerDialogVisible = true;
+                this.fileUrl = null;
+                this.fileUrl2 = null;
+                this.fileUrl2Name = null;
             },
 
             //清理零件文档上传窗口中的文件

+ 4 - 3
ys_vue/src/views/project/projectDetail.vue

@@ -486,9 +486,10 @@
                 })
 
                 // 获取模具
-                this.http.post(this.port.mold.modelList, {
-                    parentId: this.user.parentId,
-                    id: this.user.id
+                this.http.post(this.port.mold.chooseModelList, {
+                    // parentId: this.user.parentId,
+                    // id: this.user.id
+                    projectId: this.detailId
                 }, res => {
                     if (res.code == "ok") {
                         this.molds = res.data;