Commit a09968d4 authored by 张伯涛's avatar 张伯涛

修改

parent b9c605db
...@@ -1860,7 +1860,7 @@ export default { ...@@ -1860,7 +1860,7 @@ export default {
this.PROJNAMEDisabled = false this.PROJNAMEDisabled = false
this.checked = false this.checked = false
} }
if (this.form.PARTIESAUTHORIZED !== '') { if (this.form.PARTIESAUTHORIZED !== '' && this.form.PARTIESAUTHORIZED !== null) {
this.$set(this.form, 'SignOptions', []) this.$set(this.form, 'SignOptions', [])
const signList = this.form.PARTIESAUTHORIZED.split(',') const signList = this.form.PARTIESAUTHORIZED.split(',')
for (let j = 0, h = signList.length; j < h; j++) { for (let j = 0, h = signList.length; j < h; j++) {
...@@ -1876,7 +1876,7 @@ export default { ...@@ -1876,7 +1876,7 @@ export default {
} }
if (this.form.HTDFXX.length > 0) { if (this.form.HTDFXX.length > 0) {
for (let i = 0, l = this.form.HTDFXX.length; i < l; i++) { for (let i = 0, l = this.form.HTDFXX.length; i < l; i++) {
if (this.form.HTDFXX[i].AUTHORIZEDNAME === null) { if (this.form.HTDFXX[i].AUTHORIZEDNAME === null || this.form.HTDFXX[i].AUTHORIZEDNAME === '') {
this.form.HTDFXX[i].AUTHORIZEDNAME = '()' this.form.HTDFXX[i].AUTHORIZEDNAME = '()'
} }
this.form.HTDFXX[i].listHTDFXX = this.form.HTDFXX[i].AUTHORIZEDNAME.split(',') this.form.HTDFXX[i].listHTDFXX = this.form.HTDFXX[i].AUTHORIZEDNAME.split(',')
...@@ -2074,6 +2074,10 @@ export default { ...@@ -2074,6 +2074,10 @@ export default {
this.form.HTDFXX[i].incomeArray.push({ AUTHORIZEDNAMEChild: '', accessIdentify: '' }) this.form.HTDFXX[i].incomeArray.push({ AUTHORIZEDNAMEChild: '', accessIdentify: '' })
}, },
addSign() { addSign() {
if (this.form.SignOptions === undefined) {
this.$set(this.form, 'SignOptions', [])
}
console.log('看看看看', this.form.SignOptions)
this.form.SignOptions.push({ signName: '', sianID: '' }) this.form.SignOptions.push({ signName: '', sianID: '' })
}, },
delSign(index3) { delSign(index3) {
...@@ -2168,8 +2172,10 @@ export default { ...@@ -2168,8 +2172,10 @@ export default {
console.log('保存数据啊啊啊啊', this.form.HTDFXX) console.log('保存数据啊啊啊啊', this.form.HTDFXX)
if (this.form.HTDFXX.length > 0) { if (this.form.HTDFXX.length > 0) {
for (let i = 0, l = this.form.HTDFXX.length; i < l; i++) { for (let i = 0, l = this.form.HTDFXX.length; i < l; i++) {
this.form.HTDFXX[i].AUTHORIZEDNAME = if (this.form.HTDFXX[i].incomeArray !== undefined) {
this.form.HTDFXX[i].AUTHORIZEDNAME =
this.form.HTDFXX[i].incomeArray.map(item => item.AUTHORIZEDNAMEChild + '(' + item.accessIdentify + ')').join(',') this.form.HTDFXX[i].incomeArray.map(item => item.AUTHORIZEDNAMEChild + '(' + item.accessIdentify + ')').join(',')
}
} }
} }
if (this.form.SignOptions !== undefined && this.form.SignOptions !== [] && this.form.SignOptions.length > 0) { if (this.form.SignOptions !== undefined && this.form.SignOptions !== [] && this.form.SignOptions.length > 0) {
...@@ -2179,9 +2185,7 @@ export default { ...@@ -2179,9 +2185,7 @@ export default {
const formJson = JSON.stringify(this.form) const formJson = JSON.stringify(this.form)
console.log('审批', this.form.SPXX) console.log('审批', this.form.SPXX)
console.log('全部参数', formJson) console.log('全部参数', formJson)
if (this.form.FJXX[0].FILENAME === '') { if (this.form.FJXX.length <= 0) {
this.showError = true
} else {
this.showError = false this.showError = false
this.$refs['form'].validate((valide, object) => { this.$refs['form'].validate((valide, object) => {
if (valide) { if (valide) {
...@@ -2260,6 +2264,89 @@ export default { ...@@ -2260,6 +2264,89 @@ export default {
this.scrollView(object) this.scrollView(object)
} }
}) })
} else if (this.form.FJXX.length > 0) {
if (this.form.FJXX[0].FILENAME === '') {
this.showError = true
} else {
this.showError = false
this.$refs['form'].validate((valide, object) => {
if (valide) {
if (this.$route.query.type === 'add') {
this.$axios({
method: 'post',
url: 'http://10.19.103.15:8090/contract/contract/add',
data: this.form
})
.then((res) => {
if (res.data.code === '200') {
this.$message({
type: 'success',
message: '操作成功'
})
this.$router.push({
path: '/admin/list/index'
})
} else if (res.data.code === '4001') {
this.$message({
type: 'warning',
message: res.data.msg
})
} else if (res.data.code === '4000') {
this.$message({
type: 'warning',
message: res.data.msg
})
} else if (res.data.code === '1001') {
this.$message({
type: 'warning',
message: res.data.message
})
}
})
.catch((err) => {
return err
})
} else if (this.$route.query.type === 'update') {
this.$axios({
method: 'put',
url: 'http://10.19.103.15:8090/contract/contract/merge',
data: this.form
})
.then((res) => {
if (res.data.code === '200') {
this.$message({
type: 'success',
message: '操作成功'
})
this.$router.push({
path: '/admin/list/index'
})
} else if (res.data.code === '4001') {
this.$message({
type: 'warning',
message: res.data.msg
})
} else if (res.data.code === '4000') {
this.$message({
type: 'warning',
message: res.data.msg
})
} else if (res.data.code === '1001') {
this.$message({
type: 'warning',
message: res.data.message
})
}
})
.catch((err) => {
return err
})
}
} else {
this.scrollView(object)
}
})
}
} }
}, },
scrollView(object) { scrollView(object) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment