whx 2 달 전
부모
커밋
56a3849287
49개의 변경된 파일592개의 추가작업 그리고 67개의 파일을 삭제
  1. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/index.html
  2. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/1755.7391b4b6.css
  3. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/2701.ec3bd3b4.css
  4. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/3216.9c8ce381.css
  5. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/3317.aee49f26.css
  6. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/7876.234eea0b.css
  7. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/css/app.7e442132.css
  8. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1411.7aa6c4f2.js
  9. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1654.a6ec3ae7.js
  10. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1736.dece1725.js
  11. 4 4
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7449.9397aa74.js
  12. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/2288.20e4330d.js
  13. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3317.e3bffd25.js
  14. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3713.f2e360eb.js
  15. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3792.6623c2b9.js
  16. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/402.8138fbf4.js
  17. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.a4d99a72.js
  18. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.bce7c0c7.js
  19. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1755.31cd2abc.js
  20. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4729.aff434e2.js
  21. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4849.08b62d05.js
  22. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/516.ed605cd2.js
  23. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5319.27cf2024.js
  24. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5692.7dba95ed.js
  25. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6094.7b5befed.js
  26. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6653.577c752a.js
  27. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6653.8890cfae.js
  28. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7230.190030bf.js
  29. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7230.51fe4d2f.js
  30. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7439.13a567e9.js
  31. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7444.627e685f.js
  32. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7788.dddb5a2f.js
  33. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7876.428146ed.js
  34. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8021.c8c1a05a.js
  35. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8135.5baab30c.js
  36. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9466.1ba555ca.js
  37. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9466.a5620740.js
  38. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9647.a88a6bf9.js
  39. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9647.fa781f51.js
  40. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9820.63fa3516.js
  41. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/app.24789ce0.js
  42. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/app.29e0c71e.js
  43. 24 0
      virgo.wzfrontend/workark/src/api/finace.js
  44. 117 0
      virgo.wzfrontend/workark/src/components/common/commonUpload.vue
  45. 47 16
      virgo.wzfrontend/workark/src/components/common/pdfViewer.vue
  46. 64 22
      virgo.wzfrontend/workark/src/components/work/serve/list/detail.vue
  47. 11 1
      virgo.wzfrontend/workark/src/layout/components/topNav.vue
  48. 148 0
      virgo.wzfrontend/workark/src/layout/components/userDetail.vue
  49. 153 7
      virgo.wzfrontend/workark/src/views/work/finance/contract.vue

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/index.html


virgo.wzfrontend/src/main/resources/static/workark/static/css/6530.7391b4b6.css → virgo.wzfrontend/src/main/resources/static/workark/static/css/1755.7391b4b6.css


virgo.wzfrontend/src/main/resources/static/workark/static/css/8493.ec3bd3b4.css → virgo.wzfrontend/src/main/resources/static/workark/static/css/2701.ec3bd3b4.css


virgo.wzfrontend/src/main/resources/static/workark/static/css/7449.9c8ce381.css → virgo.wzfrontend/src/main/resources/static/workark/static/css/3216.9c8ce381.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/css/3317.aee49f26.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/css/7876.234eea0b.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/css/app.7e442132.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/1411.7aa6c4f2.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/1654.7281dafb.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/1654.a6ec3ae7.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/1736.945aeda9.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/1736.dece1725.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 4 - 4
virgo.wzfrontend/src/main/resources/static/workark/static/js/7449.9397aa74.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/2288.8a917230.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/2288.20e4330d.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/3317.e3bffd25.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/3713.f2e360eb.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/3792.9886082b.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/3792.6623c2b9.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/402.8138fbf4.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.a4d99a72.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.bce7c0c7.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/1755.31cd2abc.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/4729.aff434e2.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/4849.08b62d05.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/516.ed605cd2.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/5319.27cf2024.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/5692.7dba95ed.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/6094.a0dc58a0.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/6094.7b5befed.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/6653.577c752a.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/6653.8890cfae.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/7230.190030bf.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/7230.51fe4d2f.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/7439.13a567e9.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/7444.627e685f.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/7788.dddb5a2f.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/7876.428146ed.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/8021.c8c1a05a.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/8135.5baab30c.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9466.1ba555ca.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/9466.a5620740.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9647.a88a6bf9.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/9647.fa781f51.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/9820.63fa3516.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.24789ce0.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.29e0c71e.js


