Commit 2a7bf4f715b4023346f01b66611da2fd869cda94

Authored by gesilong
1 parent aebde998

commit:上传合同附件 可修改信息内容

... ... @@ -373,7 +373,7 @@ export default {
373 373 if (!id) return
374 374 this.uploadId = id
375 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 377 uni.navigateTo({
378 378 url: '/pages/contract_foreign_stock/uploadStandard' + query
379 379 })
... ...
... ... @@ -291,7 +291,6 @@ export default {
291 291 },
292 292 onLoad(query) {
293 293 this.id = (query && query.id) ? query.id : ''
294   - this.uploadType = (query && query.uploadType) ? query.uploadType : 'formal'
295 294 },
296 295 created() {
297 296 this.loadSuppliers()
... ...
... ... @@ -162,6 +162,10 @@ export default {
162 162 this.detail = { ...this.detail }
163 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 563 })
564 564 return
565 565 }
566   - if (!this.standardStandardized && this.standardStandardized !== false) {
  566 + if (this.form.standardStandardized !== true && this.form.standardStandardized !== false) {
567 567 uni.showToast({
568 568 title: '请选择合同是否规范',
569 569 icon: 'error'
... ... @@ -596,7 +596,7 @@ export default {
596 596 contractDistributorLineList: lines,
597 597 standardFileId: this.fileInfo.id,
598 598 standardFileName: this.fileInfo.name,
599   - standardStandardized: this.standardStandardized,
  599 + standardStandardized: this.form.standardStandardized,
600 600 })
601 601
602 602 uni.showModal({
... ...
... ... @@ -355,7 +355,7 @@ export default {
355 355 if (!id) return
356 356 this.uploadId = id
357 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 359 uni.navigateTo({
360 360 url: '/pages/contract_stock/uploadStandard' + query
361 361 })
... ...
... ... @@ -292,7 +292,7 @@ export default {
292 292 },
293 293 onLoad(query) {
294 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 297 created() {
298 298 this.loadSuppliers()
... ... @@ -589,7 +589,7 @@ export default {
589 589 })
590 590 const api = this.uploadType === 'formal' ? uploadFormalContract : uploadStandardContract
591 591 try {
592   - await api(payload)
  592 + await uploadFormalContract(payload)
593 593 uni.showToast({ title: '提交成功', icon: 'none' })
594 594 setTimeout(() => { uni.redirectTo({ url: '/pages/contract_stock/index' }) }, 400)
595 595 } catch (e) {
... ...