|
|
@@ -1679,6 +1679,7 @@
|
|
|
.catch(() => {})
|
|
|
},
|
|
|
companySubmitToSecUnitSeparate () {
|
|
|
+ this.saveinfochange(1)
|
|
|
if (this.UnitOrg === '') {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -1696,30 +1697,37 @@
|
|
|
this.entityForm.auditer = this.UnitOrg
|
|
|
this.entityForm.MInfoId = this.MInfoId
|
|
|
this.btnloading = true
|
|
|
- let params = {
|
|
|
- unitId: this.UnitOrg,
|
|
|
- AuditRemark: this.entityForm.Remark
|
|
|
- }
|
|
|
- api.companyAuditEntity(this.MInfoId, params, this.$axios).then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- // 保存成功后,初始化数据,变成修改
|
|
|
- this.initDatas()
|
|
|
- this.$router.push('/oilsupplier/infochangech')
|
|
|
- this.ComAuditdialogShow = false
|
|
|
- this.butnab = true
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
+ this.saveinfochange(1).then(val => {
|
|
|
+ console.log(val,'222222')
|
|
|
+ if (val) {
|
|
|
+ let params = {
|
|
|
+ unitId: this.UnitOrg,
|
|
|
+ AuditRemark: this.entityForm.Remark
|
|
|
+ }
|
|
|
+ api.companyAuditEntity(this.MInfoId, params, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
+ this.initDatas()
|
|
|
+ this.$router.push('/oilsupplier/infochangech')
|
|
|
+ this.ComAuditdialogShow = false
|
|
|
+ this.butnab = true
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.btnloading = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
})
|
|
|
} else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
+ this.btnloading = false
|
|
|
}
|
|
|
- this.btnloading = false
|
|
|
- }).catch(err => {
|
|
|
- console.error(err)
|
|
|
})
|
|
|
},
|
|
|
setAuditerFen (val, name) {
|
|
|
@@ -2559,53 +2567,59 @@
|
|
|
},
|
|
|
// 保存信息变更数据
|
|
|
saveinfochange (val) {
|
|
|
- this.saveLoading = true
|
|
|
- let v1 = false
|
|
|
- let v2 = false
|
|
|
- this.$refs['formData'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- v1 = true
|
|
|
- }
|
|
|
- })
|
|
|
- this.$refs['EntityFormCert'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- v2 = true
|
|
|
- }
|
|
|
- })
|
|
|
- if (v1 && v2) {
|
|
|
- supplierapi.checkBack(this.formData.BankAccount, this.formData.Id, this.$axios).then(res => {
|
|
|
- if (res.data.item) {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '该银行账号与其他公司重复'
|
|
|
- })
|
|
|
- this.saveLoading = false
|
|
|
- } else {
|
|
|
- // 供应商类型变更时检查是否缺少资质
|
|
|
- let fileType = {
|
|
|
- Type: this.formData.OperType === '制造商' ? 1 : 2,
|
|
|
- SupplierId: this.formData.Id
|
|
|
- }
|
|
|
- supplierapi.checkCertFileForSupTypeChange(fileType, this.$axios).then(res => {
|
|
|
- if (res.data.code === 1) {
|
|
|
- this.addInfoChangeItemCh(val)
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- this.saveLoading = false
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ this.saveLoading = true
|
|
|
+ let v1 = false
|
|
|
+ let v2 = false
|
|
|
+ this.$refs['formData'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ v1 = true
|
|
|
}
|
|
|
- }).catch(err => {
|
|
|
- this.saveLoading = false
|
|
|
- console.error(err)
|
|
|
})
|
|
|
- } else {
|
|
|
- this.saveLoading = false
|
|
|
- }
|
|
|
+ this.$refs['EntityFormCert'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ v2 = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (v1 && v2) {
|
|
|
+ supplierapi.checkBack(this.formData.BankAccount, this.formData.Id, this.$axios).then(res => {
|
|
|
+ if (res.data.item) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '该银行账号与其他公司重复'
|
|
|
+ })
|
|
|
+ this.saveLoading = false
|
|
|
+ resolve(false)
|
|
|
+ } else {
|
|
|
+ // 供应商类型变更时检查是否缺少资质
|
|
|
+ let fileType = {
|
|
|
+ Type: this.formData.OperType === '制造商' ? 1 : 2,
|
|
|
+ SupplierId: this.formData.Id
|
|
|
+ }
|
|
|
+ supplierapi.checkCertFileForSupTypeChange(fileType, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 1) {
|
|
|
+ this.addInfoChangeItemCh(val)
|
|
|
+ resolve(true)
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ this.saveLoading = false
|
|
|
+ resolve(false)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ this.saveLoading = false
|
|
|
+ console.error(err)
|
|
|
+ resolve(false)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.saveLoading = false
|
|
|
+ resolve(false)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
addInfoChangeItemCh (val) {
|
|
|
let AllInfochangeItemList = {
|
|
|
@@ -2624,8 +2638,8 @@
|
|
|
})
|
|
|
} else {
|
|
|
// val等于1 说明是提交时保存,保存通过后再弹框
|
|
|
- this.getFirAuditerByDept()
|
|
|
- this.commitshow = true
|
|
|
+ // this.getFirAuditerByDept()
|
|
|
+ // this.commitshow = true
|
|
|
}
|
|
|
this.saveLoading = false
|
|
|
} else {
|
|
|
@@ -2711,14 +2725,13 @@
|
|
|
},
|
|
|
// 二级分办单位替企业申请:
|
|
|
separateUnitSubmitApplyBtn () {
|
|
|
- this.saveinfochange(1)
|
|
|
- // this.getFirAuditerByDept()
|
|
|
- // this.commitshow = true
|
|
|
+ // this.saveinfochange(1)
|
|
|
+ this.getFirAuditerByDept()
|
|
|
+ this.commitshow = true
|
|
|
},
|
|
|
// 二级分办单位提交审批
|
|
|
separateUnitSubmitAuditMakeSure () {
|
|
|
console.log('二级分办单位,确认提交审批')
|
|
|
- this.saveinfochange(1)
|
|
|
if (this.auditer === '') {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -2733,35 +2746,42 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- this.entityForm.fushenauditer = this.fushenauditer
|
|
|
- this.entityForm.auditer = this.auditer
|
|
|
- this.entityForm.MInfoId = this.MInfoId
|
|
|
- let params = {
|
|
|
- FirstAudit: this.auditer,
|
|
|
- SecondAudit: this.fushenauditer,
|
|
|
- AuditRemark: this.entityForm.Remark
|
|
|
- }
|
|
|
this.btnloading = true
|
|
|
- api.separateUnitAuditEntity(this.MInfoId, params, this.$axios).then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- // 保存成功后,初始化数据,变成修改
|
|
|
- this.initDatas()
|
|
|
- this.$router.push('/oilsupplier/infochangech')
|
|
|
- this.commitshow = false
|
|
|
- this.butnab = true
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
+ this.saveinfochange(1).then(val => {
|
|
|
+ console.log(val,'222222')
|
|
|
+ if (val) {
|
|
|
+ this.entityForm.fushenauditer = this.fushenauditer
|
|
|
+ this.entityForm.auditer = this.auditer
|
|
|
+ this.entityForm.MInfoId = this.MInfoId
|
|
|
+ let params = {
|
|
|
+ FirstAudit: this.auditer,
|
|
|
+ SecondAudit: this.fushenauditer,
|
|
|
+ AuditRemark: this.entityForm.Remark
|
|
|
+ }
|
|
|
+ api.separateUnitAuditEntity(this.MInfoId, params, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
+ this.initDatas()
|
|
|
+ this.$router.push('/oilsupplier/infochangech')
|
|
|
+ this.commitshow = false
|
|
|
+ this.butnab = true
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.btnloading = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
})
|
|
|
} else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
+ this.btnloading = false
|
|
|
}
|
|
|
- this.btnloading = false
|
|
|
- }).catch(err => {
|
|
|
- console.error(err)
|
|
|
})
|
|
|
},
|
|
|
// 删除信息变更项
|