|
|
@@ -432,7 +432,7 @@
|
|
|
@click="dialogVisible = false">取 消</el-button>
|
|
|
<el-button size="mini"
|
|
|
type="primary"
|
|
|
- @click="AuditEntity" :loading="loading">确定</el-button>
|
|
|
+ @click="secondaryUnitSubmitApply" :loading="loading">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<el-dialog title="提交"
|
|
|
@@ -474,7 +474,7 @@
|
|
|
@click="dialogVisibleCom = false">取 消</el-button>
|
|
|
<el-button size="mini"
|
|
|
type="primary"
|
|
|
- @click="SubpEntity" :loading="loading">确定</el-button>
|
|
|
+ @click="companySubmitToSecUnitSeparateMakeSure" :loading="loading">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
@@ -590,7 +590,7 @@ export default {
|
|
|
UnitOrgOptions: [],
|
|
|
UnitOrg: '',
|
|
|
allorgunitOptions: [],
|
|
|
- selectDept: 0,
|
|
|
+ selectDept: 100000151,
|
|
|
userOptions: [],
|
|
|
dialogVisible: false,
|
|
|
dialogVisibleCom: false,
|
|
|
@@ -1403,7 +1403,7 @@ export default {
|
|
|
}, */
|
|
|
|
|
|
// 保存信息
|
|
|
- saveEntity () {
|
|
|
+ saveEntity (val) {
|
|
|
let valid1 = false
|
|
|
let valid2 = false
|
|
|
this.$refs['BasisInfo'].$refs['EntityForm'].validate((valid) => {
|
|
|
@@ -1423,9 +1423,17 @@ export default {
|
|
|
// this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
|
|
|
this.formData.RegCapital = parseFloat(this.formData.RegCapital)
|
|
|
if (!this.formData.Id || !this.certId) {
|
|
|
- this.addEntity()
|
|
|
+ if (val === 1) {
|
|
|
+ this.addEntityNoInfo()
|
|
|
+ } else {
|
|
|
+ this.addEntity()
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.updateEntity()
|
|
|
+ if (val === 1) {
|
|
|
+ this.updateEntityNoInfo()
|
|
|
+ } else {
|
|
|
+ this.updateEntity()
|
|
|
+ }
|
|
|
}
|
|
|
return true
|
|
|
} else {
|
|
|
@@ -1461,6 +1469,41 @@ export default {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
+ addEntityNoInfo () {
|
|
|
+ this.formData.SupplierTypeCode = '02'
|
|
|
+ this.formData.SupplierTypeName = '基建类'
|
|
|
+ api.addEntity(this.formData, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
+ this.formData.Id = res.data.item.split('_')[0]
|
|
|
+ this.certId = res.data.item.split('_')[1]
|
|
|
+ this.initDatas()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ updateEntityNoInfo () {
|
|
|
+ api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 更新子表
|
|
|
+ // this.updateNumberEntity()
|
|
|
+ this.initDatas()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
updateEntity () {
|
|
|
api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
|
|
|
@@ -1531,6 +1574,32 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ updateNumberEntityNoInfo () {
|
|
|
+ this.$refs['EntityFormNumber'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (!this.CheckCompanyBase()) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ 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({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getFirAuditerByDept () {
|
|
|
let deptId = this.authUser.Profile.DepartmentId
|
|
|
this.userOptions = []
|
|
|
@@ -1557,8 +1626,9 @@ export default {
|
|
|
this.chooseAuditorVisible = true
|
|
|
},
|
|
|
commitAudit () {
|
|
|
- console.log(this.formData)
|
|
|
- apiCert.checkSupplierCertCanSubmit(this.formData.Id, this.$axios)
|
|
|
+ this.saveEntity(1)
|
|
|
+ this.updateNumberEntityNoInfo()
|
|
|
+ apiCert.checkSupplierCertCanSubmit(this.certId, this.$axios)
|
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
this.selectAuditOrg()
|
|
|
@@ -1647,6 +1717,99 @@ export default {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
+ secondaryUnitSubmitApply (val) {
|
|
|
+ if (!this.auditer) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择审批人!'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (!this.fushenauditer) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择复审人!'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (!this.selectDept) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择专业处室!'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (!this.userOptions || this.userOptions.length === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '该专业科室未配置接收人!'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ 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()
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.applyLoading = false
|
|
|
+ this.loading = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ companySubmitToSecUnitSeparateMakeSure () {
|
|
|
+ if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '该单位没有分办人员!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.applyLoading = true
|
|
|
+ this.auditform.UnitId = this.UnitOrg
|
|
|
+ this.auditform.CertId = this.certId
|
|
|
+ this.loading = true
|
|
|
+ console.log('企业用户提交参数', this.auditform)
|
|
|
+ apiCert.companyAuditEntity(this.certId, this.auditform, this.$axios)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
+ this.initDatas()
|
|
|
+ this.dialogVisibleCom = false
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
SubpEntity () {
|
|
|
if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
|
|
|
this.$message({
|