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

res.data.code修改

parent ea75f264
...@@ -75,7 +75,7 @@ service.interceptors.response.use(res => { ...@@ -75,7 +75,7 @@ service.interceptors.response.use(res => {
type: 'error' type: 'error'
}) })
return Promise.reject(new Error(message)) return Promise.reject(new Error(message))
} else if (code !== 200 && code !== 'E004' && code !== '1001') { } else if (code !== 200 && code !== 'E004') {
Message({ Message({
message: message, message: message,
type: 'error', type: 'error',
......
...@@ -633,7 +633,7 @@ ...@@ -633,7 +633,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="总金额币种" prop="CURRENCY"> <el-form-item label="总金额币种" prop="CURRENCY">
<el-select filterable v-model="form.CURRENCY" placeholder="请选择"> <el-select v-model="form.CURRENCY" filterable placeholder="请选择">
<el-option <el-option
v-for="item in ZCURRENCY" v-for="item in ZCURRENCY"
:key="item.id" :key="item.id"
...@@ -828,8 +828,8 @@ ...@@ -828,8 +828,8 @@
]" ]"
> >
<el-select <el-select
filterable
v-model="form.TZXX.INVOICETYPE" v-model="form.TZXX.INVOICETYPE"
filterable
placeholder="请选择" placeholder="请选择"
style="width: 70%" style="width: 70%"
> >
...@@ -2071,7 +2071,7 @@ export default { ...@@ -2071,7 +2071,7 @@ export default {
url: 'http://117.122.212.101:8090/contract/contract/add', url: 'http://117.122.212.101:8090/contract/contract/add',
data: this.form }) data: this.form })
.then((res) => { .then((res) => {
if (!res.errno) { if (res.data.code === '200') {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功' message: '操作成功'
...@@ -2079,6 +2079,21 @@ export default { ...@@ -2079,6 +2079,21 @@ export default {
this.$router.push({ this.$router.push({
path: '/admin/list/index' 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) => { .catch((err) => {
...@@ -2090,7 +2105,7 @@ export default { ...@@ -2090,7 +2105,7 @@ export default {
url: 'http://117.122.212.101:8090/contract/contract/merge', url: 'http://117.122.212.101:8090/contract/contract/merge',
data: this.form }) data: this.form })
.then((res) => { .then((res) => {
if (!res.errno) { if (res.data.code === '200') {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功' message: '操作成功'
...@@ -2098,6 +2113,21 @@ export default { ...@@ -2098,6 +2113,21 @@ export default {
this.$router.push({ this.$router.push({
path: '/admin/list/index' 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) => { .catch((err) => {
......
...@@ -393,22 +393,18 @@ obj=this.typeform*/ ...@@ -393,22 +393,18 @@ obj=this.typeform*/
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$axios.put('http://117.122.212.101:8090/contract/contract/push/' + row.FROMID).then(res => { this.$axios.put('http://117.122.212.101:8090/contract/contract/push/' + row.FROMID).then(res => {
console.log('code值', res.data)
if (res.data.code === '200') { if (res.data.code === '200') {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '推送成功' message: '推送成功'
}) })
} else if (res.data.code === '1001') { } else if (res.data.code === '1001') {
this.errorForm.errorInformation = res.data.data.message this.errorForm.errorInformation = res.data.message
this.errorDialog = true this.errorDialog = true
} }
this.findContract() this.findContract()
}) })
}).catch(() => {
this.$message({
type: 'info',
message: '已取消推送'
})
}) })
}, },
BatchExecution() { BatchExecution() {
...@@ -420,7 +416,7 @@ obj=this.typeform*/ ...@@ -420,7 +416,7 @@ obj=this.typeform*/
if (!res.errno) { if (!res.errno) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '合同已在后台开始同步,请耐心等待' message: res.data.data
}) })
} }
}) })
......
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