+ 24 - 0
virgo.wzfrontend/workark/src/api/finace.js

@@ -159,4 +159,28 @@ export function getBindContract(pdfId) {
 		url: `/file/workarkContract/pdf/get/${pdfId}`,
 		method: 'get'
 	})
+}
+/* 
+ * 修改合同状态
+ * 
+ * 
+ */
+export function updateContract(data) {
+	return request({
+		url: `/file/workarkContract/pdf`,
+		method: 'put',
+		data: data
+	})
+}
+/* 
+ * 合同状态
+ * 
+ * 
+ */
+export function saveContractPhoto(data) {
+	return request({
+		url: `/file/workarkContract/pdfSeal`,
+		method: 'post',
+		data: data
+	})
 }

+ 117 - 0
virgo.wzfrontend/workark/src/components/common/commonUpload.vue

@@ -0,0 +1,117 @@
+<template>
+	<div class="datacenter-upload">
+		<el-upload :action="action" name="uploadFile" ref="upload" :headers="headers" :on-success="successFile"
+			:before-upload="beforeUpload" :on-error="errorUpload" :show-file-list="false" :on-progress="progress"
+			accept=".png, .jpg, .jpeg" :file-list="fileList">
+			<div class="bim-update-button">
+				<i class="el-icon-plus"></i>
+			</div>
+		</el-upload>
+	</div>
+</template>
+
+<script>
+	import config from '@/config';
+	import {
+		getToken
+	} from '@/uitls/auth';
+	export default {
+		data() {
+			return {
+				action: config.baseURL + '/file/filenode/-1', //上传地址
+				headers: {},
+				type: '',
+				fileList: []
+			};
+		},
+		mounted() {
+			this.headers.token = getToken();
+		},
+		methods: {
+			// 核心方法:处理图片透明化
+			async beforeUpload(file) {
+				this.$loading();
+				try {
+					// 1. 处理透明化
+					const processedFile = await this.processImage(file);
+					// 2. 返回处理后的文件(替换原始文件)
+					return processedFile;
+				} catch (error) {
+					//TODO handle the exception
+					this.$message.error(`图片处理失败`);
+					return Promise.reject();
+				}
+			},
+			progress(e) {
+				let percent = e.percent >= 100 ? 99 : parseInt(e.percent)
+				this.$loading({
+					percent: (percent + '%')
+				});
+			},
+			reloadUpload(type) {
+				this.type = type;
+				this.$refs['upload'].$children[0].$refs.input.click();
+			},
+			errorUpload() {
+				this.$loading.close();
+				this.$message.error('上传失败');
+			},
+			successFile(response) {
+				if (!response.data) return this.errorUpload();
+				let data = response.data;
+				this.$message.success('上传成功');
+				this.$emit('uploadSuccess', data.node.url);
+				this.$loading.close();
+			},
+			// 图片处理逻辑
+			processImage(file) {
+				return new Promise((resolve, reject) => {
+					const reader = new FileReader();
+					reader.onload = (e) => {
+						const img = new Image();
+						img.onload = () => {
+							// 创建 Canvas
+							const canvas = document.createElement('canvas');
+							const ctx = canvas.getContext('2d');
+							canvas.width = img.width;
+							canvas.height = img.height;
+							ctx.drawImage(img, 0, 0);
+							// 透明度处理
+							const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
+							const data = imageData.data;
+							const threshold = 240; // 白色阈值
+
+							for (let i = 0; i < data.length; i += 4) {
+								if (data[i] > threshold && data[i + 1] > threshold && data[i + 2] >
+									threshold) {
+									data[i + 3] = 0; // 设置透明
+								}
+								// 模拟进度更新(可选)
+								if (i % (data.length / 100) === 0) {
+									this.progress = Math.ceil((i / data.length) * 100);
+								}
+							}
+							ctx.putImageData(imageData, 0, 0);
+							// 转换为文件对象
+							canvas.toBlob(blob => {
+								const processedFile = new File([blob], file.name, {
+									type: 'image/png',
+									lastModified: Date.now()
+								});
+								resolve(processedFile);
+							}, 'image/png');
+						};
+						img.onerror = reject;
+						img.src = e.target.result;
+					};
+					reader.onerror = reject;
+					reader.readAsDataURL(file);
+				});
+			},
+		}
+	};
+</script>
+
+<style lang="scss">
+	.datacenter-upload {}
+</style>

