Showing
6 changed files
with
10 additions
and
7 deletions
| @@ -373,7 +373,7 @@ export default { | @@ -373,7 +373,7 @@ export default { | ||
| 373 | if (!id) return | 373 | if (!id) return |
| 374 | this.uploadId = id | 374 | this.uploadId = id |
| 375 | if ((type === 'uploadParent' || type === 'upload' )&& this.detail?.canEdit) { | 375 | if ((type === 'uploadParent' || type === 'upload' )&& this.detail?.canEdit) { |
| 376 | - const query = `?id=${encodeURIComponent(id)}&uploadType=${encodeURIComponent(type)}` | 376 | + const query = `?id=${encodeURIComponent(id)}` |
| 377 | uni.navigateTo({ | 377 | uni.navigateTo({ |
| 378 | url: '/pages/contract_foreign_stock/uploadStandard' + query | 378 | url: '/pages/contract_foreign_stock/uploadStandard' + query |
| 379 | }) | 379 | }) |
| @@ -291,7 +291,6 @@ export default { | @@ -291,7 +291,6 @@ export default { | ||
| 291 | }, | 291 | }, |
| 292 | onLoad(query) { | 292 | onLoad(query) { |
| 293 | this.id = (query && query.id) ? query.id : '' | 293 | this.id = (query && query.id) ? query.id : '' |
| 294 | - this.uploadType = (query && query.uploadType) ? query.uploadType : 'formal' | ||
| 295 | }, | 294 | }, |
| 296 | created() { | 295 | created() { |
| 297 | this.loadSuppliers() | 296 | this.loadSuppliers() |
| @@ -162,6 +162,10 @@ export default { | @@ -162,6 +162,10 @@ export default { | ||
| 162 | this.detail = { ...this.detail } | 162 | this.detail = { ...this.detail } |
| 163 | this.productList = [] | 163 | this.productList = [] |
| 164 | } | 164 | } |
| 165 | + }, | ||
| 166 | + getFormValues() { | ||
| 167 | + const m = this.detail || {} | ||
| 168 | + return JSON.parse(JSON.stringify(m)) | ||
| 165 | } | 169 | } |
| 166 | } | 170 | } |
| 167 | } | 171 | } |
| @@ -563,7 +563,7 @@ export default { | @@ -563,7 +563,7 @@ export default { | ||
| 563 | }) | 563 | }) |
| 564 | return | 564 | return |
| 565 | } | 565 | } |
| 566 | - if (!this.standardStandardized && this.standardStandardized !== false) { | 566 | + if (this.form.standardStandardized !== true && this.form.standardStandardized !== false) { |
| 567 | uni.showToast({ | 567 | uni.showToast({ |
| 568 | title: '请选择合同是否规范', | 568 | title: '请选择合同是否规范', |
| 569 | icon: 'error' | 569 | icon: 'error' |
| @@ -596,7 +596,7 @@ export default { | @@ -596,7 +596,7 @@ export default { | ||
| 596 | contractDistributorLineList: lines, | 596 | contractDistributorLineList: lines, |
| 597 | standardFileId: this.fileInfo.id, | 597 | standardFileId: this.fileInfo.id, |
| 598 | standardFileName: this.fileInfo.name, | 598 | standardFileName: this.fileInfo.name, |
| 599 | - standardStandardized: this.standardStandardized, | 599 | + standardStandardized: this.form.standardStandardized, |
| 600 | }) | 600 | }) |
| 601 | 601 | ||
| 602 | uni.showModal({ | 602 | uni.showModal({ |
| @@ -355,7 +355,7 @@ export default { | @@ -355,7 +355,7 @@ export default { | ||
| 355 | if (!id) return | 355 | if (!id) return |
| 356 | this.uploadId = id | 356 | this.uploadId = id |
| 357 | if ((type === 'uploadParent' || type === 'upload') && this.detail?.canEdit) { | 357 | if ((type === 'uploadParent' || type === 'upload') && this.detail?.canEdit) { |
| 358 | - const query = `?id=${encodeURIComponent(id)}&uploadType=${encodeURIComponent(type)}` | 358 | + const query = `?id=${encodeURIComponent(id)}` |
| 359 | uni.navigateTo({ | 359 | uni.navigateTo({ |
| 360 | url: '/pages/contract_stock/uploadStandard' + query | 360 | url: '/pages/contract_stock/uploadStandard' + query |
| 361 | }) | 361 | }) |
| @@ -292,7 +292,7 @@ export default { | @@ -292,7 +292,7 @@ export default { | ||
| 292 | }, | 292 | }, |
| 293 | onLoad(query) { | 293 | onLoad(query) { |
| 294 | this.id = (query && query.id) ? query.id : '' | 294 | this.id = (query && query.id) ? query.id : '' |
| 295 | - this.uploadType = (query && query.uploadType) ? query.uploadType : 'formal' | 295 | + // this.uploadType = (query && query.uploadType) ? query.uploadType : 'formal' |
| 296 | }, | 296 | }, |
| 297 | created() { | 297 | created() { |
| 298 | this.loadSuppliers() | 298 | this.loadSuppliers() |
| @@ -589,7 +589,7 @@ export default { | @@ -589,7 +589,7 @@ export default { | ||
| 589 | }) | 589 | }) |
| 590 | const api = this.uploadType === 'formal' ? uploadFormalContract : uploadStandardContract | 590 | const api = this.uploadType === 'formal' ? uploadFormalContract : uploadStandardContract |
| 591 | try { | 591 | try { |
| 592 | - await api(payload) | 592 | + await uploadFormalContract(payload) |
| 593 | uni.showToast({ title: '提交成功', icon: 'none' }) | 593 | uni.showToast({ title: '提交成功', icon: 'none' }) |
| 594 | setTimeout(() => { uni.redirectTo({ url: '/pages/contract_stock/index' }) }, 400) | 594 | setTimeout(() => { uni.redirectTo({ url: '/pages/contract_stock/index' }) }, 400) |
| 595 | } catch (e) { | 595 | } catch (e) { |