|
|
@@ -98,15 +98,17 @@
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>企业人员结构情况</span>
|
|
|
<span style="float: right;">
|
|
|
- <el-button type="primary" size="mini" @click="updateNumberEntity" v-if="formDataCert.Status <= 0">
|
|
|
+ <el-button type="primary" size="mini" @click="updateNumberEntity('EntityFormNumber')" v-if="formDataCert.Status <= 0">
|
|
|
保存人员结构情况</el-button>
|
|
|
</span>
|
|
|
</div>
|
|
|
|
|
|
- <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert">
|
|
|
+ <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert" :rules="rules">
|
|
|
<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"
|
|
|
@@ -139,7 +141,9 @@
|
|
|
</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"
|
|
|
@@ -424,6 +428,20 @@ export default {
|
|
|
name: "goodsEdit",
|
|
|
|
|
|
data() {
|
|
|
+ var checkWorkerTotal = (rule, value, callback) => {
|
|
|
+ if (value <= 0) {
|
|
|
+ return callback(new Error('企业员工总数必须大于0'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ };
|
|
|
+ var checkTechnicalNum = (rule, value, callback) => {
|
|
|
+ if (value <= 0) {
|
|
|
+ return callback(new Error('技术、管理人员数量必须大于0'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ };
|
|
|
return {
|
|
|
chooseAuditorVisible: false,
|
|
|
createBtn: false,
|
|
|
@@ -571,10 +589,23 @@ export default {
|
|
|
classId: "03",
|
|
|
workflowId: ""
|
|
|
},
|
|
|
- flag: "01"
|
|
|
+ flag: "01",
|
|
|
+ rules: {
|
|
|
+ WorkerTotal: [
|
|
|
+ {
|
|
|
+ validator: checkWorkerTotal,
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ TechnicalNum: [
|
|
|
+ {
|
|
|
+ validator: checkTechnicalNum,
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
mounted() {
|
|
|
this.serviceId = this.$route.params.opera + "";
|
|
|
if (this.$route.query.rtn) {
|
|
|
@@ -1029,35 +1060,41 @@ export default {
|
|
|
return true;
|
|
|
},
|
|
|
// 企业人员结构情况
|
|
|
- updateNumberEntity () {
|
|
|
- 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();
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: res.data.message
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "warning",
|
|
|
- message: res.data.message
|
|
|
- });
|
|
|
+ updateNumberEntity (formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (!this.CheckCompanyBase()) {
|
|
|
+ return false;
|
|
|
}
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ 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);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
selectAuditOrg() {
|
|
|
this.dialogVisible = true;
|