|
@@ -138,8 +138,8 @@
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="合同归档审批类型" prop="contractApprovalType"
|
|
|
|
- :rules="[{required: true, message: '合同归档审批类型不能为空', trigger: 'blur'}
|
|
|
|
|
|
+ <el-form-item label="合同归档审批类型" hidden prop="contractApprovalType"
|
|
|
|
+ :rules="[
|
|
]">
|
|
]">
|
|
<el-select v-model="inputForm.contractApprovalType" placeholder="请选择" style="width:100%;">
|
|
<el-select v-model="inputForm.contractApprovalType" placeholder="请选择" style="width:100%;">
|
|
<el-option
|
|
<el-option
|
|
@@ -468,22 +468,25 @@
|
|
if ((data1.data.filedType !== '0' & data1.data.filedType !== undefined) || data1.data.id === undefined) {
|
|
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)
|
|
// console.log('data1.data.contractProperList', data1.data.contractProperList)
|
|
|
|
+ this.$refs.uploadFile.clearUpload()
|
|
this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
this.contractFileService.findById(this.inputForm.id).then(data2 => {
|
|
this.contractFileService.findById(this.inputForm.id).then(data2 => {
|
|
this.inputForm.contractProperList = data2.data.contractProperList
|
|
this.inputForm.contractProperList = data2.data.contractProperList
|
|
this.inputForm.contractInfoList = data2.data.contractInfoList
|
|
this.inputForm.contractInfoList = data2.data.contractInfoList
|
|
- // console.log('data2', data2)
|
|
|
|
|
|
+ console.log('data2', data2)
|
|
this.contractInfoService.findById(data2.data.contractInfoId).then(data3 => {
|
|
this.contractInfoService.findById(data2.data.contractInfoId).then(data3 => {
|
|
data3.data.contractProperList = this.inputForm.contractProperList
|
|
data3.data.contractProperList = this.inputForm.contractProperList
|
|
data3.data.contractInfoList = this.inputForm.contractInfoList
|
|
data3.data.contractInfoList = this.inputForm.contractInfoList
|
|
if (data3.data.filedType === '2' || data3.data.filedType === '5') {
|
|
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.uploadFile.clearUpload()
|
|
|
|
+ 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)
|
|
this.$refs.archiveFile.newUpload('view', data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
} else {
|
|
} else {
|
|
- // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
|
|
|
+ this.$refs.uploadFile.clearUpload()
|
|
|
|
+ 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)
|
|
this.$refs.archiveFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
}
|
|
}
|
|
- // console.log('data3', data3)
|
|
|
|
|
|
+ console.log('data3', data3)
|
|
this.saveData(data3.data, method)
|
|
this.saveData(data3.data, method)
|
|
if (this.formReadOnly) {
|
|
if (this.formReadOnly) {
|
|
method = 'view'
|
|
method = 'view'
|
|
@@ -492,6 +495,7 @@
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
// console.log('进来了22')
|
|
// console.log('进来了22')
|
|
|
|
+ this.$refs.uploadFile.clearUpload()
|
|
this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
this.saveData(data1.data, method)
|
|
this.saveData(data1.data, method)
|
|
if (this.formReadOnly) {
|
|
if (this.formReadOnly) {
|
|
@@ -551,70 +555,89 @@
|
|
// 表单提交
|
|
// 表单提交
|
|
// 暂存
|
|
// 暂存
|
|
async saveForm (callback) {
|
|
async saveForm (callback) {
|
|
- // 合同登记暂存
|
|
|
|
- if (this.status === 'startAndHold' || this.status === 'startAndHoldFiled') {
|
|
|
|
- this.loading = true
|
|
|
|
- if (this.status === 'startAndHold') {
|
|
|
|
- this.inputForm.status = '1'
|
|
|
|
|
|
+ if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
|
|
|
|
+ this.loading = false
|
|
|
|
+ throw new Error()
|
|
|
|
+ } else {
|
|
|
|
+ // 合同登记暂存
|
|
|
|
+ if (this.status === 'startAndHold' || this.status === 'startAndHoldFiled') {
|
|
|
|
+ this.loading = true
|
|
|
|
+ if (this.status === 'startAndHold') {
|
|
|
|
+ this.inputForm.status = '1'
|
|
|
|
+ }
|
|
|
|
+ if (this.status === 'startAndHoldFiled') {
|
|
|
|
+ this.inputForm.status = '5'
|
|
|
|
+ }
|
|
|
|
+ // await this.contractInfoService.save(this.inputForm)
|
|
}
|
|
}
|
|
|
|
+ // 合同登记归档暂存
|
|
if (this.status === 'startAndHoldFiled') {
|
|
if (this.status === 'startAndHoldFiled') {
|
|
- this.inputForm.status = '5'
|
|
|
|
|
|
+ this.inputForm.filedType = '1'
|
|
|
|
+ this.inputForm.contractInfoId = this.businessId
|
|
|
|
+ this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
|
|
|
|
+ // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
|
|
|
|
+ this.contractFileService.save(this.inputForm)
|
|
|
|
+ this.contractInfoService.updateInfo(this.inputForm)
|
|
}
|
|
}
|
|
- // await this.contractInfoService.save(this.inputForm)
|
|
|
|
- }
|
|
|
|
- // 合同登记归档暂存
|
|
|
|
- if (this.status === 'startAndHoldFiled') {
|
|
|
|
- this.inputForm.filedType = '1'
|
|
|
|
- this.inputForm.contractInfoId = this.businessId
|
|
|
|
- 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
|
|
|
|
+ this.businessId = ''
|
|
|
|
+ callback()
|
|
}
|
|
}
|
|
- this.$refs.inputForm.resetFields()
|
|
|
|
- this.loading = false
|
|
|
|
- this.businessId = ''
|
|
|
|
- callback()
|
|
|
|
},
|
|
},
|
|
// 送审
|
|
// 送审
|
|
startForm (callback) {
|
|
startForm (callback) {
|
|
- // console.log('filedType', this.inputForm.id)
|
|
|
|
- let id = this.inputForm.id
|
|
|
|
- this.loading = true
|
|
|
|
- this.inputForm.status = '5'
|
|
|
|
- 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()
|
|
|
|
- // console.log('this.inputForm', this.inputForm)
|
|
|
|
- // this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
|
|
|
|
- this.contractFileService.save(this.inputForm).then(({data}) => {
|
|
|
|
- // console.log('data', data)
|
|
|
|
- callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
|
- this.$refs.inputForm.resetFields()
|
|
|
|
|
|
+ if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
|
|
this.loading = false
|
|
this.loading = false
|
|
- })
|
|
|
|
|
|
+ throw new Error()
|
|
|
|
+ } else {
|
|
|
|
+ // console.log('filedType', this.inputForm.id)
|
|
|
|
+ let id = this.inputForm.id
|
|
|
|
+ this.loading = true
|
|
|
|
+ this.inputForm.status = '5'
|
|
|
|
+ this.inputForm.filedType = '2'
|
|
|
|
+ this.inputForm.contractProperList = []
|
|
|
|
+ if (this.inputForm.actualContractAmount === '' || this.inputForm.actualContractAmount === undefined) {
|
|
|
|
+ this.loading = false
|
|
|
|
+ throw new Error('请填写合同实际金额')
|
|
|
|
+ }
|
|
|
|
+ this.contractInfoService.updateInfo(this.inputForm)
|
|
|
|
+ // console.log('inputForm', this.inputForm)
|
|
|
|
+ this.inputForm.contractInfoId = id
|
|
|
|
+ this.inputForm.contractInfoList = this.$refs.archiveFile.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)
|
|
|
|
+ callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
|
+ this.$refs.inputForm.resetFields()
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 通过
|
|
// 通过
|
|
agreeForm (callback) {
|
|
agreeForm (callback) {
|
|
- 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.updateInfo(this.inputForm)
|
|
|
|
- this.inputForm.contractInfoId = id
|
|
|
|
- // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
|
|
|
|
- this.contractFileService.save(this.inputForm).then(({data}) => {
|
|
|
|
- callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
|
- this.$refs.inputForm.resetFields()
|
|
|
|
|
|
+ if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
|
|
this.loading = false
|
|
this.loading = false
|
|
- this.businessId = ''
|
|
|
|
- })
|
|
|
|
|
|
+ throw new Error()
|
|
|
|
+ } else {
|
|
|
|
+ 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.updateInfo(this.inputForm)
|
|
|
|
+ this.inputForm.contractInfoId = id
|
|
|
|
+ // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
|
|
|
|
+ this.contractFileService.save(this.inputForm).then(({data}) => {
|
|
|
|
+ callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
|
+ this.$refs.inputForm.resetFields()
|
|
|
|
+ this.loading = false
|
|
|
|
+ this.businessId = ''
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
close () {
|
|
close () {
|
|
this.$refs.inputForm.resetFields()
|
|
this.$refs.inputForm.resetFields()
|
|
@@ -727,19 +750,24 @@
|
|
this.visable = false
|
|
this.visable = false
|
|
},
|
|
},
|
|
updateStatusById (type) {
|
|
updateStatusById (type) {
|
|
- // console.log('type' + type)
|
|
|
|
- if (type === 'agree') {
|
|
|
|
- this.inputForm.filedType = '5'
|
|
|
|
- this.contractFileService.updateStatusById(this.inputForm)
|
|
|
|
- }
|
|
|
|
- // 驳回
|
|
|
|
- if (type === 'reject') {
|
|
|
|
- this.inputForm.filedType = '4'
|
|
|
|
- this.contractFileService.updateStatusById(this.inputForm)
|
|
|
|
- }
|
|
|
|
- if (type === 'reback') {
|
|
|
|
- this.inputForm.filedType = '3'
|
|
|
|
- this.contractFileService.updateStatusById(this.inputForm)
|
|
|
|
|
|
+ if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
|
|
|
|
+ this.loading = false
|
|
|
|
+ throw new Error()
|
|
|
|
+ } else {
|
|
|
|
+ // console.log('type' + type)
|
|
|
|
+ if (type === 'agree') {
|
|
|
|
+ this.inputForm.filedType = '5'
|
|
|
|
+ this.contractFileService.updateStatusById(this.inputForm)
|
|
|
|
+ }
|
|
|
|
+ // 驳回
|
|
|
|
+ if (type === 'reject') {
|
|
|
|
+ this.inputForm.filedType = '4'
|
|
|
|
+ this.contractFileService.updateStatusById(this.inputForm)
|
|
|
|
+ }
|
|
|
|
+ if (type === 'reback') {
|
|
|
|
+ this.inputForm.filedType = '3'
|
|
|
|
+ this.contractFileService.updateStatusById(this.inputForm)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
checkData () {
|
|
checkData () {
|