+ 47 - 16
virgo.wzfrontend/workark/src/components/common/pdfViewer.vue

@@ -8,16 +8,16 @@
 					<div class="text">{{index+1}}</div>
 				</div>
 			</div>
-			<div class="operation-box">
+			<div id="operation-box" class="operation-box">
 				<canvas ref="mainCanvas"></canvas>
-				<div ref="fabricCanvas" class="fabric-canvas">
+				<div ref="fabricCanvas" class="fabric-canvas" v-if="type === 'edit'">
 					<canvas id="fabricCanvas"></canvas>
 				</div>
 			</div>
 			<div class="operation-button" v-if="type === 'edit'">
-				<!-- <div class="button-item">
-					<el-button type="primary" size="mini">添加签字</el-button>
-				</div> -->
+				<div class="button-item">
+					<el-button type="primary" size="mini" @click="insertSign">添加签字</el-button>
+				</div>
 				<div class="button-item">
 					<el-button type="primary" size="mini" @click="insertSeal">添加印章</el-button>
 				</div>
@@ -37,7 +37,11 @@
 <script>
 	import pdf from 'pdfvuer';
 	import * as fabric from 'fabric';
-	const selectSeal = () => import('@/components/common/selectSeal')
+	import {
+		saveContractPhoto,
+		updateContract
+	} from '@/api/finace'
+	const selectSeal = () => import('@/components/common/selectSeal');
 	export default {
 		props: ['list', 'type'],
 		data() {
@@ -171,26 +175,39 @@
 			},
 			insertSeal() {
 				this.dialogVisibles = true;
-
+			},
+			insertSign() {
+				if (!this.$store.getters.user.rsonalSignature) this.$message.warning('暂未设置签名,请设置后使用');
+				this.setImage({
+					pictureAddress: this.$store.getters.user.rsonalSignature,
+					sealId: -1,
+					type: 'add',
+					spanTop: 60
+				});
 			},
 			callback(data) {
 				this.dialogVisibles = false;
 				if (data) this.setImage({
 					pictureAddress: data.fileNode.node.url,
 					sealId: data.id,
-					type: 'add'
+					type: 'add',
+					spanTop: 20
 				});
 			},
 			setImage(data) {
-				if (!this.fabricCanvas) return;
-				console.log(data);
+				if (!this.fabricCanvas) return;
 				fabric.Image.fromURL(data.pictureAddress).then(img => {
 					if (data.type === 'add') {
+						let div = document.getElementById('operation-box');
+						let currentScrollTop = div.scrollTop;
+						let currentHeight = div.clientHeight;
+						let top = currentScrollTop + currentHeight - data.spanTop;
+						let left = this.$refs.fabricCanvas.clientWidth - 20;
 						let scale = 100 / img.width;
 						img.scale(scale);
 						img.set({
-							top: 0,
-							left: 0,
+							top: top - (img.height * scale),
+							left: left - (img.width * scale),
 							sealId: data.sealId,
 							url: data.pictureAddress
 						})
@@ -198,8 +215,8 @@
 						let scale = data.pictureWidth / img.width;
 						img.scale(scale);
 						img.set({
-							top: data.top,
-							left: data.left,
+							top: data.pageTop,
+							left: data.pageLeft,
 							sealId: data.sealId,
 							url: data.pictureAddress
 						})
@@ -213,8 +230,8 @@
 				if (!this.fabricCanvas) return;
 				this.pageData[this.currentPage] = this.fabricCanvas.getObjects().map(node => {
 					return {
-						left: node.left,
-						top: node.top,
+						pageLeft: node.left,
+						pageTop: node.top,
 						pictureWidth: node.width * node.scaleX,
 						pictureHeight: node.height * node.scaleY,
 						pictureAddress: node.url,
@@ -228,6 +245,20 @@
 			},
 			submit() {
 				this.updatePageData();
+				this.$confirm('是否确定签订该合同', () => {
+					const postData = Object.values(this.pageData).reduce((acc, arr) => acc.concat(arr), []);
+					saveContractPhoto(postData).then(res => {
+						if (res.state) {
+							updateContract({
+								id: this.node.pdfId,
+								state: this.node.type === 1 ? 3 : 2
+							}).then(node => {
+								this.$message.success('操作成功');
+								this.$emit('callback', 'init');
+							})
+						}
+					})
+				})
 			}
 		},
 	}

+ 64 - 22
virgo.wzfrontend/workark/src/components/work/serve/list/detail.vue

@@ -74,20 +74,30 @@
 										:hide-timestamp="!contractNode.createDate" :timestamp="contractNode.createDate">
 										服务商上传合同
 									</el-timeline-item>
-									<el-timeline-item :class="timelineClass(2)" :hide-timestamp="true">
+									<el-timeline-item :class="timelineClass(2)"
+										:hide-timestamp="!contractNode.confirmDate"
+										:timestamp="contractNode.confirmDate">
 										<div>客户确认</div>
-										<el-button v-if="timelineClass(2) === 'warning'" size="mini" type="primary"
-											@click="signSeal('client')">
+									</el-timeline-item>
+									<el-timeline-item :class="timelineClass(3)"
+										:hide-timestamp="!contractNode.processDate"
+										:timestamp="contractNode.processDate">
+										<div>服务商盖章</div>
+										<el-button v-if="timelineClass(3) === 'warning' && type === 2" size="mini"
+											type="primary" @click="signSeal" style="margin-top: 10px;">
 											签字盖章
 										</el-button>
 									</el-timeline-item>
-									<el-timeline-item :class="timelineClass(3)" :hide-timestamp="true">
-										服务商盖章
-									</el-timeline-item>
-									<el-timeline-item :class="timelineClass(4)" :hide-timestamp="true">
-										客户盖章
+									<el-timeline-item :class="timelineClass(4)"
+										:hide-timestamp="!contractNode.updateDate" :timestamp="contractNode.updateDate">
+										<div>客户盖章</div>
+										<el-button v-if="timelineClass(4) === 'warning' && type === 1" size="mini"
+											type="primary" @click="signSeal" style="margin-top: 10px;">
+											签字盖章
+										</el-button>
 									</el-timeline-item>
-									<el-timeline-item :class="timelineClass(5)" :hide-timestamp="true">
+									<el-timeline-item :class="timelineClass(5)"
+										:hide-timestamp="!contractNode.updateDate" :timestamp="contractNode.updateDate">
 										签约成功
 									</el-timeline-item>
 								</el-timeline>
@@ -119,10 +129,13 @@
 				<select-contract ref="selectContract" v-if="visible" type="filter"></select-contract>
 				<div class="hui-dialog-submit">
 					<el-button size="small" @click="visible = false">取 消</el-button>
-					<el-button size="small" type="primary" @click="selectContract">确定</el-button>
+					<el-button size="small" type="primary" @click="selectContract" :loading="contractLoading">
+						确定
+					</el-button>
 				</div>
 			</div>
-			<pdf-viewer v-if="visible && actionType === 7" :list="contractList" :type="contractType"></pdf-viewer>
+			<pdf-viewer v-if="visible && actionType === 7" :list="contractList" :type="contractType"
+				@callback="callback"></pdf-viewer>
 		</el-dialog>
 		<el-dialog :close-on-click-modal="false" title="支付订单" :visible.sync="dialogVisible" width="600px"
 			:append-to-body="true">
@@ -140,7 +153,8 @@
 	} from '@/api/serve'
 	import {
 		bindContract,
-		getBindContract
+		getBindContract,
+		updateContract
 	} from '@/api/finace'
 
 	const processSet = () => import('@/components/work/system/serveSet/processSet');
@@ -162,7 +176,8 @@
 				visibleTitle: '',
 				contractList: [],
 				contractNode: {},
-				contractType: 'preview'
+				contractType: 'preview',
+				contractLoading: false
 			}
 		},
 		mounted() {
@@ -226,11 +241,13 @@
 					type: 'primary',
 					name: '立即支付'
 				})
-				if (this.part.contractId) this.activeList.push({
-					id: 8,
-					type: 'primary',
-					name: '确认合同'
-				});
+				if (this.part.contractId && this.part.contractStatus === 0 && this.part.status === 1) {
+					this.activeList.push({
+						id: 8,
+						type: 'primary',
+						name: '确认合同'
+					});
+				}
 			},
 			initBindContract() {
 				getBindContract(this.part.contractId).then(res => {
@@ -247,14 +264,28 @@
 						str = this.part.contractId ? 'success' : 'warning'
 						break;
 					case 2:
-						if (this.part.contractId && this.part.contractStatus === 0) str = 'warning';
+						if (this.part.contractId) {
+							str = this.part.contractStatus === 0 ? 'warning' : 'success';
+						}
 						break;
 					case 3:
+						if (this.part.contractId) {
+							if (this.part.contractStatus === 1) str = 'warning';
+							if (this.part.contractStatus >= 2) str = 'success';
+						}
 						break;
 					case 4:
+						if (this.part.contractId) {
+							if (this.part.contractStatus === 2) str = 'warning';
+							if (this.part.contractStatus >= 3) str = 'success';
+						}
 						break;
 					case 5:
-						str = 'last-timeline-item'
+						if (this.part.contractId) {
+							if (this.part.contractStatus >= 3) str = 'last-timeline-item success';
+						} else {
+							str = 'last-timeline-item'
+						}
 						break;
 					default:
 						break;
@@ -294,18 +325,27 @@
 						this.contractType = 'preview';
 						this.visible = true;
 						break;
+					case 8:
+						this.$confirm('是否确定该合同内容', () => {
+							updateContract({
+								id: this.part.contractId,
+								state: 1
+							}).then(this.updateOrderSuccessFunc);
+						})
+						break;
 					default:
 						break;
 				}
 			},
-			signSeal(type) {
+			signSeal() {
 				this.actionType = 7;
 				this.visibleTitle = '签字盖章';
 				this.contractList = [{
 					url: `${window.location.origin}/${config.baseURL}/file/workarkContract/pdf/show/${this.part.contractId}`,
 					pdfId: this.part.contractId,
 					payOrganizationId: this.part.payOrganizationId,
-					organizationId: this.part.organizationId
+					organizationId: this.part.organizationId,
+					type: this.type
 				}];
 				this.contractType = 'edit';
 				this.visible = true;
@@ -344,6 +384,7 @@
 				if (!this.$refs.selectContract) return;
 				let data = this.$refs.selectContract.currentRow;
 				if (!data) return;
+				this.contractLoading = true;
 				bindContract({
 					orderNo: this.part.orderNo,
 					contractId: data.id,
@@ -351,6 +392,7 @@
 				}).then(res => {
 					this.updateOrderSuccessFunc(res);
 					this.visible = false;
+					this.contractLoading = false;
 				});
 			},
 			callback(type) {

+ 11 - 1
virgo.wzfrontend/workark/src/layout/components/topNav.vue

@@ -39,6 +39,10 @@
 				</el-dropdown-menu>
 			</el-dropdown>
 		</div>
+		<el-drawer title="个人信息" class="user-drawer" :modal="false" :visible.sync="drawer" :size="400"
+			:append-to-body="true">
+			<user-detail v-if="drawer"></user-detail>
+		</el-drawer>
 	</div>
 </template>
 
@@ -49,12 +53,14 @@
 	import {
 		mapGetters
 	} from 'vuex';
+	const userDetail = () => import('./userDetail');
 	export default {
 		data() {
 			return {
 				users: {},
 				userDropdown: false,
-				systemCountStatus: false
+				systemCountStatus: false,
+				drawer: false
 			}
 		},
 		mounted() {
@@ -67,6 +73,7 @@
 			userCommand(command) {
 				switch (command) {
 					case 'detail':
+						this.drawer = true;
 						break;
 					case 'logout':
 						this.logout();
@@ -95,6 +102,9 @@
 		computed: {
 			...mapGetters(['user'])
 		},
+		components: {
+			userDetail
+		}
 	}
 </script>
 

+ 148 - 0
virgo.wzfrontend/workark/src/layout/components/userDetail.vue

@@ -0,0 +1,148 @@
+<template>
+	<div class="hui-flex user-info">
+		<div class="hui-flex-box">
+			<div class="hui-detail">
+				<div class="hui-detail-box">
+					<div class="hui-detail-title">个人信息</div>
+					<div class="hui-detail-content">
+						<div class="hui-detail-item">
+							<div class="hui-detail-label">头像</div>
+							<div class="hui-detail-value">
+								<div class="user-avatar" @click="update('portrait')">
+									<avatar class="avatar-box" :user="user"></avatar>
+									<i class="el-icon-camera-solid"></i>
+								</div>
+							</div>
+						</div>
+						<div class="hui-detail-item">
+							<div class="hui-detail-label">姓名</div>
+							<div class="hui-detail-value">{{user.userName}}</div>
+						</div>
+						<div class="hui-detail-item">
+							<div class="hui-detail-label">性别</div>
+							<div class="hui-detail-value">{{user.sex == 'M'?'男':'女'}}</div>
+						</div>
+						<div class="hui-detail-item">
+							<div class="hui-detail-label">手机号</div>
+							<div class="hui-detail-value">{{user.phone}}</div>
+						</div>
+						<div class="hui-detail-item">
+							<div class="hui-detail-label">邮箱</div>
+							<div class="hui-detail-value">{{user.email}}</div>
+						</div>
+						<div class="hui-detail-item">
+							<div class="hui-detail-label">签字</div>
+							<div class="hui-detail-value">
+								<div class="sign-image">
+									<img v-if="user.rsonalSignature" :src="user.rsonalSignature" alt="sign.png"
+										@click="update('rsonalSignature')" />
+									<i class="el-icon-camera-solid"></i>
+								</div>
+
+
+							</div>
+						</div>
+					</div>
+					<common-upload ref="commonUpload" v-show="false" @uploadSuccess="uploadSuccess"></common-upload>
+				</div>
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		getUserInfo,
+		updateUserDetails
+	} from '@/api/loginRegister'
+	const commonUpload = () => import('@/components/common/commonUpload');
+	export default {
+		data() {
+			return {
+				user: {},
+				type: ''
+			}
+		},
+		mounted() {
+			this.init();
+		},
+		methods: {
+			init() {
+				getUserInfo().then(res => {
+					if (res.state) {
+						this.user = res.data;
+						this.$store.dispatch('app/changeUser', this.user);
+					}
+				});
+			},
+			update(type) {
+				this.type = type;
+				this.$refs.commonUpload.reloadUpload(type);
+			},
+			uploadSuccess(url) {
+				let postData = {
+					id: this.user.userId
+				};
+				postData[this.type] = url;
+				updateUserDetails(postData).then(res => {
+					if (res.state) {
+						this.$message.success('操作成功');
+						this.init();
+					}
+				})
+			}
+		},
+		components: {
+			commonUpload
+		}
+	}
+</script>
+
+<style lang="scss">
+	.user-info {
+		.user-avatar {
+			width: 50px;
+			height: 50px;
+			border-radius: 50%;
+			margin-right: 8px;
+			border: 2px solid $--border-color-base;
+			position: relative;
+			cursor: pointer;
+
+			.avatar-box {
+				border-radius: 50%;
+				overflow: hidden;
+			}
+
+			.el-icon-camera-solid {
+				position: absolute;
+				bottom: 0;
+				right: 0;
+				color: $--color-info;
+			}
+		}
+
+		.sign-image {
+			width: 100px;
+			height: 50px;
+			border: 2px solid $--border-color-base;
+			background: $--background-color-base;
+			position: relative;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			cursor: pointer;
+
+			img {
+				width: 100%;
+			}
+
+			.el-icon-camera-solid {
+				position: absolute;
+				bottom: 0;
+				right: 0;
+				color: $--color-info;
+			}
+		}
+	}
+</style>

+ 153 - 7
virgo.wzfrontend/workark/src/views/work/finance/contract.vue

@@ -1,8 +1,154 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
+<template>
+	<div class="hui-flex hui-content border-box">
+		<div class="hui-content-title">
+			<div :class="nowTitle.id === item.id?'hui-title-item active':'hui-title-item'"
+				v-for="(item,index) in titleData" :key="index" @click="changeTitle(item)">
+				{{item.name}}
+			</div>
+		</div>
+		<div class="hui-flex-box hui-flex hui-table">
+			<div class="hui-flex-box">
+				<el-table :data="tableData" row-key="id" height="100%" v-loading="loading">
+					<el-table-column label="序号" width="50">
+						<template slot-scope="scope">
+							<div style="text-align: center;">{{scope.$index + 1}}</div>
+						</template>
+					</el-table-column>
+					<el-table-column label="合同名称" prop="name"></el-table-column>
+					<el-table-column label="状态">
+						<template slot-scope="scope">
+							<div class="hui-table-operation">
+								<span class="color-warning" v-if="!scope.row.state">开具中</span>
+								<span class="color-success" v-else>
+									已开具
+								</span>
+							</div>
+						</template>
+					</el-table-column>
+					<el-table-column label="操作" width="150" align="center">
+						<template slot-scope="scope">
+							<div class="hui-table-operation">
+								<span class="table-operation" @click="lookItem(scope.row,2)">
+									详情
+								</span>
+								<span class="table-operation" @click="lookOrder(scope.row,1)">
+									查看订单
+								</span>
+							</div>
+						</template>
+					</el-table-column>
+					<template slot="empty">
+						<el-empty description="暂无数据"></el-empty>
+					</template>
+				</el-table>
+			</div>
+			<div class="hui-content-pagination">
+				<el-pagination :pager-count="9" layout="prev, pager, next" :page-size="pageSize" :total="totalCount"
+					@current-change="currentChange" background>
+				</el-pagination>
+			</div>
+		</div>
+		<el-drawer :title=" type === 1?'订单详情':'发票详情'" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<detail v-if="drawer && type === 1" :detailId="detailId" detailType="orderNo"></detail>
+			<invoice-detail v-if="drawer && type === 2" :detailId="detailId" :type="nowTitle.id" @callback="callback">
+			</invoice-detail>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import {
+		getInvoiceListByQueryAndPage,
+		deleteInvoiceById
+	} from '@/api/finace'
+	const detail = () => import('@/components/work/serve/list/detail');
+	const invoiceDetail = () => import('@/components/work/finace/invoice/apply/detail');
+	export default {
+		data() {
+			return {
+				titleData: [],
+				nowTitle: {},
+				tableData: [],
+				currPage: 1,
+				pageSize: 15,
+				totalCount: 0,
+				loading: false,
+				detailId: '',
+				drawer: false,
+				type: 1
+			}
+		},
+		mounted() {
+			this.titleData = [{
+				id: 1,
+				name: '我的合同'
+			}]
+			if (this.$store.getters.organization.facilitator === 1) {
+				this.titleData.push({
+					id: 2,
+					name: '服务商合同'
+				})
+			}
+			this.nowTitle = this.titleData[0];
+			this.init();
+		},
+		methods: {
+			init() {
+				// this.loading = true;
+				let filterOption = {};
+				if (this.nowTitle.id === 1) filterOption['organizationId'] = this.$store.getters.organization.id;
+				if (this.nowTitle.id === 2) filterOption['providerId'] = this.$store.getters.organization.id;
+				filterOption = Object.assign(filterOption, this.filterOption);
+				// getInvoiceListByQueryAndPage(this.currPage, this.pageSize, filterOption).then(res => {
+				// 	if (res.state) {
+				// 		this.tableData = res.data.dataList;
+				// 		this.totalCount = res.data.totalCount;
+				// 	}
+				// 	this.loading = false;
+				// })
+			},
+			changeTitle(item) {
+				if (this.nowTitle.id === item.id) return;
+				this.nowTitle = item;
+				this.pageSize = 10;
+				this.currPage = 1;
+				this.init();
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			lookItem(data, type) {
+				this.type = type;
+				this.detailId = data.id;
+				this.drawer = true;
+			},
+			lookOrder(data, type) {
+				this.type = type;
+				this.detailId = data.orderNo;
+				this.drawer = true;
+			},
+			deleteItem(data) {
+				this.$confirm('确定要删除该发票?', () => {
+					deleteInvoiceById(data.id).then(res => {
+						if (res.state) {
+							this.$message.success('操作成功');
+							this.init();
+						}
+					})
+				});
+			},
+			callback(type) {
+				this.visible = false;
+				if (type === 'init') this.init();
+			}
+		},
+		components: {
+			detail,
+			invoiceDetail
+		}
+	}
+</script>
+
+<style>
 </style>