|
@@ -3405,44 +3405,70 @@
|
|
|
}
|
|
}
|
|
|
return true
|
|
return true
|
|
|
},
|
|
},
|
|
|
|
|
+ // 检查资质文件
|
|
|
|
|
+ checkFile () {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ let fileType = {
|
|
|
|
|
+ Type: this.supplierData.OperType === '制造商' ? 1 : 2,
|
|
|
|
|
+ SupplierId: this.formData.SupplierId,
|
|
|
|
|
+ CertId: this.formData.SupplierCertId.toString(),
|
|
|
|
|
+ Grade: this.Grade,
|
|
|
|
|
+ Table: 4
|
|
|
|
|
+ }
|
|
|
|
|
+ suppapi.checkSupplierFileNew(fileType, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.code === 1) {
|
|
|
|
|
+ return resolve(true)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ })
|
|
|
|
|
+ return resolve(false)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
// 企业用户自行提交审批
|
|
// 企业用户自行提交审批
|
|
|
companySubmitToSecUnitSeparate () {
|
|
companySubmitToSecUnitSeparate () {
|
|
|
- this.saveinfochange(1)
|
|
|
|
|
- let checkRes = this.companySubmitToSecUnitParamsCheck
|
|
|
|
|
|
|
+ // this.saveinfochange(1)
|
|
|
|
|
+ let checkRes = this.companySubmitToSecUnitParamsCheck()
|
|
|
if (!checkRes) {
|
|
if (!checkRes) {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
this.btnloading = true
|
|
this.btnloading = true
|
|
|
- // this.auditform.FirstAuditName = this.UnitOrg
|
|
|
|
|
- // this.auditform.CertId = this.formData.Id
|
|
|
|
|
- // this.auditform.TypeCode = '01'
|
|
|
|
|
- let params = {
|
|
|
|
|
- UnitId: this.UnitOrg,
|
|
|
|
|
- AuditRemark: this.auditform.AuditRemark
|
|
|
|
|
- }
|
|
|
|
|
- console.log('提交增项申请的参数', params)
|
|
|
|
|
- console.log('实际的增项申请id', this.dialogFormData.SupplierCertAppendId, this.formData.id)
|
|
|
|
|
- api2.companyAuditEntity(this.formData.Id, params, this.$axios).then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- // 保存成功后,初始化数据,变成修改
|
|
|
|
|
- this.getEntityById()
|
|
|
|
|
- if (this.$refs['WfHistory']) {
|
|
|
|
|
- this.$refs['WfHistory'].getHistoryTask()
|
|
|
|
|
|
|
+ this.checkFile().then(val => {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ UnitId: this.UnitOrg,
|
|
|
|
|
+ AuditRemark: this.auditform.AuditRemark
|
|
|
}
|
|
}
|
|
|
- this.dialogComSubmitToSeparateUnitVisible = false
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
|
|
+ console.log('提交增项申请的参数', params)
|
|
|
|
|
+ console.log('实际的增项申请id', this.dialogFormData.SupplierCertAppendId, this.formData.id)
|
|
|
|
|
+ api2.companyAuditEntity(this.formData.Id, params, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
|
|
+ this.getEntityById()
|
|
|
|
|
+ if (this.$refs['WfHistory']) {
|
|
|
|
|
+ this.$refs['WfHistory'].getHistoryTask()
|
|
|
|
|
+ }
|
|
|
|
|
+ this.dialogComSubmitToSeparateUnitVisible = false
|
|
|
|
|
+ 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 {
|
|
} else {
|
|
|
- this.$message({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.btnloading = false
|
|
|
}
|
|
}
|
|
|
- this.btnloading = false
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
companySubmitToSecUnitParamsCheck () {
|
|
companySubmitToSecUnitParamsCheck () {
|