|
|
@@ -2923,26 +2923,14 @@ import Viewer from 'v-viewer'
|
|
|
valid2 = valid
|
|
|
})
|
|
|
if (valid1 && valid2) {
|
|
|
- let AllInfochangeItemList = {
|
|
|
- SupplierId: this.formData.Id + '',
|
|
|
- MInfoId: this.annualId,
|
|
|
- InfochangeForm: this.infochangeItemList
|
|
|
- }
|
|
|
- annualapi.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- // 保存成功后,初始化数据,变成修改
|
|
|
- this.initDatas()
|
|
|
- if (val !== 1) {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
+ api.checkBack(this.formData.BankAccount, this.formData.Id, this.$axios).then(res => {
|
|
|
+ if (res.data.item) {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
- message: res.data.message
|
|
|
+ message: '该银行账号与其他公司重复'
|
|
|
})
|
|
|
+ } else {
|
|
|
+ this.addInfoChangeItemCh(val)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
@@ -2952,7 +2940,32 @@ import Viewer from 'v-viewer'
|
|
|
return false
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ addInfoChangeItemCh (val) {
|
|
|
+ let AllInfochangeItemList = {
|
|
|
+ SupplierId: this.formData.Id + '',
|
|
|
+ MInfoId: this.annualId,
|
|
|
+ InfochangeForm: this.infochangeItemList
|
|
|
+ }
|
|
|
+ annualapi.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
+ this.initDatas()
|
|
|
+ if (val !== 1) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
GradeChange (val) {
|
|
|
if (val === '1') {
|
|
|
this.formData.MgrUnit = '中油集团公司'
|