소스 검색

前端修改合同附件查看

gjy 2 년 전
부모
커밋
c4295a544b
3개의 변경된 파일48개의 추가작업 그리고 17개의 파일을 삭제
  1. 6 5
      pages/task/audit/acquisitioncontract.vue
  2. 20 4
      pages/task/audit/purchasecontract.vue
  3. 22 8
      pages/task/audit/salecontract.vue

+ 6 - 5
pages/task/audit/acquisitioncontract.vue

@@ -104,7 +104,10 @@
 						@on-progress="onProgress" :deletable="false" :showProgress = "false"></upload>
 				</view> -->
 				<view v-if='imglist.length>0'>
-					<view v-for='item in imglist'>
+					<view style="justify-content: space-between;" class='flex' v-for='item in imglist'>
+						<view style="max-width:60%;word-break: break-word">
+							{{item.appendixName}}
+						</view>
 						<view class="" style="color: #19be6b;text-decoration:underline;" @click="openDocument(item)">
 							点击下载
 						</view>
@@ -259,7 +262,7 @@
 		methods: {
 			openDocument(src){
 				uni.downloadFile({
-				  url: src,
+				  url: src.appendixPath,
 				  success: function (res) {
 				    var filePath = res.tempFilePath;
 				    uni.openDocument({
@@ -301,9 +304,7 @@
 						this.$api.doRequest('get', '/appendix/query/getFileList', {
 							appendixIds: that.list.addressUrl
 						}).then(res1 => {
-							for (var i = 0; i < res1.data.data.length; i++) {
-								that.imglist.push(res1.data.data[i].appendixPath)
-							}
+							that.imglist=res1.data.data
 						})
 						// 查流程
 						this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {

+ 20 - 4
pages/task/audit/purchasecontract.vue

@@ -135,7 +135,10 @@
 						@on-progress="onProgress" :deletable="false" :showProgress = "false"></upload>
 				</view> -->
 				<view v-if='imglist.length>0'>
-					<view v-for='item in imglist'>
+					<view style="justify-content: space-between;" class='flex' v-for='item in imglist'>
+						<view style="max-width:60%;word-break: break-word">
+							{{item.appendixName}}
+						</view>
 						<view class="" style="color: #19be6b;text-decoration:underline;" @click="openDocument(item)">
 							点击下载
 						</view>
@@ -286,6 +289,21 @@
 				this.imgShow = true
 				this.url = url
 			},
+			openDocument(src){
+				uni.downloadFile({
+				  url: src.appendixPath,
+				  success: function (res) {
+				    var filePath = res.tempFilePath;
+				    uni.openDocument({
+				      filePath: filePath,
+				      showMenu: true,
+				      success: function (res) {
+				        console.log('打开文档成功');
+				      }
+				    });
+				  }
+				});
+			},
 			showcontent(item){
 				item.showflow=!item.showflow
 			},
@@ -310,9 +328,7 @@
 						this.$api.doRequest('get', '/appendix/query/getFileList', {
 							appendixIds: that.list.addressUrl
 						}).then(res1 => {
-							for (var i = 0; i < res1.data.data.length; i++) {
-								that.imglist.push(res1.data.data[i].appendixPath)
-							}
+							that.imglist=res1.data.data
 						})
 						this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
 							businessCode: 'BUY-CONTRACT-APPROVE',

+ 22 - 8
pages/task/audit/salecontract.vue

@@ -125,9 +125,9 @@
 			<u-form-item label-width='260' label="备注信息">
 			</u-form-item>
 			<u-form-item>
-				<textarea class='textarea' v-model="list.remarks" input-align="right" placeholder="" disabled />
+				<textarea class='textarea' v-model="list.remarks" input-align="right" placeholder="暂无备注信息" disabled />
 			</u-form-item>
-			<u-form-item label-width='260' label="附件">
+			<u-form-item label-width='90' label="附件">
 				<!-- <view class="textCss">
 					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1" :file-list="imglist"
 					:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
@@ -138,7 +138,10 @@
 					<image style='width:100px;height:100px;' :src="item" mode=""></image>
 				</view> -->
 				<view v-if='imglist.length>0'>
-					<view v-for='item in imglist'>
+					<view style="justify-content: space-between;" class='flex' v-for='item in imglist'>
+						<view style="max-width:60%;word-break: break-word">
+							{{item.appendixName}}
+						</view>
 						<view class="" style="color: #19be6b;text-decoration:underline;" @click="openDocument(item)">
 							点击下载
 						</view>
@@ -291,6 +294,21 @@
 			this.getList()
 		},
 		methods: {
+			openDocument(src){
+				uni.downloadFile({
+				  url: src.appendixPath,
+				  success: function (res) {
+				    var filePath = res.tempFilePath;
+				    uni.openDocument({
+				      filePath: filePath,
+				      showMenu: true,
+				      success: function (res) {
+				        console.log('打开文档成功');
+				      }
+				    });
+				  }
+				});
+			},
 			shadeshow(url) {
 				this.imgShow = true
 				this.url = url
@@ -317,11 +335,7 @@
 						this.$api.doRequest('get', '/appendix/query/getFileList', {
 							appendixIds: that.list.addressUrl
 						}).then(res1 => {
-							for (var i = 0; i < res1.data.data.length; i++) {
-								that.imglist.push(
-									res1.data.data[i].appendixPath
-								)
-							}
+							that.imglist=res1.data.data
 						})
 						this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
 							businessCode: 'SALE-CONTRACT-APPROVE',