Commit 415962d43f77514813967bbc1b2a2df56774bfbf

Authored by 史婷婷
1 parent 071dd7b0

feat: 所有合同-审核详情-附件下载

@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 </view> 53 </view>
54 54
55 <view class="section" v-if="detail.status === 'FORMAL'"> 55 <view class="section" v-if="detail.status === 'FORMAL'">
56 - <view class="row"><text class="label">正式规范性合同</text><text class="value" style="color: #3D48A3;">{{ 56 + <view class="row"><text class="label">正式规范性合同</text><text class="value act" @click="downloadFile(detail.formalFileId, detail.formalFileName)">{{
57 detail.formalFileName || '-' }}</text></view> 57 detail.formalFileName || '-' }}</text></view>
58 <view class="row"><text class="label">正式合同是否规范</text><text class="value">{{ detail.formalStandardized ? 58 <view class="row"><text class="label">正式合同是否规范</text><text class="value">{{ detail.formalStandardized ?
59 '是' : '否' }}</text></view> 59 '是' : '否' }}</text></view>
@@ -80,6 +80,7 @@ @@ -80,6 +80,7 @@
80 <script> 80 <script>
81 import { getContractApi } from '@/api/contract' 81 import { getContractApi } from '@/api/contract'
82 import ProductRel from './productRel.vue' 82 import ProductRel from './productRel.vue'
  83 +import { downloadFile } from '@/utils/downloadFile.js'
83 84
84 export default { 85 export default {
85 name: 'FormalContractViewer', 86 name: 'FormalContractViewer',
@@ -160,6 +161,7 @@ export default { @@ -160,6 +161,7 @@ export default {
160 this.productList = lines 161 this.productList = lines
161 }).catch(() => { }) 162 }).catch(() => { })
162 }, 163 },
  164 + downloadFile,
163 getFormValues() { 165 getFormValues() {
164 const m = this.detail || {} 166 const m = this.detail || {}
165 return JSON.parse(JSON.stringify(m)) 167 return JSON.parse(JSON.stringify(m))
@@ -205,7 +207,8 @@ export default { @@ -205,7 +207,8 @@ export default {
205 } 207 }
206 208
207 .label { 209 .label {
208 - width: 280rpx; 210 + max-width: 280rpx;
  211 + margin-right: 20rpx;
209 color: rgba(0, 0, 0, 0.6); 212 color: rgba(0, 0, 0, 0.6);
210 font-size: 28rpx; 213 font-size: 28rpx;
211 } 214 }
@@ -219,7 +222,8 @@ export default { @@ -219,7 +222,8 @@ export default {
219 } 222 }
220 223
221 .label1 { 224 .label1 {
222 - width: 280rpx; 225 + max-width: 280rpx;
  226 + margin-right: 20rpx;
223 color: rgba(0, 0, 0, 0.6); 227 color: rgba(0, 0, 0, 0.6);
224 font-size: 32rpx; 228 font-size: 32rpx;
225 } 229 }
@@ -229,6 +233,13 @@ export default { @@ -229,6 +233,13 @@ export default {
229 text-align: right; 233 text-align: right;
230 color: rgba(0, 0, 0, 0.9); 234 color: rgba(0, 0, 0, 0.9);
231 font-size: 28rpx; 235 font-size: 28rpx;
  236 + text-align: right;
  237 + word-break: break-all;
  238 +
  239 + &.act {
  240 + color: $theme-primary;
  241 + }
  242 +
232 } 243 }
233 244
234 .customer { 245 .customer {
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 </view> 53 </view>
54 54
55 <view class="section" v-if="detail.status === 'STANDARD'"> 55 <view class="section" v-if="detail.status === 'STANDARD'">
56 - <view class="row"><text class="label">标准规范性合同</text><text class="value" style="color: #3D48A3;">{{ 56 + <view class="row"><text class="label">标准规范性合同</text><text class="value act" @click="downloadFile(detail.standardFileId, detail.standardFileName)">{{
57 detail.standardFileName || '-' }}</text></view> 57 detail.standardFileName || '-' }}</text></view>
58 <view class="row"><text class="label">标准合同是否规范</text><text class="value">{{ detail.standardStandardized ? 58 <view class="row"><text class="label">标准合同是否规范</text><text class="value">{{ detail.standardStandardized ?
59 '是' : '否' }}</text></view> 59 '是' : '否' }}</text></view>
@@ -80,6 +80,7 @@ @@ -80,6 +80,7 @@
80 <script> 80 <script>
81 import { getContractApi } from '@/api/contract' 81 import { getContractApi } from '@/api/contract'
82 import ProductRel from './productRel.vue' 82 import ProductRel from './productRel.vue'
  83 +import { downloadFile } from '@/utils/downloadFile.js'
83 84
84 export default { 85 export default {
85 name: 'StandardContractViewer', 86 name: 'StandardContractViewer',
@@ -160,6 +161,7 @@ export default { @@ -160,6 +161,7 @@ export default {
160 this.productList = lines 161 this.productList = lines
161 }).catch(() => { }) 162 }).catch(() => { })
162 }, 163 },
  164 + downloadFile,
163 getFormValues() { 165 getFormValues() {
164 const m = this.detail || {} 166 const m = this.detail || {}
165 return JSON.parse(JSON.stringify(m)) 167 return JSON.parse(JSON.stringify(m))
@@ -205,7 +207,8 @@ export default { @@ -205,7 +207,8 @@ export default {
205 } 207 }
206 208
207 .label { 209 .label {
208 - width: 280rpx; 210 + max-width: 280rpx;
  211 + margin-right: 20rpx;
209 color: rgba(0, 0, 0, 0.6); 212 color: rgba(0, 0, 0, 0.6);
210 font-size: 28rpx; 213 font-size: 28rpx;
211 } 214 }
@@ -219,7 +222,8 @@ export default { @@ -219,7 +222,8 @@ export default {
219 } 222 }
220 223
221 .label1 { 224 .label1 {
222 - width: 280rpx; 225 + max-width: 280rpx;
  226 + margin-right: 20rpx;
223 color: rgba(0, 0, 0, 0.6); 227 color: rgba(0, 0, 0, 0.6);
224 font-size: 32rpx; 228 font-size: 32rpx;
225 } 229 }
@@ -228,7 +232,12 @@ export default { @@ -228,7 +232,12 @@ export default {
228 flex: 1; 232 flex: 1;
229 text-align: right; 233 text-align: right;
230 color: rgba(0, 0, 0, 0.9); 234 color: rgba(0, 0, 0, 0.9);
231 - font-size: 28rpx; 235 + font-size: 28rpx; text-align: right;
  236 + word-break: break-all;
  237 +
  238 + &.act {
  239 + color: $theme-primary;
  240 + }
232 } 241 }
233 242
234 .customer { 243 .customer {