ソースを参照

8.2 16.10合并

Tartarus 2 年 前
コミット
8fc8512881

+ 40 - 30
src/api/contracts.js

xqd xqd
@@ -1,34 +1,34 @@
 import request from '@/utils/request'
-
-// 保存汇票
-export function contractDraftSubmitApi(data) {
-  return request({
-    url: '/api/Contract/addContractDraft',
-    method: 'post',
-    data
-  })
-}
-// 获取汇票详情
-export function contractsDraftDetailApi(id) {
-  return request({
-    url: '/api/Contract/contractDraft/' + id,
-    method: 'get'
-  })
-}
-
-// 获取合同详情
-export function contractsDetailApi(id) {
-  return request({
-    url: '/api/Contract/' + id,
-    method: 'get'
-  })
-}
-export function contractsExportApi(data) {
-  return request({
-    url: '/api/Contract/export',
-    method: 'post',
-    data: data
-  })
+
+// 保存汇票
+export function contractDraftSubmitApi(data) {
+  return request({
+    url: '/api/Contract/addContractDraft',
+    method: 'post',
+    data
+  })
+}
+// 获取汇票详情
+export function contractsDraftDetailApi(id) {
+  return request({
+    url: '/api/Contract/contractDraft/' + id,
+    method: 'get'
+  })
+}
+
+// 获取合同详情
+export function contractsDetailApi(id) {
+  return request({
+    url: '/api/Contract/' + id,
+    method: 'get'
+  })
+}
+export function contractsExportApi(data) {
+  return request({
+    url: '/api/Contract/export',
+    method: 'post',
+    data: data
+  })
 }
 export function contractsPageApi(data) {
   return request({
@@ -65,3 +65,13 @@ export function contractSubmitApi(data) {
     data
   })
 }
+
+/* 导出合同列表 */
+export function contractExport(data) {
+  return request({
+    url: '/api/Contract/export',
+    method: 'post',
+    data
+  })
+}
+

+ 12 - 0
src/router/index.js

xqd
@@ -304,7 +304,19 @@ export const asyncRouterMap = [{
 					roles: ['admin']
 				},
 				hidden: true
+			},
+
+			{
+				path: '/attachmentdetail',
+				name: 'attachmentdetail',
+				component: () => import('@/views/sucuirtyaudit/attachment-detail'),
+				meta: {
+					title: '附件列表详情',
+					roles: ['admin']
+				},
+				hidden: true
 			}
+
 		]
 	},
 	{

+ 1 - 1
src/views/contracts/addnewbill.vue

xqd
@@ -113,7 +113,7 @@ export default {
               // this.onBack()
               this.$message({
                 type: 'success',
-                message: res.msg
+                message:'汇票上传成功'
               })
             }
           })

+ 21 - 11
src/views/contracts/index.vue

xqd xqd xqd xqd
@@ -221,7 +221,7 @@
             >审核失败</el-button
           >
 
-          <el-button type="primary" @click="Exports">批量导出</el-button>
+          <el-button type="primary" @click="Exports">导出</el-button>
           <el-button type="success" @click="recover">恢复</el-button>
           <el-button type="danger" @click="deleted">删除</el-button>
         </div>
@@ -267,7 +267,7 @@
 
 <script>
 import { dataConversionUtil } from "../../utils/Excel.js";
-import { contractsPageApi, contractsExportApi } from "@/api/contracts";
+import { contractsPageApi, contractExport } from "@/api/contracts";
 import { mapGetters } from "vuex";
 
 export default {
@@ -641,15 +641,7 @@ export default {
       }
     },
 
