更新调整用户类型
This commit is contained in:
parent
d519d8961f
commit
38e3259be3
|
@ -12,7 +12,7 @@ const formDataInfo = reactive({
|
|||
mobile: '',
|
||||
code: '',
|
||||
real_name: '',
|
||||
user_ship: '',
|
||||
user_ship: 0,
|
||||
selectedValues: [],
|
||||
})
|
||||
|
||||
|
@ -119,13 +119,13 @@ const props = {
|
|||
|
||||
const userShip = ref([])
|
||||
const getUserShip = () => {
|
||||
userShipApi({
|
||||
type_id: 4
|
||||
}).then(res => {
|
||||
userShip.value = res.data.lists?.filter((item) => {
|
||||
return item.id == 0 || item.id == 4
|
||||
});
|
||||
})
|
||||
// userShipApi({
|
||||
// type_id: 4
|
||||
// }).then(res => {
|
||||
// userShip.value = res.data.lists?.filter((item) => {
|
||||
// return item.id == 0 || item.id == 4
|
||||
// });
|
||||
// })
|
||||
}
|
||||
getUserShip()
|
||||
|
||||
|
@ -148,7 +148,7 @@ const addUser = () => {
|
|||
userAddApi(forms).then(res=>{
|
||||
formDataInfo.mobile = '';
|
||||
formDataInfo.code = '';
|
||||
formDataInfo.user_ship = '';
|
||||
formDataInfo.user_ship = 0;
|
||||
formDataInfo.real_name = '';
|
||||
formDataInfo.selectedValues = [];
|
||||
formDataRef.value.resetFields();
|
||||
|
@ -196,11 +196,11 @@ defineExpose({
|
|||
<el-form-item label="用户姓名" prop="real_name">
|
||||
<el-input v-model="formDataInfo.real_name" placeholder="请输入用户姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户类型" prop="user_ship">
|
||||
<!-- <el-form-item label="用户类型" prop="user_ship">
|
||||
<el-select v-model="formDataInfo.user_ship" placeholder="请选择用户类型" style="width: 100%;">
|
||||
<el-option v-for="item in userShip" :key="item.id" :label="item.title" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="用户地址" prop="selectedValues">
|
||||
<el-cascader style="width: 100%;" v-model="formDataInfo.selectedValues" :options="options"
|
||||
:props="props" :load="loadOptions" class="w-full" />
|
||||
|
|
|
@ -512,8 +512,8 @@ onUnmounted(() => {
|
|||
formData.user_ship_name
|
||||
}}</el-tag>
|
||||
<el-tag type="success" size="large" v-else>{{ formData.user_ship_name }}</el-tag>
|
||||
<el-button type="primary" v-if="formData.user_ship == 0 || formData.user_ship == 4"
|
||||
style="margin-left: 1rem;" @click="updateShip = true">修改</el-button>
|
||||
<!-- <el-button type="primary" v-if="formData.user_ship == 0 || formData.user_ship == 4"
|
||||
style="margin-left: 1rem;" @click="updateShip = true">修改</el-button> -->
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-select v-model="formData.user_ship" placeholder="请选择用户类型" style="width: 10rem;">
|
||||
|
|
Loading…
Reference in New Issue