Reiskuchen il y a 5 ans
Parent
commit
72cb9c1844
2 fichiers modifiés avec 32 ajouts et 3 suppressions
  1. 1 0
      ys_vue/src/port.js
  2. 31 3
      ys_vue/src/views/mold/moldDetail.vue

+ 1 - 0
ys_vue/src/port.js

@@ -51,6 +51,7 @@ export default {
         moldFileDowloadList: '/mouldfile/fileList', //获取模具文档下载列表
         moldFileDowloadFile: '/mouldfile/downloadfileList', //批量下载
         moldFileCheck: '/mouldfile/check', //审批模具文档 
+        exportOperationExcel: '/mouldfile/downloadFileListExcel', //下载操作记录
 
         moldFileDelete: '/mouldfile/delFile', //项目文档的删除
         moldOperationList: '/mouldoperationdynamics/list', //项目文档的删除

+ 31 - 3
ys_vue/src/views/mold/moldDetail.vue

@@ -348,7 +348,7 @@
                         <el-table-column label="操作" width="200" sortable>
                             <template slot-scope="scope">
                                 <el-button size="small" @click="checkUpdate(scope.row.id, true)" type="primary">通过</el-button>
-                                <el-button size="small" @click="checkUpdate(scope.row.id, false)">拒绝</el-button>
+                                <el-button size="small" @click="checkUpdate(scope.row.id, false)" type="danger">拒绝</el-button>
                             </template>
                         </el-table-column>
                     </el-table>
@@ -445,7 +445,7 @@
             <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>
+                <el-button type="primary" @click="exportRecords">确定</el-button>
             </span>
         </el-dialog>
 
@@ -1308,7 +1308,35 @@
 
             //导出操作记录
             exportRecords(){
-                console.log("想要导出记录,但什么都没有发生");
+                if(this.recordTime[0] == null || this.recordTime[1] == null){
+                    this.$message({
+                        message: "未输入时间",
+                        type: "error"
+                    });
+                }else{
+                    this.centerDialog5Visible = false;
+                this.http.post( this.port.mold.exportOperationExcel, {
+                    mouldId: this.detailId,
+                    startTime: this.recordTime[0],
+                    endTime: this.recordTime[1]
+                },
+                res => {
+                    if (res.code == "ok") {
+                        console.log("进行下载,我文件呢???")
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+                }
             }
         },
         created() {