更新创建人员

This commit is contained in:
weipengfei 2023-09-21 12:04:19 +08:00
parent 8aa746a65e
commit 9f59c9fbd4
2 changed files with 18 additions and 3 deletions

View File

@ -46,7 +46,7 @@
<u--input v-model="formData.id_card" placeholder="请输入身份证号" @input="c_idcard"
type="idcard"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="是否为小队长" required prop="is_captain" borderBottom>
<u-form-item v-if="$store.state.app.userInfo.company.company_type==18" labelWidth="auto" label="是否为小队长" required prop="is_captain" borderBottom>
<u-radio-group v-model="formData.is_captain" style="margin: 16rpx;">
<u-radio activeColor="#0122C7" :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
@ -54,7 +54,15 @@
</u-radio>
</u-radio-group>
</u-form-item>
<districtSelectorTow style="margin-top: 30rpx;" ref="districtSelectorRef"></districtSelectorTow>
<u-form-item v-if="$store.state.app.userInfo.company.company_type==41" labelWidth="auto" label="是否为服务部长" required prop="is_service_manager" borderBottom>
<u-radio-group v-model="formData.is_service_manager" style="margin: 16rpx;">
<u-radio activeColor="#0122C7" :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<districtSelectorTow v-if="$store.state.app.userInfo.company.company_type==18" style="margin-top: 30rpx;" ref="districtSelectorRef"></districtSelectorTow>
</view>
<view class="cards">
<view style="margin-bottom:30rpx ;">
@ -322,6 +330,7 @@
// channel: 6, //[1- 2- 3-H5 4-PC 5-APP 6-APP]
id_card: '',
is_captain: '', //
is_service_manager: '', //
sex: '',
avatar: '',
nickname: '',
@ -372,6 +381,12 @@
},
trigger: ['change', 'blur']
},
is_service_manager: {
validator: (rule, value, callback) => {
typeof value === 'number' ? callback() : callback('不能为空')
},
trigger: ['change', 'blur']
},
'qualification.id_card': {
type: 'string',
required: true,

View File

@ -109,7 +109,7 @@
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
<!-- <button class="new_btn" @click.stop="navTo('/subpkg/newPersonnel/newPersonnel')">创建账号</button> -->
<mybtn v-if="$store.state.app.userInfo.company && $store.state.app.userInfo.company.company_type==18" text="创建账号" @click="navTo('/subpkg/newPersonnel/newPersonnel')"></mybtn>
<mybtn v-if="$store.state.app.userInfo.company && ($store.state.app.userInfo.company.company_type==18||$store.state.app.userInfo.company.company_type==41)" text="创建账号" @click="navTo('/subpkg/newPersonnel/newPersonnel')"></mybtn>
</view>
</template>