|
@@ -58,7 +58,7 @@
|
|
|
提交
|
|
提交
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button v-if="parseInt(IsCompanyUser) !== 1 && formData.Status <= 0" type="primary" size="mini" style="float: right;margin-left: 25px" @click="commitAudit()">
|
|
<el-button v-if="parseInt(IsCompanyUser) !== 1 && formData.Status <= 0" type="primary" size="mini" style="float: right;margin-left: 25px" @click="commitAudit()">
|
|
|
- 提交审批
|
|
|
|
|
|
|
+ 提交
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button v-if="parseInt(totalTab) >= 3 && formData.Status == 6" type="primary" size="mini" style="float: right;margin-left: 25px" @click="recallApplyClick()" :loading="recallApplyBtn">
|
|
<el-button v-if="parseInt(totalTab) >= 3 && formData.Status == 6" type="primary" size="mini" style="float: right;margin-left: 25px" @click="recallApplyClick()" :loading="recallApplyBtn">
|
|
|
撤回
|
|
撤回
|
|
@@ -1364,7 +1364,7 @@ export default {
|
|
|
let valid = true
|
|
let valid = true
|
|
|
// this
|
|
// this
|
|
|
if (this.formDataCert.Status <= 0 && this.activeName === '0') {
|
|
if (this.formDataCert.Status <= 0 && this.activeName === '0') {
|
|
|
- valid = this.saveEntity()
|
|
|
|
|
|
|
+ valid = this.saveEntity(1)
|
|
|
} else if (this.formDataCert.Status <= 0 && this.activeName === '1') {
|
|
} else if (this.formDataCert.Status <= 0 && this.activeName === '1') {
|
|
|
// valid = this.updateNumberEntity()
|
|
// valid = this.updateNumberEntity()
|
|
|
// valid = true// 没办法中的办法
|
|
// valid = true// 没办法中的办法
|
|
@@ -1530,72 +1530,79 @@ export default {
|
|
|
|
|
|
|
|
// 保存信息
|
|
// 保存信息
|
|
|
saveEntity (val) {
|
|
saveEntity (val) {
|
|
|
- let valid1 = false
|
|
|
|
|
- let valid2 = false
|
|
|
|
|
- this.$refs['BasisInfo'].$refs['EntityForm'].validate((valid) => {
|
|
|
|
|
- valid1 = valid
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- this.$refs['BasisInfo'].$refs['EntityFormCert'].validate((valid) => {
|
|
|
|
|
- valid2 = valid
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ let valid1 = false
|
|
|
|
|
+ let valid2 = false
|
|
|
|
|
+ this.$refs['BasisInfo'].$refs['EntityForm'].validate((valid) => {
|
|
|
|
|
+ valid1 = valid
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- if (valid1 && valid2) {
|
|
|
|
|
- if (!this.formData.SetupTime) {
|
|
|
|
|
- this.formData.SetupTime = null
|
|
|
|
|
- } else {
|
|
|
|
|
- this.formData.SetupTime = new Date(this.formData.SetupTime)
|
|
|
|
|
- }
|
|
|
|
|
- // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
|
|
|
|
|
- this.formData.RegCapital = parseFloat(this.formData.RegCapital)
|
|
|
|
|
- let isCompanyUser = ''
|
|
|
|
|
- if (this.authUser.Profile.IsCompanyUser === 1) {
|
|
|
|
|
- isCompanyUser = '1'
|
|
|
|
|
- }
|
|
|
|
|
- console.log(isCompanyUser, 'isCompanyUser')
|
|
|
|
|
- api.signupCommercialNo(this.formData.CommercialNo, this.formData.Id, isCompanyUser, this.$axios).then(res => {
|
|
|
|
|
- console.log(res, 'Item')
|
|
|
|
|
- if (res.data.item) {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- duration: 10000,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: '该统一社会信用代码与其他公司重复'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$refs['BasisInfo'].$refs['EntityFormCert'].validate((valid) => {
|
|
|
|
|
+ valid2 = valid
|
|
|
|
|
+ })
|
|
|
|
|
+ if (valid1 && valid2) {
|
|
|
|
|
+ if (!this.formData.SetupTime) {
|
|
|
|
|
+ this.formData.SetupTime = null
|
|
|
} else {
|
|
} else {
|
|
|
- api.checkBack(this.formData.BankAccount, this.formData.Id, this.$axios).then(res => {
|
|
|
|
|
- // console.log(res, 'checkBack')
|
|
|
|
|
- if (res.data.item) {
|
|
|
|
|
- this.$message({
|
|
|
|
|
|
|
+ this.formData.SetupTime = new Date(this.formData.SetupTime)
|
|
|
|
|
+ }
|
|
|
|
|
+ // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
|
|
|
|
|
+ this.formData.RegCapital = parseFloat(this.formData.RegCapital)
|
|
|
|
|
+ let isCompanyUser = ''
|
|
|
|
|
+ if (this.authUser.Profile.IsCompanyUser === 1) {
|
|
|
|
|
+ isCompanyUser = '1'
|
|
|
|
|
+ }
|
|
|
|
|
+ api.signupCommercialNo(this.formData.CommercialNo, this.formData.Id, isCompanyUser, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.item) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: '该统一社会信用代码与其他公司重复'
|
|
|
|
|
+ })
|
|
|
|
|
+ return resolve(false)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ api.checkBack(this.formData.BankAccount, this.formData.Id, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.item) {
|
|
|
|
|
+ this.$message({
|
|
|
duration: 10000,
|
|
duration: 10000,
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
- message: '该银行账号与其他公司重复'
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- if (!this.formData.Id || !this.certId) {
|
|
|
|
|
- if (val === 1) {
|
|
|
|
|
- this.addEntityNoInfo()
|
|
|
|
|
- } else {
|
|
|
|
|
- this.addEntity()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ message: '该银行账号与其他公司重复'
|
|
|
|
|
+ })
|
|
|
|
|
+ return resolve(false)
|
|
|
} else {
|
|
} else {
|
|
|
- if (val === 1) {
|
|
|
|
|
- this.updateEntityNoInfo()
|
|
|
|
|
|
|
+ if (!this.formData.Id || !this.certId) {
|
|
|
|
|
+ if (val === 1) {
|
|
|
|
|
+ this.addEntityNoInfo()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.addEntity()
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
- this.updateEntity()
|
|
|
|
|
|
|
+ if (val === 1) {
|
|
|
|
|
+ this.updateEntityNoInfo()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.updateEntity()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ return resolve(true)
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- })
|
|
|
|
|
- return true
|
|
|
|
|
- } else {
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ return resolve(false)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ return resolve(false)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: '请完善企业基本信息!'
|
|
|
|
|
+ })
|
|
|
|
|
+ return resolve(false)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 保存信息
|
|
// 保存信息
|
|
@@ -1750,19 +1757,18 @@ export default {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
this.formDataCert.InStyle = this.formData.InStyle
|
|
this.formDataCert.InStyle = this.formData.InStyle
|
|
|
- api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(
|
|
|
|
|
- res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- // 保存成功后,初始化数据,变成修改
|
|
|
|
|
- this.initDatas()
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
|
|
+ api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
|
|
+ this.initDatas()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
duration: 10000,
|
|
duration: 10000,
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
})
|
|
})
|
|
|
- }
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
@@ -1796,23 +1802,7 @@ export default {
|
|
|
this.chooseAuditorVisible = true
|
|
this.chooseAuditorVisible = true
|
|
|
},
|
|
},
|
|
|
commitAudit () {
|
|
commitAudit () {
|
|
|
- this.saveEntity(1)
|
|
|
|
|
- this.updateNumberEntityNoInfo()
|
|
|
|
|
- apiCert.checkSupplierCertCanSubmit(this.certId, this.$axios)
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- this.selectAuditOrg()
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- duration: 10000,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.selectAuditOrg()
|
|
|
},
|
|
},
|
|
|
setAuditer (val, name) {
|
|
setAuditer (val, name) {
|
|
|
this.auditer = val
|
|
this.auditer = val
|
|
@@ -1897,110 +1887,133 @@ export default {
|
|
|
secondaryUnitSubmitApply (val) {
|
|
secondaryUnitSubmitApply (val) {
|
|
|
if (!this.auditer) {
|
|
if (!this.auditer) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- duration: 10000,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ type: 'warning',
|
|
|
message: '请选择审批人!'
|
|
message: '请选择审批人!'
|
|
|
})
|
|
})
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
if (!this.fushenauditer) {
|
|
if (!this.fushenauditer) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- duration: 10000,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ type: 'warning',
|
|
|
message: '请选择复审人!'
|
|
message: '请选择复审人!'
|
|
|
})
|
|
})
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
if (!this.selectDept) {
|
|
if (!this.selectDept) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- duration: 10000,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ type: 'warning',
|
|
|
message: '请选择专业处室!'
|
|
message: '请选择专业处室!'
|
|
|
})
|
|
})
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
if (!this.userOptions || this.userOptions.length === 0) {
|
|
if (!this.userOptions || this.userOptions.length === 0) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- duration: 10000,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ type: 'warning',
|
|
|
message: '该专业科室未配置接收人!'
|
|
message: '该专业科室未配置接收人!'
|
|
|
})
|
|
})
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
- this.applyLoading = true
|
|
|
|
|
- let params = {
|
|
|
|
|
- 'FirstAudit': this.auditer,
|
|
|
|
|
- 'SecondAudit': this.fushenauditer,
|
|
|
|
|
- 'ThirdAudit': this.selectDept, // this.majorDept[this.majorDept.length - 1] 专业处室部门id
|
|
|
|
|
- 'AuditRemark': this.auditform.AuditRemark
|
|
|
|
|
- }
|
|
|
|
|
- apiCert.unitAuditEntity(this.certId, params, this.$axios).then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- // 保存成功后,初始化数据,变成修改
|
|
|
|
|
- this.initDatas()
|
|
|
|
|
- if (this.$refs['WfHistory']) {
|
|
|
|
|
- this.$refs['WfHistory'].getHistoryTask()
|
|
|
|
|
|
|
+ this.saveEntity(1).then(res => {
|
|
|
|
|
+ if (res) {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ 'FirstAudit': this.auditer,
|
|
|
|
|
+ 'SecondAudit': this.fushenauditer,
|
|
|
|
|
+ 'ThirdAudit': this.selectDept, // this.majorDept[this.majorDept.length - 1] 专业处室部门id
|
|
|
|
|
+ 'AuditRemark': this.auditform.AuditRemark
|
|
|
}
|
|
}
|
|
|
- this.dialogVisible = false
|
|
|
|
|
- this.$message({
|
|
|
|
|
|
|
+ apiCert.unitAuditEntity(this.certId, params, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
|
|
+ this.initDatas()
|
|
|
|
|
+ if (this.$refs['WfHistory']) {
|
|
|
|
|
+ this.$refs['WfHistory'].getHistoryTask()
|
|
|
|
|
+ }
|
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
|
+ this.$message({
|
|
|
duration: 10000,
|
|
duration: 10000,
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
})
|
|
})
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
duration: 10000,
|
|
duration: 10000,
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
})
|
|
})
|
|
|
|
|
+ }
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.loading = false
|
|
|
}
|
|
}
|
|
|
- this.applyLoading = false
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
companySubmitToSecUnitSeparateMakeSure () {
|
|
companySubmitToSecUnitSeparateMakeSure () {
|
|
|
if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
|
|
if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- duration: 10000,
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ type: 'warning',
|
|
|
message: '该单位没有分办人员!'
|
|
message: '该单位没有分办人员!'
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- this.applyLoading = true
|
|
|
|
|
- this.auditform.UnitId = this.UnitOrg
|
|
|
|
|
- this.auditform.CertId = this.certId
|
|
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
- console.log('企业用户提交参数', this.auditform)
|
|
|
|
|
- apiCert.companyAuditEntity(this.certId, this.auditform, this.$axios)
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- // 保存成功后,初始化数据,变成修改
|
|
|
|
|
- this.dialogVisibleCom = false
|
|
|
|
|
- this.$message({
|
|
|
|
|
- duration: 10000,
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
|
|
+ this.saveEntity(1).then(res => {
|
|
|
|
|
+ if (res) {
|
|
|
|
|
+ this.updateNumberEntityNoInfo()
|
|
|
|
|
+ apiCert.checkSupplierCertCanSubmit(this.certId, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ this.auditform.UnitId = this.UnitOrg
|
|
|
|
|
+ this.auditform.CertId = this.certId
|
|
|
|
|
+ console.log('企业用户提交参数', this.auditform)
|
|
|
|
|
+ apiCert.companyAuditEntity(this.certId, this.auditform, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
|
|
+ this.dialogVisibleCom = false
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ })
|
|
|
|
|
+ this.initDatas()
|
|
|
|
|
+ if (this.$refs['WfHistory']) {
|
|
|
|
|
+ this.$refs['WfHistory'].getHistoryTask()
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ console.error(err)
|
|
|
})
|
|
})
|
|
|
- this.initDatas()
|
|
|
|
|
- if (this.$refs['WfHistory']) {
|
|
|
|
|
- this.$refs['WfHistory'].getHistoryTask()
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
duration: 10000,
|
|
duration: 10000,
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
})
|
|
})
|
|
|
- }
|
|
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
- })
|
|
|
|
|
- .catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
SubpEntity () {
|
|
SubpEntity () {
|
|
|
if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
|
|
if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
|