|
@@ -215,7 +215,7 @@
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column align="center" title="操作" width="100">
|
|
|
<template v-slot="scope">
|
|
|
- <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
|
|
|
+ <el-button size="mini" :disabled="true" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
</vxe-table>
|
|
@@ -367,7 +367,8 @@
|
|
|
},
|
|
|
bus: {
|
|
|
get () {
|
|
|
- this.$refs.archiveFile.setDividerName('合同归档附件')
|
|
|
+ this.$refs.archiveFile.setDividerName('附件', false)
|
|
|
+ this.$refs.uploadFile.setDividerName('附件', false)
|
|
|
return this.businessId
|
|
|
},
|
|
|
set (val) {
|
|
@@ -413,8 +414,8 @@
|
|
|
this.showViewer = false
|
|
|
},
|
|
|
init (method, id) {
|
|
|
- console.log(method)
|
|
|
- console.log('id', id)
|
|
|
+ // console.log(method)
|
|
|
+ // console.log('id', id)
|
|
|
this.dataList = []
|
|
|
this.dataListNew = []
|
|
|
this.method = method
|
|
@@ -462,19 +463,27 @@
|
|
|
this.$refs.archiveFile.clearUpload()
|
|
|
this.$refs.uploadFile.clearUpload()
|
|
|
this.inputForm.contractProperList = data1.data.contractProperList
|
|
|
- console.log('data1.id', data1.data.id)
|
|
|
- console.log('data1.data.filedType', data1.data.filedType)
|
|
|
+ // console.log('data1.id', data1.data.id)
|
|
|
+ // console.log('data1.data.filedType', data1.data.filedType)
|
|
|
if ((data1.data.filedType !== '0' & data1.data.filedType !== undefined) || data1.data.id === undefined) {
|
|
|
- console.log('data1.22222')
|
|
|
+ // console.log('data1.22222')
|
|
|
+ // console.log('data1.data.contractProperList', data1.data.contractProperList)
|
|
|
+ this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
this.contractFileService.findById(this.inputForm.id).then(data2 => {
|
|
|
this.inputForm.contractProperList = data2.data.contractProperList
|
|
|
this.inputForm.contractInfoList = data2.data.contractInfoList
|
|
|
- console.log('data2', data2)
|
|
|
+ // console.log('data2', data2)
|
|
|
this.contractInfoService.findById(data2.data.contractInfoId).then(data3 => {
|
|
|
data3.data.contractProperList = this.inputForm.contractProperList
|
|
|
data3.data.contractInfoList = this.inputForm.contractInfoList
|
|
|
- this.$refs.uploadFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
|
- this.$refs.archiveFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ if (data3.data.filedType === '2' || data3.data.filedType === '5') {
|
|
|
+ // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ this.$refs.archiveFile.newUpload('view', data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ } else {
|
|
|
+ // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ this.$refs.archiveFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ }
|
|
|
+ // console.log('data3', data3)
|
|
|
this.saveData(data3.data, method)
|
|
|
if (this.formReadOnly) {
|
|
|
method = 'view'
|
|
@@ -482,7 +491,7 @@
|
|
|
})
|
|
|
})
|
|
|
} else {
|
|
|
- console.log('进来了22')
|
|
|
+ // console.log('进来了22')
|
|
|
this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
this.saveData(data1.data, method)
|
|
|
if (this.formReadOnly) {
|
|
@@ -498,7 +507,7 @@
|
|
|
// console.log(event)
|
|
|
},
|
|
|
saveData (data, method) {
|
|
|
- console.log('data', data)
|
|
|
+ // console.log('data', data)
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
},
|
|
@@ -512,7 +521,7 @@
|
|
|
this.$refs.workClientChooseForm.init()
|
|
|
},
|
|
|
getWorkClientChoose (list) {
|
|
|
- console.log('list', list)
|
|
|
+ // console.log('list', list)
|
|
|
if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
|
|
|
this.inputForm.cwWorkClientContactDTOList = []
|
|
|
}
|
|
@@ -551,7 +560,7 @@
|
|
|
if (this.status === 'startAndHoldFiled') {
|
|
|
this.inputForm.status = '5'
|
|
|
}
|
|
|
- await this.contractInfoService.save(this.inputForm)
|
|
|
+ // await this.contractInfoService.save(this.inputForm)
|
|
|
}
|
|
|
// 合同登记归档暂存
|
|
|
if (this.status === 'startAndHoldFiled') {
|
|
@@ -560,6 +569,7 @@
|
|
|
this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
|
|
|
// this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
|
|
|
this.contractFileService.save(this.inputForm)
|
|
|
+ this.contractInfoService.updateInfo(this.inputForm)
|
|
|
}
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
this.loading = false
|
|
@@ -568,18 +578,20 @@
|
|
|
},
|
|
|
// 送审
|
|
|
startForm (callback) {
|
|
|
- console.log('filedType', this.inputForm.id)
|
|
|
+ // console.log('filedType', this.inputForm.id)
|
|
|
let id = this.inputForm.id
|
|
|
this.loading = true
|
|
|
this.inputForm.status = '5'
|
|
|
- this.contractInfoService.save(this.inputForm)
|
|
|
- console.log('inputForm', this.inputForm)
|
|
|
this.inputForm.filedType = '2'
|
|
|
+ this.inputForm.contractProperList = []
|
|
|
+ this.contractInfoService.updateInfo(this.inputForm)
|
|
|
+ // console.log('inputForm', this.inputForm)
|
|
|
this.inputForm.contractInfoId = id
|
|
|
this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
|
|
|
- this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
|
|
|
+ // console.log('this.inputForm', this.inputForm)
|
|
|
+ // this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
|
|
|
this.contractFileService.save(this.inputForm).then(({data}) => {
|
|
|
- console.log('data', data)
|
|
|
+ // console.log('data', data)
|
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
this.loading = false
|
|
@@ -590,10 +602,11 @@
|
|
|
let id = this.inputForm.id
|
|
|
this.loading = true
|
|
|
this.inputForm.status = '5'
|
|
|
+ this.inputForm.filedType = '5'
|
|
|
// this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
|
|
|
+ this.inputForm.contractProperList = []
|
|
|
// console.log('this.inputForm.contractProperList', this.inputForm.contractProperList)
|
|
|
- this.contractInfoService.save(this.inputForm)
|
|
|
- this.inputForm.filedType = '5'
|
|
|
+ this.contractInfoService.updateInfo(this.inputForm)
|
|
|
this.inputForm.contractInfoId = id
|
|
|
// this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
|
|
|
this.contractFileService.save(this.inputForm).then(({data}) => {
|
|
@@ -609,6 +622,7 @@
|
|
|
this.visible = false
|
|
|
this.showVi = true
|
|
|
this.$refs.archiveFile.clearUpload()
|
|
|
+ this.$refs.uploadFile.clearUpload()
|
|
|
},
|
|
|
httpRequest (file) {
|
|
|
httpRequest(file, fileName(file), 'workContract')
|
|
@@ -713,7 +727,7 @@
|
|
|
this.visable = false
|
|
|
},
|
|
|
updateStatusById (type) {
|
|
|
- console.log('type' + type)
|
|
|
+ // console.log('type' + type)
|
|
|
if (type === 'agree') {
|
|
|
this.inputForm.filedType = '5'
|
|
|
this.contractFileService.updateStatusById(this.inputForm)
|