Tartarus před 2 roky
rodič
revize
63bed9d800

+ 5 - 3
src/layout/components/Sidebar/SidebarItem.vue

xqd
@@ -97,11 +97,13 @@ export default {
 </script>
 <style lang="scss">
 .svg-icon{
-  margin-left: 4px;
+  width: 1.8em !important;
+  margin-left: -3px;
+  margin-right: 10px !important;
 }
-.el-tooltip{
+.el-tooltip:nth-child(3){
   position: absolute !important;
-  left: 0px !important;
+  left: 10px !important;
   top: 0px;
   height: 100%;
   width: 100%;

+ 1 - 1
src/utils/request.js

xqd
@@ -101,7 +101,7 @@ service.interceptors.response.use(
     //   return res
     // }
 		if(res.type==="application/x-zip-compressed" ||
-       res.type==="application/vnd.ms-excel"){
+       res.type==="application/vnd.ms-excel"||res.type === 'application/json'){
 			return response
 		}else if(res.code != 200){
 			Message({

+ 3 - 1
src/views/contracts/detail.vue

xqd xqd
@@ -313,7 +313,7 @@ export default {
       contract: {},
       currentPage: 1,
       multipleSelection: [],
-      pagesize: 11,
+      pagesize: 100,
       form: "",
       invoicePicList: [],
       picList: [],
@@ -448,6 +448,8 @@ export default {
       this.temporaryList = this.srcList;
     },
 
+
+
     /* 批量导出 */
     handleAll(data) {
       this.multipleSelection=data

+ 8 - 5
src/views/contracts/index.vue

xqd xqd xqd xqd
@@ -350,7 +350,7 @@ export default {
       },
       value2: "",
       exportExcelData1: [], //导出列表缓存数据整页
-      exportExcelData2:[],//导出列表缓存数据单选
+      exportExcelData2: [], //导出列表缓存数据单选
     };
   },
   mounted() {
@@ -668,8 +668,9 @@ export default {
     handleSelectionChange(data) {
 	  this.multipleSelection=data
       this.exportExcelData1.push(data);
-            this.exportExcelData2 = [...new Set( this.exportExcelData1.flat(Infinity))];
-
+      this.exportExcelData2 = [
+        ...new Set(this.exportExcelData1.flat(Infinity)),
+      ];
     },
     handleAll(data) {
 	  this.multipleSelection=data
@@ -678,7 +679,9 @@ export default {
 
     /* 批量导出合同列表 */
     batchExports() {
-      this.exportExcel =[...new Set(this.exportExcelData1.flat(Infinity))]||this.exportExcelData2;
+      this.exportExcel =
+        [...new Set(this.exportExcelData1.flat(Infinity))] ||
+        this.exportExcelData2;
       if (this.exportExcel == "") {
         this.$message({
           type: "warning",
@@ -730,7 +733,7 @@ export default {
         draftStatus: "",
         supplierId: "",
       };
-      contractsPageApi({ data }).then((res) => {
+      contractsPageApi({ ...data }).then((res) => {
         const { result } = res.data;
         this.exportExcel = result;
       });

+ 76 - 64
src/views/databackup/index.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -51,7 +51,7 @@
       >
         <el-button type="primary" @click="Exports">全部导出</el-button>
         <el-button type="primary" @click="batchExports">批量导出</el-button>
-        <el-button type="primary">下载</el-button>
+        <el-button type="primary" @click="downLoadSql">下载</el-button>
         <el-button type="danger" @click="moreDelete">删除</el-button>
       </div>
     </el-row>
@@ -138,15 +138,18 @@
       </el-button>
     </div>
 
-    <!--修改出票人弹窗 -->
-    <el-dialog title="修改出票人" :visible.sync="dialogVisible" width="500px">
-      <el-form ref="form"  label-width="80px">
-        <el-form-item label="备注" >
-          <el-input  style="width: 100%"></el-input>
+    <!--修改备注弹窗 -->
+    <el-dialog title="修改备注" :visible.sync="dialogVisible" width="500px">
+      <el-form ref="form" :model="tableData" label-width="80px">      
+        <el-form-item label="文件名称">
+          <el-input v-model="tableData.fileName" style="width: 100%"></el-input>
+        </el-form-item>
+        <el-form-item label="备注">
+          <el-input v-model="tableData.remark" style="width: 100%"></el-input>
         </el-form-item>
         <el-form-item>
           <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" >提交修改</el-button>
+          <el-button type="primary" @click="submitDelete(tableData.fileName)">提交修改</el-button>
         </el-form-item>
       </el-form>
     </el-dialog>
@@ -228,6 +231,7 @@ export default {
       value2: "",
       exportExcelData1: [], //导出列表缓存数据整页
       exportExcelData2:[],//导出列表缓存数据单选
+      multipleSelection:[],//下载sql文件数据
     };
   },
 
@@ -243,7 +247,6 @@ export default {
       };
       getDatabase({ ...params, ...searchForm }).then((res) => {
         const { data } = res;
-        console.log(data);
         this.temporaryList = data.result;
         this.srcList = data.result;
         this.total = res.data.total;
@@ -312,67 +315,73 @@ export default {
 
     /* 下载数据备份 */
     download(fileName) {
-      window.open(
-        "https://ht.9026.com/api/Database/export?fileName=" + fileName
-      );
-      // this.$request({
-      // 	url:'/api/Database/export',
-      // 	method:'post',
-      // 	data:{
-      // 		fileName:fileName
-      // 	}
-      // }).then((res)=>{
-      // 	console.log(res)
-      // })
+      this.$request({
+      	url:'/api/Database/download',
+      	method:'post',
+      	data:{
+      		fileNameList:[fileName]
+      	}
+      }).then((res)=>{
+        window.open(res.data)
+      })
+    },
+
+    /* 下载多条数据备份 */
+    downLoadSql(){
+      let fileNameList = this.multipleSelection.map((item,value)=>{
+        return item.fileName
+      })
+      this.$request({
+      	url:'/api/Database/download',
+      	method:'post',
+      	data:{
+      		fileNameList
+      	}
+      }).then((res)=>{
+        window.open(res.data)
+      })
+      
+
     },
-    // recover(fileName) {
-    //   this.$request({
-    //     url: "/api/Database/restore",
-    //     method: "post",
-    //     headers: {
-    //       "Content-Type": "application/json",
-    //     },
-    //     data: {
-    //       fileName: fileName,
-    //     },
-    //   }).then((res) => {
-    //     console.log(res);
-    //     if (res.code == 200) {
-    //       this.$message({
-    //         type: "success",
-    //         message: "恢复成功",
-    //       });
-    //     } else {
-    //       this.$message({
-    //         type: "danger",
-    //         message: "恢复失败",
-    //       });
-    //     }
-    //   });
-    // },
 
     /* 修改备注 */
     modifyRemarks(fileName){
-      console.log(fileName);
-      // this.dialogVisible = true;
-      // let params ={
-      //   fileNameList:fileName
-      // }
-      // deletDatabase({...params}).then(res=>{
-      //   console.log(res);
-      // })
+      this.dialogVisible = true;
+      this.$request({
+        url:'/api/Database/backups',
+        method:'post',
+        data:{
+          fileName
+        }
+      }).then(res=>{
+        this.tableData = res.data.result[0]
+      })   
     },
-    // // 修改信息弹窗
-    // modify(id) {
+
+    /* 提交修改 */
+    submitDelete(){
+      this.$request({
+        url:'/api/Database/update',
+        method:'post',
+        data:this.tableData
+      }).then(res=>{
+        if(res.code === 200){
+          this.$message({
+            type:'success',
+            message:'修改成功'
+          })
+          this.getAllList()
+        }else{
+          this.$message({
+            type:'danger',
+            message:'修改失败'
+          })
+        }
+        
+      }) 
      
-    //   this.$request({
-    //     url: "/api/Drawer/" + id,
-    //     method: "get",
-    //   }).then((res) => {
-    //     this.tableData = res.data;
-    //     this.talbeData = this.$route.query.id;
-    //   });
-    // },
+    },
+   
 
     deleted(fileName) {
       this.$request({
@@ -423,11 +432,14 @@ export default {
 
     /* 批量导出 */
     handleSelectionChange(data) {
+      this.multipleSelection = data
+      console.log(this.multipleSelection);
        this.exportExcelData1.push(data);
       this.exportExcelData2 = [...new Set( this.exportExcelData1.flat(Infinity))];
       
     },
     handleAll(data) {
+      this.multipleSelection = data
       this.exportExcelData1.push(data);
     },
     /* 批量导出数据 */
@@ -476,7 +488,7 @@ export default {
         fileName: "",
         
       };
-      getDatabase({ data }).then((res) => {
+      getDatabase({ ...data }).then((res) => {
         const { result } = res.data;
         this.multipleSelection = result;
       });

+ 1 - 1
src/views/delivery/index.vue

xqd
@@ -502,7 +502,7 @@ export default {
         legalPerson: "",
         isDeleted: "",
       };
-      getSupplierSearch({ data }).then((res) => {
+      getSupplierSearch({ ...data }).then((res) => {
         const { result } = res.data;
         this.multipleSelection = result;
       });

+ 2 - 2
src/views/form/index.vue

xqd xqd xqd
@@ -169,7 +169,6 @@
 </template>
 
 <script>
-import { getList } from "@/api/table";
 import { dataConversionUtil } from "../../utils/Excel.js";
 import { getDrawerSearch } from "@/api/drawer";
 export default {
@@ -359,6 +358,7 @@ export default {
       }).then((res) => {
         this.tableData = res.data;
 		this.oldTableData={...this.tableData}
+
       });
     },
     // 修改信息弹窗提交
@@ -504,7 +504,7 @@ export default {
         name: "",
         status: "",
       };
-      getDrawerSearch({ data }).then((res) => {
+      getDrawerSearch({ ...data }).then((res) => {
         const { result } = res.data;
         this.multipleSelection = result;
       });

+ 48 - 52
src/views/management/index.vue

xqd
@@ -462,58 +462,54 @@
 				this.multipleSelection = [...new Set(this.exportExcelData1.flat(Infinity))] ||
 					this.exportExcelData2;
 
-				if (this.multipleSelection == "") {
-					this.$message({
-						type: "warning",
-						message: "请选择数据!",
-					});
-				} else {
-					var tableHeader = [
-						[
-							"序号",
-							"业务管理员姓名",
-							"账号",
-							"联系电话",
-							"业务管理员状态",
-							"审核状态",
-							"时间",
-						],
-					];
-					var dataList = [];
-					this.multipleSelection.forEach((item, index) => {
-						dataList.push([
-							index + 1,
-							item.realName,
-							item.account,
-							item.mobile,
-							item.statusText,
-							item.approveStatusText,
-							item.createdAt,
-						]);
-					});
-					dataConversionUtil.dataToExcel("业务管理员列表", tableHeader, dataList);
-					this.$message.success("导出成功!");
-				}
-			},
-			/* 全部导出合同列表数据 */
-			getContacts() {
-				const data = {
-					pageIndex: "",
-					pageSize: -1,
-					startTime: "",
-					endTime: "",
-					isDeleted: "",
-					status: "",
-				};
-				getAccountSearch({
-					data
-				}).then((res) => {
-					const {
-						result
-					} = res.data;
-					this.multipleSelection = result;
-				});
-			},
+      if (this.multipleSelection == "") {
+        this.$message({
+          type: "warning",
+          message: "请选择数据!",
+        });
+      } else {
+        var tableHeader = [
+          [
+            "序号",
+            "业务管理员姓名",
+            "账号",
+            "联系电话",
+            "业务管理员状态",
+            "审核状态",
+            "时间",
+          ],
+        ];
+        var dataList = [];
+        this.multipleSelection.forEach((item, index) => {
+          dataList.push([
+            index + 1,
+            item.realName,
+            item.account,
+            item.mobile,
+            item.statusText,
+            item.approveStatusText,
+            item.createdAt,
+          ]);
+        });
+        dataConversionUtil.dataToExcel("业务管理员列表", tableHeader, dataList);
+        this.$message.success("导出成功!");
+      }
+    },
+    /* 全部导出合同列表数据 */
+    getContacts() {
+      const data = {
+        pageIndex: "",
+        pageSize: -1,
+        startTime: "",
+        endTime: "",
+        isDeleted: "",
+        status: "",
+      };
+      getAccountSearch({ ...data }).then((res) => {
+        const { result } = res.data;
+        this.multipleSelection = result;
+      });
+    },
 
 			/* 全部导出 */
 			Exports() {

+ 1 - 1
src/views/sucuirtyaudit/annexList.vue

xqd
@@ -453,7 +453,7 @@ export default {
         operateUser: "",
         content: "",
       };
-      getAuditLogAttachmentsSearch({ data }).then((res) => {
+      getAuditLogAttachmentsSearch({ ...data }).then((res) => {
         const { result } = res.data;
         this.multipleSelection = result;
       });

+ 2 - 2
src/views/sucuirtyaudit/index.vue

xqd xqd
@@ -238,7 +238,7 @@ export default {
         this.total = res.data.total;
       });
     },
-
+    /* 汇票附件查询 */
     todetail(id) {
       this.$router.push({ path: "/logdetail", query: { id: id } });
     },
@@ -349,7 +349,7 @@ export default {
         operateUser: "",
         content: "",
       };
-      getAuditLogSearch({ data }).then((res) => {
+      getAuditLogSearch({ ...data }).then((res) => {
         const { result } = res.data;
         this.multipleSelection = result;
       });

+ 1 - 1
src/views/table/index.vue

xqd
@@ -607,7 +607,7 @@ export default {
         draftStatus: "",
         supplierId: "",
       };
-      getAcceptorSearch({ data }).then((res) => {
+      getAcceptorSearch({ ...data }).then((res) => {
         const { result } = res.data;
         this.multipleSelection = result;
       });