|
|
@@ -744,6 +744,29 @@
|
|
|
</el-card>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
+
|
|
|
+ <div style="float: right; margin: 20px;">
|
|
|
+ <el-button ref="floatNxtBtn"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ size="mini"
|
|
|
+ @click="backTab"
|
|
|
+ v-if="parseInt(activeName) > 0">
|
|
|
+ 上一步</el-button>
|
|
|
+ <el-button ref="floatBtn"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ size="mini"
|
|
|
+ @click="nextTab"
|
|
|
+ v-if="parseInt(activeName) < totalTab">下一步</el-button>
|
|
|
+ <el-button type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="nextStep()"
|
|
|
+ v-if="IsCompanyUser == 1 && parseInt(activeName)==3">
|
|
|
+ 提交
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-card>
|
|
|
<el-dialog title="审核" :visible.sync="dialogMakeSure">
|
|
|
<el-form :model="shenheForm" label-width="100px" ref="shenheForm">
|
|
|
@@ -1007,6 +1030,10 @@
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ IsCompanyUser: 0,
|
|
|
+ add_flat: true,
|
|
|
+ totalTab: 3,
|
|
|
+ activeName: '0',
|
|
|
loading: false,
|
|
|
sizeProject: 10,
|
|
|
currentPageProject: 1,
|
|
|
@@ -1165,7 +1192,8 @@
|
|
|
SupplierTypeCode: '',
|
|
|
SupplierTypeName: '',
|
|
|
Step: 0,
|
|
|
- HseTraining: 0
|
|
|
+ HseTraining: 0,
|
|
|
+ AuditIndex: 0
|
|
|
},
|
|
|
changedForm: {
|
|
|
SupplierName: false,
|
|
|
@@ -1373,7 +1401,7 @@
|
|
|
if (this.$route.query.certid) {
|
|
|
this.certId = this.$route.query.certid + ''
|
|
|
}
|
|
|
-
|
|
|
+ this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
|
|
|
this.AnnualStatus = this.$route.query.AnnualStatus
|
|
|
this.WorkflowId = this.$route.query.WorkflowId + ''
|
|
|
this.annualId = this.$route.query.annualId
|
|
|
@@ -1388,6 +1416,112 @@
|
|
|
this.getsubfile()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // Tab
|
|
|
+ nextTab () {
|
|
|
+ if (this.formData.AuditIndex > 0) {
|
|
|
+ this.totalTab = 4
|
|
|
+ }
|
|
|
+ if (this.formDataCert.Status > 0) {
|
|
|
+ this.totalTab = 4
|
|
|
+ }
|
|
|
+ if (this.formDataCert.Status < 0) {
|
|
|
+ this.totalTab = 4
|
|
|
+ }
|
|
|
+ if (this.formDataCert.Status >= 5) {
|
|
|
+ this.totalTab = 5
|
|
|
+ }
|
|
|
+
|
|
|
+ let valid = true
|
|
|
+ // this
|
|
|
+ if (this.formDataCert.Status <= 0 && this.activeName === '0') {
|
|
|
+ valid = this.saveEntity()
|
|
|
+ } else if (this.formDataCert.Status <= 0 && this.activeName === '1') {
|
|
|
+ // valid = this.updateNumberEntity()
|
|
|
+ // valid = true// 没办法中的办法
|
|
|
+ if (this.formDataCert.WorkerTotal <= 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '企业员工总数必须大于0'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.formDataCert.TechnicalNum <= 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '技术、管理人员数量必须大于0'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.formDataCert.SkillerTotal <= 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '技术工人总数必须大于0'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.CheckCompanyBase()) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ 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()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (!valid) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let activeIdx = parseInt(this.activeName)
|
|
|
+ if (activeIdx < this.totalTab) {
|
|
|
+ this.activeName = (activeIdx + 1) + ''
|
|
|
+ } else {
|
|
|
+ this.activeName = '0'
|
|
|
+ }
|
|
|
+ document.querySelector('.content').scrollTop = 0
|
|
|
+ },
|
|
|
+ backTab () {
|
|
|
+ if (this.formData.AuditIndex > 0) {
|
|
|
+ this.totalTab = 4
|
|
|
+ }
|
|
|
+ if (this.formDataCert.Status > 0) {
|
|
|
+ this.totalTab = 4
|
|
|
+ }
|
|
|
+ if (this.formDataCert.Status < 0) {
|
|
|
+ this.totalTab = 4
|
|
|
+ }
|
|
|
+ if (this.formDataCert.Status >= 5) {
|
|
|
+ this.totalTab = 5
|
|
|
+ }
|
|
|
+
|
|
|
+ let activeIdx = parseInt(this.activeName)
|
|
|
+ if (activeIdx > 0) {
|
|
|
+ this.activeName = (activeIdx - 1) + ''
|
|
|
+ } else {
|
|
|
+ this.activeName = this.totalTab + ''
|
|
|
+ }
|
|
|
+ document.querySelector('.content').scrollTop = 0
|
|
|
+ },
|
|
|
+
|
|
|
// ======
|
|
|
fileurlcut (val, index) {
|
|
|
let fileurlall = val.split('$')[index]
|