|
@@ -67,9 +67,9 @@
|
|
marginLeft: '20rpx'
|
|
marginLeft: '20rpx'
|
|
}"
|
|
}"
|
|
defaultValue="1"
|
|
defaultValue="1"
|
|
- :src="sexList"
|
|
|
|
|
|
+ :src="enterpriseList"
|
|
placeholder="请选择参会企业"
|
|
placeholder="请选择参会企业"
|
|
- :on-change="enterpriseSelect"
|
|
|
|
|
|
+ @onChange="enterpriseSelect"
|
|
>
|
|
>
|
|
</SingleDropList>
|
|
</SingleDropList>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
@@ -84,9 +84,9 @@
|
|
marginLeft: '20rpx'
|
|
marginLeft: '20rpx'
|
|
}"
|
|
}"
|
|
defaultValue="1"
|
|
defaultValue="1"
|
|
- :src="sexList"
|
|
|
|
|
|
+ :src="tripList"
|
|
placeholder="请选择参会行程"
|
|
placeholder="请选择参会行程"
|
|
- :on-change="enterpriseSelect"
|
|
|
|
|
|
+ @onChange="enterpriseTripSelect"
|
|
>
|
|
>
|
|
</SingleDropList>
|
|
</SingleDropList>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
@@ -111,7 +111,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
|
-import { putUsrRegist } from '@/common/api';
|
|
|
|
|
|
+import { fetchEnterpriseList, fetchEnterpriseTripList, putUsrRegist } from '@/common/api';
|
|
import { ICON_CFG } from '@/common/EnumConst';
|
|
import { ICON_CFG } from '@/common/EnumConst';
|
|
import AuthWrap from '@/components/AuthComp/index.vue';
|
|
import AuthWrap from '@/components/AuthComp/index.vue';
|
|
import SingleDropList from '@/components/SingleDropList/index.vue';
|
|
import SingleDropList from '@/components/SingleDropList/index.vue';
|
|
@@ -149,6 +149,8 @@ export default {
|
|
name: '保密',
|
|
name: '保密',
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ enterpriseList: [],
|
|
|
|
+ tripList: [],
|
|
rules: {
|
|
rules: {
|
|
'userInfo.name': {
|
|
'userInfo.name': {
|
|
type: 'string',
|
|
type: 'string',
|
|
@@ -176,6 +178,7 @@ export default {
|
|
if (user) {
|
|
if (user) {
|
|
this.model1.userInfo.name = user.usrName;
|
|
this.model1.userInfo.name = user.usrName;
|
|
}
|
|
}
|
|
|
|
+ this.init();
|
|
},
|
|
},
|
|
onReady() {
|
|
onReady() {
|
|
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
|
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
|
@@ -188,6 +191,31 @@ export default {
|
|
this.model1.userInfo.enterpriseName = enterprise.name;
|
|
this.model1.userInfo.enterpriseName = enterprise.name;
|
|
this.$refs.uForm.validateField('userInfo.enterpriseId');
|
|
this.$refs.uForm.validateField('userInfo.enterpriseId');
|
|
},
|
|
},
|
|
|
|
+ enterpriseTripSelect(trip) {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ async init() {
|
|
|
|
+ const {
|
|
|
|
+ code: enterpriseCode,
|
|
|
|
+ rows: enterpriseData,
|
|
|
|
+ } = await fetchEnterpriseList();
|
|
|
|
+ const {
|
|
|
|
+ code: tripCode,
|
|
|
|
+ rows: tripData,
|
|
|
|
+ } = await fetchEnterpriseTripList();
|
|
|
|
+ this.enterpriseList = enterpriseData.map(item => {
|
|
|
|
+ return {
|
|
|
|
+ name: item.enterpriseName,
|
|
|
|
+ value: item.id,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ this.tripList = tripData.map(item => {
|
|
|
|
+ return {
|
|
|
|
+ name: item.tripName,
|
|
|
|
+ value: item.id,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ },
|
|
onSubmit() {
|
|
onSubmit() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
this.$refs.uForm.validate().then(res => {
|
|
this.$refs.uForm.validate().then(res => {
|