|
@@ -11,9 +11,11 @@
|
|
|
<i class="icon icon-table2"></i> 年审申请表
|
|
<i class="icon icon-table2"></i> 年审申请表
|
|
|
</span>
|
|
</span>
|
|
|
<span style="float: right;">
|
|
<span style="float: right;">
|
|
|
- <el-button v-if="IsCompanyUser == 0" type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="addaudit">添加
|
|
|
|
|
|
|
+ <el-button v-if="IsCompanyUser == 0" type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
|
|
|
|
|
+ @click="addaudit">添加
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button v-if="IsCompanyUser == 1" type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="addauditcom">添加
|
|
|
|
|
|
|
+ <el-button v-if="IsCompanyUser == 1" type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
|
|
|
|
|
+ @click="addauditcom">添加
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
<el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
|
|
<el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
|
|
@@ -225,6 +227,7 @@
|
|
|
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ annualauditmakesure: false,
|
|
|
chooseAuditorVisible: false,
|
|
chooseAuditorVisible: false,
|
|
|
orgtreelist: [],
|
|
orgtreelist: [],
|
|
|
orgtreeprops: {
|
|
orgtreeprops: {
|
|
@@ -329,7 +332,7 @@
|
|
|
IsCompanyUser: 0,
|
|
IsCompanyUser: 0,
|
|
|
supplierList: [],
|
|
supplierList: [],
|
|
|
suplen: 1,
|
|
suplen: 1,
|
|
|
- certId:'',
|
|
|
|
|
|
|
+ certId: '',
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -377,18 +380,20 @@
|
|
|
let params = {
|
|
let params = {
|
|
|
SuppTypeCode: '02',
|
|
SuppTypeCode: '02',
|
|
|
}
|
|
}
|
|
|
- _this.$axios.get('/suppliercertappend/getsupplier', {params})
|
|
|
|
|
|
|
+ _this.$axios.get('/suppliercertappend/getsupplier', {
|
|
|
|
|
+ params
|
|
|
|
|
+ })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
_this.supplierList = res.data
|
|
_this.supplierList = res.data
|
|
|
if (_this.supplierList) {
|
|
if (_this.supplierList) {
|
|
|
_this.suplen = _this.supplierList.length
|
|
_this.suplen = _this.supplierList.length
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
_this.suplen = 0
|
|
_this.suplen = 0
|
|
|
}
|
|
}
|
|
|
if (_this.IsCompanyUser == 1 && _this.supplierList) {
|
|
if (_this.IsCompanyUser == 1 && _this.supplierList) {
|
|
|
_this.entityForm.SupplierId = parseInt(_this.supplierList[0].SupplierId)
|
|
_this.entityForm.SupplierId = parseInt(_this.supplierList[0].SupplierId)
|
|
|
_this.entityForm.SupplierName = _this.supplierList[0].SupplierName
|
|
_this.entityForm.SupplierName = _this.supplierList[0].SupplierName
|
|
|
- _this.certId = _this.supplierList[0].SupplierCertId
|
|
|
|
|
|
|
+ _this.certId = _this.supplierList[0].SupplierCertId
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
@@ -433,10 +438,12 @@
|
|
|
this.entityForm.SupplierName = obj.Realname
|
|
this.entityForm.SupplierName = obj.Realname
|
|
|
},
|
|
},
|
|
|
addAnnualAudit() {
|
|
addAnnualAudit() {
|
|
|
|
|
+ console.log("123456789qqqqqq")
|
|
|
this.$refs['EntityFormref'].validate((valid) => {
|
|
this.$refs['EntityFormref'].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
this.entityForm.auditer = this.auditer
|
|
this.entityForm.auditer = this.auditer
|
|
|
api.addEntity(this.entityForm, this.entityForm.auditer, this.$axios).then(res => {
|
|
api.addEntity(this.entityForm, this.entityForm.auditer, this.$axios).then(res => {
|
|
|
|
|
+ console.log("--22221-",res.data.code)
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
//保存成功后,初始化数据,变成修改
|
|
//保存成功后,初始化数据,变成修改
|
|
|
this.entityForm.Id = res.data.item;
|
|
this.entityForm.Id = res.data.item;
|
|
@@ -447,6 +454,12 @@
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ } else if (res.data.code === -3) {
|
|
|
|
|
+ this.$confirm(res.data.message + ",点击继续可继续进行年审")
|
|
|
|
|
+ .then(_ => {
|
|
|
|
|
+ this.addannualdirect()
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(_ => {});
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
@@ -462,8 +475,31 @@
|
|
|
addaudit() {
|
|
addaudit() {
|
|
|
this.addshow = true
|
|
this.addshow = true
|
|
|
},
|
|
},
|
|
|
|
|
+ addannualdirect() {
|
|
|
|
|
+ api.addEntityDirect(this.entityForm, this.entityForm.auditer, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ //保存成功后,初始化数据,变成修改
|
|
|
|
|
+ this.entityForm.Id = res.data.item;
|
|
|
|
|
+ this.initDatas();
|
|
|
|
|
+ this.addshow = false
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
addauditcom() {
|
|
addauditcom() {
|
|
|
|
|
+ console.log("123456789")
|
|
|
api.addEntity(this.entityForm, this.entityForm.auditer, this.$axios).then(res => {
|
|
api.addEntity(this.entityForm, this.entityForm.auditer, this.$axios).then(res => {
|
|
|
|
|
+ console.log("--1-",res.data.code)
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
//保存成功后,初始化数据,变成修改
|
|
//保存成功后,初始化数据,变成修改
|
|
|
this.entityForm.Id = res.data.item;
|
|
this.entityForm.Id = res.data.item;
|
|
@@ -476,14 +512,20 @@
|
|
|
//WorkflowId: ,
|
|
//WorkflowId: ,
|
|
|
Status: 0,
|
|
Status: 0,
|
|
|
Step: 1,
|
|
Step: 1,
|
|
|
- annualId: this.entityForm.Id ,
|
|
|
|
|
|
|
+ annualId: this.entityForm.Id,
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+ } else if (res.data.code === -3) {
|
|
|
|
|
+ console.log("--2-",res.data.code)
|
|
|
|
|
+ this.$confirm(res.data.message + ",点击继续可继续进行年审")
|
|
|
|
|
+ .then(_ => {
|
|
|
|
|
+ this.addannualdirect()
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(_ => {});
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|