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

修改

parent 1c554f7b
...@@ -55,7 +55,7 @@ export const constantRoutes = [ ...@@ -55,7 +55,7 @@ export const constantRoutes = [
{ {
path: '/contract/manage/:type', path: '/contract/manage/:type',
name: 'contractManage'.toLocaleUpperCase(), name: 'contractManage'.toLocaleUpperCase(),
component: () => import('@/views/list/add'), component: () => import('@/views/list/detail'),
meta: { title: '修改合同信息' } meta: { title: '修改合同信息' }
}, },
{ {
......
...@@ -1447,6 +1447,7 @@ ...@@ -1447,6 +1447,7 @@
<el-table-column label="附件名称"> <el-table-column label="附件名称">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span>{{ row.FILENAME }}</span> <span>{{ row.FILENAME }}</span>
<span v-if="showError === true" style="color:#f52929;">请上传文件</span>
<!-- <el-input v-model="row.FILENAME" placeholder="请输入" disabled />--> <!-- <el-input v-model="row.FILENAME" placeholder="请输入" disabled />-->
</template> </template>
</el-table-column> </el-table-column>
...@@ -1521,6 +1522,7 @@ export default { ...@@ -1521,6 +1522,7 @@ export default {
showCode: false, showCode: false,
PROJNAMEDisabled: false, PROJNAMEDisabled: false,
hiddenModular: false, hiddenModular: false,
showError: false,
form: { form: {
SPXX: [ SPXX: [
{ EXAMDATE: '' } { EXAMDATE: '' }
...@@ -2005,10 +2007,6 @@ export default { ...@@ -2005,10 +2007,6 @@ export default {
this.form.BZJXX.splice(i, 1) this.form.BZJXX.splice(i, 1)
}, },
delFile(i, row) { delFile(i, row) {
if (i === 1) {
row.FILENAME = ''
}
this.form.FJXX.splice(i, 1)
this.$axios.delete('http://117.122.212.101:8090/contractjxx/contract-fjxx/realDeleteByBusinessId/' + row.BUSINESSID).then(res => { this.$axios.delete('http://117.122.212.101:8090/contractjxx/contract-fjxx/realDeleteByBusinessId/' + row.BUSINESSID).then(res => {
// eslint-disable-next-line no-empty // eslint-disable-next-line no-empty
if (!res.errno) {} if (!res.errno) {}
...@@ -2016,6 +2014,13 @@ export default { ...@@ -2016,6 +2014,13 @@ export default {
.catch(function(error) { .catch(function(error) {
console.log(error) console.log(error)
}) })
if (i === 0) {
this.form.FJXX[0].FILENAME = ''
this.form.FJXX[0].BUSINESSID = ''
this.form.FJXX[0].FILESAVENAME = ''
} else {
this.form.FJXX.splice(i, 1)
}
}, },
tabClick(ref) { tabClick(ref) {
document.getElementById(ref.name) && document.getElementById(ref.name).scrollIntoView({ document.getElementById(ref.name) && document.getElementById(ref.name).scrollIntoView({
...@@ -2066,79 +2071,86 @@ export default { ...@@ -2066,79 +2071,86 @@ 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)
this.$refs['form'].validate(valide => { if (this.form.FJXX[0].FILENAME === '') {
if (valide) { this.showError = true
if (this.$route.query.type === 'add') { } else {
this.$axios({ this.showError = false
method: 'post', this.$refs['form'].validate(valide => {
url: 'http://117.122.212.101:8090/contract/contract/add', if (valide) {
data: this.form }) if (this.$route.query.type === 'add') {
.then((res) => { this.$axios({
if (res.data.code === '200') { method: 'post',
this.$message({ url: 'http://117.122.212.101:8090/contract/contract/add',
type: 'success', data: this.form
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://117.122.212.101: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) => { .then((res) => {
return err 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://117.122.212.101: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
})
}
} }
} })
}) }
}, },
parentScroll(e) { parentScroll(e) {
const target = e.target const target = e.target
......
...@@ -417,7 +417,7 @@ obj=this.typeform*/ ...@@ -417,7 +417,7 @@ obj=this.typeform*/
} else if (res.data.code === '4000') { } else if (res.data.code === '4000') {
this.$message({ this.$message({
type: 'warning', type: 'warning',
message: res.data.msg message: '其他异常'
}) })
} }
this.findContract() this.findContract()
......
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