|
|
@@ -588,13 +588,19 @@ export default {
|
|
|
var checkTechnicalNum = (rule, value, callback) => {
|
|
|
if (value <= 0) {
|
|
|
callback(new Error('技术、管理人员数量必须大于0'))
|
|
|
+ }
|
|
|
+ if (value >= this.formDataCert.WorkerTotal) {
|
|
|
+ callback(new Error('人员数量不能大于员工总数!'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
var checkSkillerTotal = (rule, value, callback) => {
|
|
|
if (value <= 0) {
|
|
|
- callback(new Error('技术工人总数必须大于0'))
|
|
|
+ callback(new Error('技术工人总数必1须大于0'))
|
|
|
+ }
|
|
|
+ if (value >= this.formDataCert.WorkerTotal) {
|
|
|
+ callback(new Error('技术工人总数不能大于员工总数!'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
@@ -1650,30 +1656,27 @@ export default {
|
|
|
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()
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
+ 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)
|
|
|
+ })
|
|
|
} else {
|
|
|
return false
|
|
|
}
|