-    handleSelectionChange(data) {
-      this.multipleSelection = data;
-      console.log(this.multipleSelection);
-    },
-    handleAll(data) {
-      this.multipleSelection = data;
-      console.log(this.multipleSelection);
-    },
-
+  
     /* 分页功能,改变当前页 */
     handleCurrentChange(val) {
       this.currentPage = val;
@@ -669,6 +661,24 @@ export default {
       font.handleCurrentChange(cpage);
     },
 
+      /* 批量导出数据 */
+      handleSelectionChange(data) {
+      this.multipleSelection = data;
+      
+    },
+    handleAll(data) {
+      this.multipleSelection = data;
+    },
+
+
+    /* 导出合同列表数据 */
+    getContacts(){
+      
+    },
+
+
+
+    /* 导出 */
     Exports() {
       contractsExportApi({
         supplierId: 1,

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

xqd xqd
@@ -241,17 +241,8 @@
 					this.total = res.data.total;
 				});
 			},
-			handleSelectionChange(data) {
-				this.multipleSelection = data;
-				console.log(this.multipleSelection);
-			},
-			handleAll(data) {
-				this.multipleSelection = data;
-				console.log(this.multipleSelection);
-			},
-			handlehpCommand(command) {
-				this.hpstatus = command;
-			},
+			
+			
 			addTicketdrawer() {
 				this.$router.push({
 					path: "/form/addTicketdrawer",
@@ -412,6 +403,15 @@
 				font.handleCurrentChange(cpage);
 			},
 
+
+			/* 表格选择数据 */
+			handleSelectionChange(data) {
+				this.multipleSelection = data;
+			},
+			handleAll(data) {
+				this.multipleSelection = data;
+			},
+
 			/* 导出 */
 			Exports() {
 				if (this.multipleSelection == "") {

+ 22 - 37
src/views/sucuirtyaudit/annexList.vue

xqd xqd xqd xqd
@@ -34,29 +34,39 @@
 			highlight-current-row @select="handleSelectionChange" @select-all="handleAll">
 			<el-table-column align="center" label="" width="55" type="selection">
 			</el-table-column>
-			<el-table-column align="center" label="合同名称" width="200" prop="name">
+			<el-table-column align="center" label="合同名称" width="210" prop="name">
 			</el-table-column>
 
-			<el-table-column label="供应商名称" align="center" width="340" prop="supplierName">
+			<el-table-column label="供应商名称" align="center" width="120" prop="supplierName">
 			</el-table-column>
-			<el-table-column label="日期" width="200" align="center">
+			<el-table-column label="日期" width="120" align="center">
 				<template slot-scope="scope">
 					<i class="el-icon-time" />
 					<span>{{ scope.row.createdAt }}</span>
 				</template>
 			</el-table-column>
 			<!-- 合同附件 -->
-			<el-table-column align="center" label="合同附件" width="800" prop="attachments">
+			<el-table-column align="center" label="合同附件" width="300" prop="picUrls">
 				<template slot-scope="scope">
-					<img width="100" height="100" v-for="item in scope.row.attachments" :key="item.id" :src="item" />
+					<img width="100" height="100" v-for="item in scope.row.picUrls" :key="item.id" :src="item" />
 				</template>
 			</el-table-column>
 			<!-- 发票附件 -->
-			<!-- 贸易附件 -->
+			<el-table-column align="center" label="发票附件" width="300" prop="invoicePics">
+				<template slot-scope="scope">
+					<img width="100" height="100" v-for="item in scope.row.invoicePics" :key="item.id" :src="item" />
+				</template>
+			</el-table-column>
+			<!-- 贸易合同 -->
+			<el-table-column align="center" label="贸易合同" width="400" prop="tradePics">
+				<template slot-scope="scope">
+					<img width="100" height="100" v-for="item in scope.row.tradePics" :key="item.id" :src="item" />
+				</template>
+			</el-table-column>
 
 			<el-table-column align="center" prop="created_at" label="操作" width="250">
 				<template slot-scope="scope">
-					<el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="todetail(scope.row.id)">查看详情</el-tag>
+					<el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="todetail(scope.row.id)">汇票附件</el-tag>
 					<el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="download(scope.row.id)">
 						下载</el-tag>
 				</template>
@@ -245,16 +255,7 @@
 				this.multipleSelection = data;
 				console.log(this.multipleSelection);
 			},
-			todetail() {
-				this.$router.push({
-					path: "/detail",
-				});
-			},
-			toindex() {
-				this.$router.push({
-					path: "/sucuirtyaudit/index",
-				});
-			},
+			
 			handleSelectionChange(data) {
 				this.multipleSelection = data;
 				console.log(this.multipleSelection);
@@ -263,9 +264,11 @@
 				this.multipleSelection = data
 				console.log(this.multipleSelection)
 			},
+			/* 跳转到详情页 */
+
 			todetail(id) {
 				this.$router.push({
-					path: '/detail',
+					path: '/attachmentdetail',
 					query: {
 						id: id
 					}
@@ -276,25 +279,7 @@
 					path: '/sucuirtyaudit/index'
 				})
 			},
-			handleCurrentChange(val) {
-				this.currentPage = val;
-				this.getPageData();
-			},
-			jumpFirstPage() {
-				this.$refs.pagination.handleCurrentChange(1);
-				this.$emit('handleCurrentChange', 1);
-			},
-			jumpLastPage() {
-				let font = this.$refs.pagination
-				let cpage = Math.ceil(font.total / font.pageSize);
-				font.handleCurrentChange(cpage);
-			},
-			getPageData() {
-				let start = (this.currentPage - 1) * this.pagesize;
-				let end = start + this.pagesize;
-				this.srcList = this.list.slice(start, end);
-				this.temporaryList = this.srcList;
-			},
+			
 			// 下载合同附件zip
 			download(id) {
 				let that=this

+ 30 - 0
src/views/sucuirtyaudit/attachment-detail.vue

xqd
@@ -0,0 +1,30 @@
+<template>
+  <div class="attachment-detail">
+    <el-descriptions title="汇票附件" :column="2" border style="margin: 20px;" >
+      <el-descriptions-item label="汇票名">合同汇票测试</el-descriptions-item>
+      <el-descriptions-item label="汇票号码">456798912</el-descriptions-item>
+   
+      <el-descriptions-item label="发票附件">
+        <FileShow
+        
+        />
+      </el-descriptions-item>
+    </el-descriptions>
+  </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            list: [],//数据
+        }
+    },
+};
+</script>
+
+<style lang="scss" >
+.attachment-detail {
+  padding: 20px;
+}
+</style>