|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view class="jz-content-box">
|
|
<view class="jz-content-box">
|
|
- <view class="bzsm-tip-box form-top-margin">
|
|
|
|
|
|
+ <view v-if="status =='add'" class="bzsm-tip-box form-top-margin">
|
|
<view class="title-btn-box">
|
|
<view class="title-btn-box">
|
|
<view class="phone-line-title">说明</view>
|
|
<view class="phone-line-title">说明</view>
|
|
<view @click="resetFun" class="reset-btn">重置</view>
|
|
<view @click="resetFun" class="reset-btn">重置</view>
|
|
@@ -11,8 +11,9 @@
|
|
<!-- 报证机构(picker 实现下拉选择) -->
|
|
<!-- 报证机构(picker 实现下拉选择) -->
|
|
<view class="form-label-select form-top-margin">
|
|
<view class="form-label-select form-top-margin">
|
|
<view class="phone-form-label"><text class="form-label-require">*</text>报证机构</view>
|
|
<view class="phone-form-label"><text class="form-label-require">*</text>报证机构</view>
|
|
- <picker :disabled="status =='edit'" mode="selector" :range="jigouNames" @change="jigouChange" class="select-picker-box">
|
|
|
|
- <view class="form-radio-select" :class="{'form-radio-disabled': status =='edit'}">
|
|
|
|
|
|
+ <picker :disabled="(status =='edit'&&localStatus=='')" mode="selector" :range="jigouNames"
|
|
|
|
+ @change="jigouChange" class="select-picker-box">
|
|
|
|
+ <view class="form-radio-select" :class="{'form-radio-disabled': (status =='edit'&&localStatus=='')}">
|
|
<view>{{ formData.baozhengJigouName || '请选择报证机构' }}</view>
|
|
<view>{{ formData.baozhengJigouName || '请选择报证机构' }}</view>
|
|
<icon></icon>
|
|
<icon></icon>
|
|
</view>
|
|
</view>
|
|
@@ -21,7 +22,8 @@
|
|
<!-- 职业名称(picker 实现下拉选择) -->
|
|
<!-- 职业名称(picker 实现下拉选择) -->
|
|
<view class="form-label-select">
|
|
<view class="form-label-select">
|
|
<view class="phone-form-label"><text class="form-label-require">*</text>职业名称</view>
|
|
<view class="phone-form-label"><text class="form-label-require">*</text>职业名称</view>
|
|
- <picker mode="selector" :range="zhiyeNames" range-key="name" @change="zhiyeChange" class="select-picker-box">
|
|
|
|
|
|
+ <picker mode="selector" :range="zhiyeNames" range-key="name" @change="zhiyeChange"
|
|
|
|
+ class="select-picker-box">
|
|
<view class="form-radio-select">
|
|
<view class="form-radio-select">
|
|
<view>{{ formData.zhiyeName || '请选择职业名称' }}</view>
|
|
<view>{{ formData.zhiyeName || '请选择职业名称' }}</view>
|
|
<icon></icon>
|
|
<icon></icon>
|
|
@@ -91,7 +93,7 @@
|
|
</radio-group>
|
|
</radio-group>
|
|
</view>
|
|
</view>
|
|
<view class="page-btn-box">
|
|
<view class="page-btn-box">
|
|
-
|
|
|
|
|
|
+ <button type="default" v-if="status!='add'" @click="goBack" class="phone-white-btn">返回</button>
|
|
<button type="default" @click="addSaveForm" class="phone-green-btn">保存</button>
|
|
<button type="default" @click="addSaveForm" class="phone-green-btn">保存</button>
|
|
</view>
|
|
</view>
|
|
<!-- 提交按钮 -->
|
|
<!-- 提交按钮 -->
|
|
@@ -132,7 +134,8 @@
|
|
zhiyelevelsOpt: [],
|
|
zhiyelevelsOpt: [],
|
|
zhiyeNameOpt: [
|
|
zhiyeNameOpt: [
|
|
|
|
|
|
- ]
|
|
|
|
|
|
+ ],
|
|
|
|
+ localStatus: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
@@ -153,11 +156,16 @@
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getJigou()
|
|
this.getJigou()
|
|
|
|
+ this.localStatus = this.status
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ goBack(){
|
|
|
|
+ this.$emit('goBack');
|
|
|
|
+ },
|
|
editinfo(data) {
|
|
editinfo(data) {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- if(!data){
|
|
|
|
|
|
+ if (!data) {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
console.log('datssssa', data);
|
|
console.log('datssssa', data);
|
|
@@ -339,6 +347,12 @@
|
|
kaoshiChange(e) {
|
|
kaoshiChange(e) {
|
|
this.formData.needKaoshi = e.detail.value.toString();
|
|
this.formData.needKaoshi = e.detail.value.toString();
|
|
},
|
|
},
|
|
|
|
+ currentMove(data) {
|
|
|
|
+ console.log('');
|
|
|
|
+ // currentMove 编辑状态下的新增
|
|
|
|
+ this.localStatus = data
|
|
|
|
+ console.log('localStatus', this.localStatus);
|
|
|
|
+ },
|
|
// 提交表单
|
|
// 提交表单
|
|
addSaveForm() {
|
|
addSaveForm() {
|
|
debugger
|
|
debugger
|
|
@@ -355,14 +369,15 @@
|
|
zyId: this.formData.zhiyeId,
|
|
zyId: this.formData.zhiyeId,
|
|
zyLevel: this.formData.zhiyeLevelId,
|
|
zyLevel: this.formData.zhiyeLevelId,
|
|
jgType: this.formData.baozhengJigouType,
|
|
jgType: this.formData.baozhengJigouType,
|
|
- jgName:this.formData.baozhengJigouName,
|
|
|
|
- zyName:this.formData.zhiyeName,
|
|
|
|
- zyLevelName:this.formData.zhiyeLevelName
|
|
|
|
|
|
+ jgName: this.formData.baozhengJigouName,
|
|
|
|
+ zyName: this.formData.zhiyeName,
|
|
|
|
+ zyLevelName: this.formData.zhiyeLevelName
|
|
}
|
|
}
|
|
console.log('req', req);
|
|
console.log('req', req);
|
|
|
|
|
|
- if (this.formData.baozhengJigouType == 1 && (this.formData.shicaochengji == '' || this.formData.zongkeshi ==
|
|
|
|
- '' || this.formData.canxunshijian == '')) {
|
|
|
|
|
|
+ if (this.formData.baozhengJigouType == 1 && (this.formData.shicaochengji == '' || this.formData
|
|
|
|
+ .zongkeshi ==
|
|
|
|
+ '' || this.formData.canxunshijian == '')) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: '请填写参训时间,实操成绩,总课时',
|
|
title: '请填写参训时间,实操成绩,总课时',
|
|
icon: 'none'
|
|
icon: 'none'
|
|
@@ -372,21 +387,25 @@
|
|
if (req.jgId && req.zyId && req.zyLevel) {
|
|
if (req.jgId && req.zyId && req.zyLevel) {
|
|
if (this.status == 'add') {
|
|
if (this.status == 'add') {
|
|
this.$emit('addSave', req);
|
|
this.$emit('addSave', req);
|
|
|
|
+ } else if (this.localStatus == 'editAdd') {
|
|
|
|
+ this.$emit('editSave', req, 'editAdd');
|
|
} else {
|
|
} else {
|
|
- this.$emit('editSave', req);
|
|
|
|
|
|
+ this.$emit('editSave', req, 'edit');
|
|
}
|
|
}
|
|
|
|
|
|
} else if (req.jgId == '' && req.zyId == '' && req.zyLevel == '') {
|
|
} else if (req.jgId == '' && req.zyId == '' && req.zyLevel == '') {
|
|
if (this.status == 'add') {
|
|
if (this.status == 'add') {
|
|
this.$emit('addSave', '');
|
|
this.$emit('addSave', '');
|
|
- } else {
|
|
|
|
- this.$emit('editSave', '');
|
|
|
|
|
|
+ } else if(this.localStatus == 'editAdd') {
|
|
|
|
+ //this.$emit('editSave', '');
|
|
// uni.showToast({
|
|
// uni.showToast({
|
|
// title: '请选择保证机构,职业名称,职业等级',
|
|
// title: '请选择保证机构,职业名称,职业等级',
|
|
// icon: 'none'
|
|
// icon: 'none'
|
|
// });
|
|
// });
|
|
|
|
|
|
// return false
|
|
// return false
|
|
|
|
+ }else{
|
|
|
|
+
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|