|
|
@@ -479,10 +479,10 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
|
|
|
- <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert">
|
|
|
+ <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert" :rules="rulesnum">
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="企业员工总数">
|
|
|
+ <el-form-item label="企业员工总数" prop="WorkerTotal">
|
|
|
<el-input-number v-model="formDataCert.WorkerTotal" controls-position="right" :min="0"
|
|
|
style="width: 100%"></el-input-number>
|
|
|
</el-form-item>
|
|
|
@@ -503,7 +503,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="技术、管理人员数量">
|
|
|
+ <el-form-item label="技术、管理人员数量" prop="TechnicalNum">
|
|
|
<el-input-number v-model="formDataCert.TechnicalNum" controls-position="right" :min="0"
|
|
|
style="width: 100%"></el-input-number>
|
|
|
</el-form-item>
|
|
|
@@ -545,7 +545,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="技术工人总数">
|
|
|
+ <el-form-item label="技术工人总数" prop="SkillerTotal">
|
|
|
<el-input-number v-model="formDataCert.SkillerTotal" controls-position="right" :min="0"
|
|
|
style="width: 100%"></el-input-number>
|
|
|
</el-form-item>
|
|
|
@@ -676,6 +676,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="commitfenban()"
|
|
|
+ v-if="IsCompanyUser == 1 && parseInt(activeName)==3">
|
|
|
+ 提交
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-card>
|
|
|
<el-dialog title="变更项查看" :visible.sync="myitemsshow" width="780px">
|
|
|
<el-table :data="InfoData" border style="width: 100%">
|
|
|
@@ -992,7 +1015,32 @@ import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ var checkWorkerTotal = (rule, value, callback) => {
|
|
|
+ if (value <= 0) {
|
|
|
+ callback(new Error('企业员工总数必须大于0'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var checkTechnicalNum = (rule, value, callback) => {
|
|
|
+ if (value <= 0) {
|
|
|
+ callback(new Error('技术、管理人员数量必须大于0'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var checkSkillerTotal = (rule, value, callback) => {
|
|
|
+ if (value <= 0) {
|
|
|
+ callback(new Error('技术工人总数必须大于0'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
+ IsCompanyUser: 0,
|
|
|
+ totalTab: 4,
|
|
|
+ activeName: '0',
|
|
|
sizeProject: 10,
|
|
|
currentPageProject: 1,
|
|
|
currentItemCountProject: 0,
|
|
|
@@ -1041,7 +1089,6 @@ import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
value: '0',
|
|
|
label: '否'
|
|
|
}],
|
|
|
- activeName: '0',
|
|
|
orgtreelist: [],
|
|
|
formannData: {},
|
|
|
GradeOptions: [{
|
|
|
@@ -1383,6 +1430,23 @@ import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
trigger: 'blur'
|
|
|
}]
|
|
|
},
|
|
|
+ rulesnum: {
|
|
|
+ WorkerTotal: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkWorkerTotal,
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ TechnicalNum: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkTechnicalNum,
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ SkillerTotal: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkSkillerTotal,
|
|
|
+ trigger: 'blur'
|
|
|
+ }]
|
|
|
+ },
|
|
|
SubfileForm: {
|
|
|
Id: '',
|
|
|
SupplierId: '',
|
|
|
@@ -1422,6 +1486,7 @@ import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
+ this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
|
|
|
this.serviceId = this.$route.params.opera
|
|
|
if (this.$route.query.certid) {
|
|
|
this.certId = this.$route.query.certid + ''
|
|
|
@@ -1445,6 +1510,78 @@ import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
this.getsubfile()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // Tab
|
|
|
+ nextTab () {
|
|
|
+ let valid = true
|
|
|
+ if (this.Status <= 0 && this.activeName === '0') {
|
|
|
+ valid = this.saveEntity()
|
|
|
+ } else if (this.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 () {
|
|
|
+ let activeIdx = parseInt(this.activeName)
|
|
|
+ if (activeIdx > 0) {
|
|
|
+ this.activeName = (activeIdx - 1) + ''
|
|
|
+ } else {
|
|
|
+ this.activeName = this.totalTab + ''
|
|
|
+ }
|
|
|
+ document.querySelector('.content').scrollTop = 0
|
|
|
+ },
|
|
|
// 资质变更相关
|
|
|
lineheight (list) {
|
|
|
return list * 23 + ''
|
|
|
@@ -2262,29 +2399,43 @@ import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
|
|
|
// 保存信息
|
|
|
saveEntity () {
|
|
|
- let AllInfochangeItemList = {
|
|
|
- SupplierId: this.formData.Id + '',
|
|
|
- MInfoId: this.annualId,
|
|
|
- InfochangeForm: this.infochangeItemList
|
|
|
- }
|
|
|
- console.log('----', AllInfochangeItemList)
|
|
|
- annualapi.addInfoChangeItemCh(AllInfochangeItemList, 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)
|
|
|
+ let valid1 = false
|
|
|
+ let valid2 = false
|
|
|
+ this.$refs['EntityForm'].validate((valid) => {
|
|
|
+ valid1 = valid
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$refs['EntityFormCert'].validate((valid) => {
|
|
|
+ valid2 = valid
|
|
|
})
|
|
|
+ if (valid1 && valid2) {
|
|
|
+ let AllInfochangeItemList = {
|
|
|
+ SupplierId: this.formData.Id + '',
|
|
|
+ MInfoId: this.annualId,
|
|
|
+ InfochangeForm: this.infochangeItemList
|
|
|
+ }
|
|
|
+ console.log('----', AllInfochangeItemList)
|
|
|
+ annualapi.addInfoChangeItemCh(AllInfochangeItemList, 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)
|
|
|
+ })
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
CheckCompanyBase () {
|