Commit 111391560be650bbf0ff5260e38c7b78c99304cc
Merge branch 'cjerp-1.0' of http://gitlab.qgutech.com/zhuyuanliang/erp-mobile into cjerp-1.0
Showing
2 changed files
with
42 additions
and
16 deletions
| @@ -86,7 +86,7 @@ | @@ -86,7 +86,7 @@ | ||
| 86 | <uni-popup ref="uploadPopup" type="bottom" :mask-click="false" :safe-area="true"> | 86 | <uni-popup ref="uploadPopup" type="bottom" :mask-click="false" :safe-area="true"> |
| 87 | <view class="upload-dialog"> | 87 | <view class="upload-dialog"> |
| 88 | <view class="upload-header"> | 88 | <view class="upload-header"> |
| 89 | - <text class="title">上传规范性合同</text> | 89 | + <text class="title">{{ uploadType === 'seal' ? '上传双方盖章合同' : '上传规范性合同' }}</text> |
| 90 | <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22" | 90 | <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22" |
| 91 | @click="$refs.uploadPopup.close()" /> | 91 | @click="$refs.uploadPopup.close()" /> |
| 92 | </view> | 92 | </view> |
| @@ -96,7 +96,7 @@ | @@ -96,7 +96,7 @@ | ||
| 96 | <FileUpload v-model="fileInfo" /> | 96 | <FileUpload v-model="fileInfo" /> |
| 97 | </view> | 97 | </view> |
| 98 | <view v-if="fileInfo && fileInfo.name" class="upload-show">{{ fileInfo.name }}</view> | 98 | <view v-if="fileInfo && fileInfo.name" class="upload-show">{{ fileInfo.name }}</view> |
| 99 | - <view class="row1" @click="openStandardizedSheet"> | 99 | + <view class="row1" @click="openStandardizedSheet" v-if="uploadType !== 'seal'"> |
| 100 | <view class="label1">合同是否规范</view> | 100 | <view class="label1">合同是否规范</view> |
| 101 | <uni-icons type="right" size="18" v-if="!standardStandardizedName"></uni-icons> | 101 | <uni-icons type="right" size="18" v-if="!standardStandardizedName"></uni-icons> |
| 102 | <view class="value" v-else>{{ standardStandardizedName }}</view> | 102 | <view class="value" v-else>{{ standardStandardizedName }}</view> |
| @@ -113,7 +113,7 @@ | @@ -113,7 +113,7 @@ | ||
| 113 | </template> | 113 | </template> |
| 114 | 114 | ||
| 115 | <script> | 115 | <script> |
| 116 | -import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract } from '@/api/contract' | 116 | +import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile } from '@/api/contract' |
| 117 | import ProductRel from './productRel.vue' | 117 | import ProductRel from './productRel.vue' |
| 118 | import DetailButtons from '@/components/detail-buttons/index.vue' | 118 | import DetailButtons from '@/components/detail-buttons/index.vue' |
| 119 | import FileUpload from '@/components/file-upload/index.vue' | 119 | import FileUpload from '@/components/file-upload/index.vue' |
| @@ -246,6 +246,12 @@ export default { | @@ -246,6 +246,12 @@ export default { | ||
| 246 | variant: 'primary', | 246 | variant: 'primary', |
| 247 | event: 'auditDetail3' | 247 | event: 'auditDetail3' |
| 248 | }, | 248 | }, |
| 249 | + { | ||
| 250 | + text: '上传双方盖章合同', | ||
| 251 | + visible: true, | ||
| 252 | + variant: 'outline', | ||
| 253 | + event: 'uploadSeal' | ||
| 254 | + }, | ||
| 249 | ], | 255 | ], |
| 250 | } | 256 | } |
| 251 | }, | 257 | }, |
| @@ -270,6 +276,7 @@ export default { | @@ -270,6 +276,7 @@ export default { | ||
| 270 | { ...this.buttons[9], visible: (s === 'FORMAL' && t) }, | 276 | { ...this.buttons[9], visible: (s === 'FORMAL' && t) }, |
| 271 | { ...this.buttons[10], visible: (s === 'STANDARD' && t) }, | 277 | { ...this.buttons[10], visible: (s === 'STANDARD' && t) }, |
| 272 | { ...this.buttons[11], visible: (s === 'STANDARD' && a) }, | 278 | { ...this.buttons[11], visible: (s === 'STANDARD' && a) }, |
| 279 | + { ...this.buttons[12], visible: (s === 'STANDARD') }, | ||
| 273 | ] | 280 | ] |
| 274 | } | 281 | } |
| 275 | }, | 282 | }, |
| @@ -326,14 +333,19 @@ export default { | @@ -326,14 +333,19 @@ export default { | ||
| 326 | }) | 333 | }) |
| 327 | return | 334 | return |
| 328 | } | 335 | } |
| 329 | - if (!this.standardStandardized) { | 336 | + if (!this.standardStandardized && this.uploadType !== 'seal') { |
| 330 | uni.showToast({ | 337 | uni.showToast({ |
| 331 | title: '请选择合同是否规范', | 338 | title: '请选择合同是否规范', |
| 332 | icon: 'error' | 339 | icon: 'error' |
| 333 | }) | 340 | }) |
| 334 | return | 341 | return |
| 335 | } | 342 | } |
| 336 | - const data = this.uploadType === 'formal' ? { | 343 | + const data = this.uploadType === 'seal' ? |
| 344 | + { | ||
| 345 | + id: this.id, | ||
| 346 | + signedContractFileId: this.fileInfo.id, | ||
| 347 | + signedContractFileName: this.fileInfo.name, | ||
| 348 | + } :this.uploadType === 'formal' ? { | ||
| 337 | id: this.id, | 349 | id: this.id, |
| 338 | formalFileId: this.fileInfo.id, | 350 | formalFileId: this.fileInfo.id, |
| 339 | formalFileName: this.fileInfo.name, | 351 | formalFileName: this.fileInfo.name, |
| @@ -344,15 +356,15 @@ export default { | @@ -344,15 +356,15 @@ export default { | ||
| 344 | standardFileName: this.fileInfo.name, | 356 | standardFileName: this.fileInfo.name, |
| 345 | standardStandardized: this.standardStandardized | 357 | standardStandardized: this.standardStandardized |
| 346 | } | 358 | } |
| 347 | - const api = this.uploadType === 'formal' ? uploadFormalContract : uploadStandardContract | 359 | + const api = this.uploadType === 'seal' ? uploadSignedContractFile : this.uploadType === 'formal' ? uploadFormalContract : uploadStandardContract |
| 348 | uni.showModal({ | 360 | uni.showModal({ |
| 349 | title: '确认提交', | 361 | title: '确认提交', |
| 350 | - content: this.uploadType === 'formal' ? '确定提交正式合同吗?' : '确定提交标准合同吗?', | 362 | + content: this.uploadType === 'seal' ? '确定提交双方盖章合同吗?' : this.uploadType === 'formal' ? '确定提交正式合同吗?' : '确定提交标准合同吗?', |
| 351 | success: (res) => { | 363 | success: (res) => { |
| 352 | if (res.confirm) { | 364 | if (res.confirm) { |
| 353 | api({ ...this.detail, ...data }).then(() => { | 365 | api({ ...this.detail, ...data }).then(() => { |
| 354 | uni.showToast({ | 366 | uni.showToast({ |
| 355 | - title: this.uploadType === 'formal' ? '上传正式合同成功' : '上传标准合同成功', | 367 | + title: this.uploadType === 'seal' ? '上传双方盖章合同成功' : this.uploadType === 'formal' ? '上传正式合同成功' : '上传标准合同成功', |
| 356 | icon: 'success' | 368 | icon: 'success' |
| 357 | }) | 369 | }) |
| 358 | setTimeout(() => { | 370 | setTimeout(() => { |
| @@ -402,6 +414,8 @@ export default { | @@ -402,6 +414,8 @@ export default { | ||
| 402 | if (e === 'auditDetail1') return this.onAuditDetail(this.detail.id || '', 'FORMAL_CONTRACT') | 414 | if (e === 'auditDetail1') return this.onAuditDetail(this.detail.id || '', 'FORMAL_CONTRACT') |
| 403 | if (e === 'auditDetail2') return this.onAuditDetail(this.detail.parentId || '', 'FORMAL_CONTRACT') | 415 | if (e === 'auditDetail2') return this.onAuditDetail(this.detail.parentId || '', 'FORMAL_CONTRACT') |
| 404 | if (e === 'auditDetail3') return this.onAuditDetail(this.detail.id || '', 'STANDARD_CONTRACT') | 416 | if (e === 'auditDetail3') return this.onAuditDetail(this.detail.id || '', 'STANDARD_CONTRACT') |
| 417 | + if (e === 'uploadSeal') return this.uploadContract(this.detail.id || '', 'seal') | ||
| 418 | + | ||
| 405 | }, | 419 | }, |
| 406 | onAudit(id, type) { | 420 | onAudit(id, type) { |
| 407 | const CACHE_KEY = 'sourceBusinessId' | 421 | const CACHE_KEY = 'sourceBusinessId' |
| @@ -87,7 +87,7 @@ | @@ -87,7 +87,7 @@ | ||
| 87 | <uni-popup ref="uploadPopup" type="bottom" :mask-click="false" :safe-area="true"> | 87 | <uni-popup ref="uploadPopup" type="bottom" :mask-click="false" :safe-area="true"> |
| 88 | <view class="upload-dialog"> | 88 | <view class="upload-dialog"> |
| 89 | <view class="upload-header"> | 89 | <view class="upload-header"> |
| 90 | - <text class="title">上传规范性合同</text> | 90 | + <text class="title">{{ uploadType === 'seal' ? '上传双方盖章合同' : '上传规范性合同' }}</text> |
| 91 | <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22" | 91 | <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22" |
| 92 | @click="$refs.uploadPopup.close()" /> | 92 | @click="$refs.uploadPopup.close()" /> |
| 93 | </view> | 93 | </view> |
| @@ -97,7 +97,7 @@ | @@ -97,7 +97,7 @@ | ||
| 97 | <FileUpload v-model="fileInfo" /> | 97 | <FileUpload v-model="fileInfo" /> |
| 98 | </view> | 98 | </view> |
| 99 | <view v-if="fileInfo && fileInfo.name" class="upload-show">{{ fileInfo.name }}</view> | 99 | <view v-if="fileInfo && fileInfo.name" class="upload-show">{{ fileInfo.name }}</view> |
| 100 | - <view class="row1" @click="openStandardizedSheet"> | 100 | + <view class="row1" @click="openStandardizedSheet" v-if="uploadType !== 'seal'"> |
| 101 | <view class="label1">合同是否规范</view> | 101 | <view class="label1">合同是否规范</view> |
| 102 | <uni-icons type="right" size="18" v-if="!standardStandardizedName"></uni-icons> | 102 | <uni-icons type="right" size="18" v-if="!standardStandardizedName"></uni-icons> |
| 103 | <view class="value" v-else>{{ standardStandardizedName }}</view> | 103 | <view class="value" v-else>{{ standardStandardizedName }}</view> |
| @@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
| 114 | </template> | 114 | </template> |
| 115 | 115 | ||
| 116 | <script> | 116 | <script> |
| 117 | -import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract } from '@/api/contract' | 117 | +import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile } from '@/api/contract' |
| 118 | import ProductRel from './productRel.vue' | 118 | import ProductRel from './productRel.vue' |
| 119 | import DetailButtons from '@/components/detail-buttons/index.vue' | 119 | import DetailButtons from '@/components/detail-buttons/index.vue' |
| 120 | import FileUpload from '@/components/file-upload/index.vue' | 120 | import FileUpload from '@/components/file-upload/index.vue' |
| @@ -252,6 +252,12 @@ export default { | @@ -252,6 +252,12 @@ export default { | ||
| 252 | variant: 'primary', | 252 | variant: 'primary', |
| 253 | event: 'auditDetail3' | 253 | event: 'auditDetail3' |
| 254 | }, | 254 | }, |
| 255 | + { | ||
| 256 | + text: '上传双方盖章合同附件', | ||
| 257 | + visible: true, | ||
| 258 | + variant: 'outline', | ||
| 259 | + event: 'uploadSeal' | ||
| 260 | + }, | ||
| 255 | ], | 261 | ], |
| 256 | } | 262 | } |
| 257 | }, | 263 | }, |
| @@ -277,6 +283,7 @@ export default { | @@ -277,6 +283,7 @@ export default { | ||
| 277 | { ...this.buttons[10], visible: (s === 'FORMAL' && a) }, //正式合同审核详情 | 283 | { ...this.buttons[10], visible: (s === 'FORMAL' && a) }, //正式合同审核详情 |
| 278 | { ...this.buttons[11], visible: (s === 'STANDARD' && a) }, //正式合同审核详情 | 284 | { ...this.buttons[11], visible: (s === 'STANDARD' && a) }, //正式合同审核详情 |
| 279 | { ...this.buttons[12], visible: (s === 'STANDARD' && t) }, //标准合同审核详情 | 285 | { ...this.buttons[12], visible: (s === 'STANDARD' && t) }, //标准合同审核详情 |
| 286 | + { ...this.buttons[13], visible: (s === 'STANDARD') }, //上传双方盖章合同附件 | ||
| 280 | ] | 287 | ] |
| 281 | } | 288 | } |
| 282 | }, | 289 | }, |
| @@ -343,14 +350,18 @@ export default { | @@ -343,14 +350,18 @@ export default { | ||
| 343 | }) | 350 | }) |
| 344 | return | 351 | return |
| 345 | } | 352 | } |
| 346 | - if (!this.standardStandardized) { | 353 | + if (!this.standardStandardized && this.uploadType !== 'seal') { |
| 347 | uni.showToast({ | 354 | uni.showToast({ |
| 348 | title: '请选择合同是否规范', | 355 | title: '请选择合同是否规范', |
| 349 | icon: 'error' | 356 | icon: 'error' |
| 350 | }) | 357 | }) |
| 351 | return | 358 | return |
| 352 | } | 359 | } |
| 353 | - const data = this.uploadType === 'formal' ? { | 360 | + const data = this.uploadType === 'seal' ? { |
| 361 | + id: this.id, | ||
| 362 | + signedContractFileId: this.fileInfo.id, | ||
| 363 | + signedContractFileName: this.fileInfo.name, | ||
| 364 | + } : this.uploadType === 'formal' ? { | ||
| 354 | id: this.id, | 365 | id: this.id, |
| 355 | formalFileId: this.fileInfo.id, | 366 | formalFileId: this.fileInfo.id, |
| 356 | formalFileName: this.fileInfo.name, | 367 | formalFileName: this.fileInfo.name, |
| @@ -361,15 +372,15 @@ export default { | @@ -361,15 +372,15 @@ export default { | ||
| 361 | standardFileName: this.fileInfo.name, | 372 | standardFileName: this.fileInfo.name, |
| 362 | standardStandardized: this.standardStandardized | 373 | standardStandardized: this.standardStandardized |
| 363 | } | 374 | } |
| 364 | - const api = this.uploadType === 'formal' ? uploadFormalContract : uploadStandardContract | 375 | + const api = this.uploadType === 'seal' ? uploadSignedContractFile : this.uploadType === 'formal' ? uploadFormalContract : uploadStandardContract |
| 365 | uni.showModal({ | 376 | uni.showModal({ |
| 366 | title: '确认提交', | 377 | title: '确认提交', |
| 367 | - content: this.uploadType === 'formal' ? '确定提交正式合同吗?' : '确定提交标准合同吗?', | 378 | + content: this.uploadType === 'formal' ? '确定提交正式合同吗?' : this.uploadType === 'seal' ? '确定提交双方盖章合同吗?' : '确定提交标准合同吗?', |
| 368 | success: (res) => { | 379 | success: (res) => { |
| 369 | if (res.confirm) { | 380 | if (res.confirm) { |
| 370 | api({ ...this.detail, ...data }).then(() => { | 381 | api({ ...this.detail, ...data }).then(() => { |
| 371 | uni.showToast({ | 382 | uni.showToast({ |
| 372 | - title: this.uploadType === 'formal' ? '上传正式合同成功' : '上传标准合同成功', | 383 | + title: this.uploadType === 'seal' ? '上传双方盖章合同成功' : this.uploadType === 'formal' ? '上传正式合同成功' : '上传标准合同成功', |
| 373 | icon: 'success' | 384 | icon: 'success' |
| 374 | }) | 385 | }) |
| 375 | setTimeout(() => { | 386 | setTimeout(() => { |
| @@ -415,6 +426,7 @@ export default { | @@ -415,6 +426,7 @@ export default { | ||
| 415 | if (e === 'auditDetail1') return this.onAuditDetail(this.detail.id || '', 'FORMAL_CONTRACT') | 426 | if (e === 'auditDetail1') return this.onAuditDetail(this.detail.id || '', 'FORMAL_CONTRACT') |
| 416 | if (e === 'auditDetail2') return this.onAuditDetail(this.detail.parentId || '', 'FORMAL_CONTRACT') | 427 | if (e === 'auditDetail2') return this.onAuditDetail(this.detail.parentId || '', 'FORMAL_CONTRACT') |
| 417 | if (e === 'auditDetail3') return this.onAuditDetail(this.detail.id || '', 'STANDARD_CONTRACT') | 428 | if (e === 'auditDetail3') return this.onAuditDetail(this.detail.id || '', 'STANDARD_CONTRACT') |
| 429 | + if (e === 'uploadSeal') return this.uploadContract(this.detail.id || '', 'seal') | ||
| 418 | }, | 430 | }, |
| 419 | onAudit(id, type) { | 431 | onAudit(id, type) { |
| 420 | const CACHE_KEY = 'sourceBusinessId' | 432 | const CACHE_KEY = 'sourceBusinessId' |