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

修改

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