This commit is contained in:
weipengfei 2024-07-01 11:00:59 +08:00
parent a5c4046453
commit 06573b8e0d
2 changed files with 94 additions and 34 deletions

View File

@ -123,8 +123,8 @@ onUnmounted(() => {
</el-radio-group> </el-radio-group>
<el-date-picker v-model="date" type="daterange" start-placeholder="开始时间" end-placeholder="结束时间" <el-date-picker v-model="date" type="daterange" start-placeholder="开始时间" end-placeholder="结束时间"
size="small" value-format="YYYY/MM/DD" :disabled-date="disabledDate" @change="changeDate" size="small" value-format="YYYY/MM/DD" :disabled-date="disabledDate" @change="changeDate"
:clearable="false" style="width: 10rem; margin: 0 1rem" /> :clearable="false" style="width: 10rem; margin: 0 0 0 1rem" />
<el-button size="small">重置</el-button> <!-- <el-button size="small">重置</el-button> -->
</div> </div>
</div> </div>
<div class="header-input"> <div class="header-input">

View File

@ -66,27 +66,27 @@ const cancelUserShip = () => {
updateShip.value = false; updateShip.value = false;
} }
const updateLable = ref(false); // const updateLable = ref(false);
const userLable = ref([]); // const userLable = ref([]);
const getLableList = () => { // const getLableList = () => {
userLabelListApi().then(res => { // userLabelListApi().then(res => {
userLable.value = res.data.lists; // userLable.value = res.data.lists;
}) // })
} // }
getLableList() // getLableList()
const updateUserLable = () => { // const updateUserLable = () => {
userLabelUpdateApi({ // userLabelUpdateApi({
id: formData.value.id, // id: formData.value.id,
label_id: formData.value.label_id // label_id: formData.value.label_id
}).then(res => { // }).then(res => {
ElMessage.success('修改成功'); // ElMessage.success('');
formData.value.label_name = userLable.value.find(item => item.label_id == formData.value.label_id)?.label_name; // formData.value.label_name = userLable.value.find(item => item.label_id == formData.value.label_id)?.label_name;
updateLable.value = false; // updateLable.value = false;
}) // })
} // }
const cancelLable = () => { // const cancelLable = () => {
updateLable.value = false; // updateLable.value = false;
} // }
const addressInfo = ref({ const addressInfo = ref({
@ -301,6 +301,20 @@ const getUserInfo = ()=>{
}) })
} }
//
const dialogFormShip = ref(false);
const shipForm = ref({
user_ship: '',
limit: '',
money: '',
})
const onUpdateShip = ()=>{
console.log('变化', shipForm.value.money);
}
const changeShip = (e)=>{
console.log('changeShip', shipForm.value.user_ship, e);
}
onMounted(() => { onMounted(() => {
mitt.on("set-user-detail", (res) => { mitt.on("set-user-detail", (res) => {
formData.value = res; formData.value = res;
@ -413,7 +427,7 @@ onUnmounted(() => {
</template> </template>
</div> </div>
</div> </div>
<div class="info-item" v-if="formData.user_ship == 1" <!-- <div class="info-item" v-if="formData.user_ship == 1"
style="width: 100%;flex-shrink: 0;align-items: center;"> style="width: 100%;flex-shrink: 0;align-items: center;">
<div class="info-item-title">用户标签:</div> <div class="info-item-title">用户标签:</div>
<div class="info-item-info"> <div class="info-item-info">
@ -435,7 +449,7 @@ onUnmounted(() => {
<el-button style="margin-left: 1rem;" @click="cancelLable">取消</el-button> <el-button style="margin-left: 1rem;" @click="cancelLable">取消</el-button>
</template> </template>
</div> </div>
</div> </div> -->
<div class="info-item" style="width: 100%;flex-shrink: 0;align-items: center;"> <div class="info-item" style="width: 100%;flex-shrink: 0;align-items: center;">
<div class="info-item-title">用户地址:</div> <div class="info-item-title">用户地址:</div>
<el-cascader :key="formData.id" style="flex: 1;" v-model="selectedValues" :options="options" <el-cascader :key="formData.id" style="flex: 1;" v-model="selectedValues" :options="options"
@ -446,8 +460,9 @@ onUnmounted(() => {
@click="updateAddress">确认</el-button> @click="updateAddress">确认</el-button>
<el-button v-if="!isDisabled" style="margin-left: 1rem;" @click="cancelUpdate">取消</el-button> <el-button v-if="!isDisabled" style="margin-left: 1rem;" @click="cancelUpdate">取消</el-button>
</div> </div>
<el-button type="primary" class="big-btn" @click="dialogFormShip = true">成为会员</el-button>
</div> </div>
<div class="table-title">供销经营礼包<span class="tips">首次购买1000元以上成为行业会员</span></div> <!-- <div class="table-title">供销经营礼包<span class="tips">首次购买1000元以上成为行业会员</span></div>
<div class="table-info"> <div class="table-info">
<div class="pay-btn"> <div class="pay-btn">
<div class="pay-item" :class="{ 'pay-item-active': payInfo.type == 1 }" <div class="pay-item" :class="{ 'pay-item-active': payInfo.type == 1 }"
@ -468,7 +483,7 @@ onUnmounted(() => {
</div> </div>
</div> </div>
<el-button type="primary" size="large" class="pay" @click="toPay">立即支付</el-button> <el-button type="primary" size="large" class="pay" @click="toPay">立即支付</el-button>
</div> </div> -->
</div> </div>
</div> </div>
<div class="detail" v-if="formData.id && activeStore == 1" v-loading="whereProduct.loading"> <div class="detail" v-if="formData.id && activeStore == 1" v-loading="whereProduct.loading">
@ -532,6 +547,34 @@ onUnmounted(() => {
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<el-dialog v-model="dialogFormShip" title="成为会员" width="500">
<el-form :model="shipForm" label-width="80px">
<el-form-item label="手机号:">
<el-input v-model="formData.phone" autocomplete="off" readonly />
</el-form-item>
<el-form-item label="会员类型:">
<el-select v-model="shipForm.user_ship" placeholder="请选择用户类型" style="flex: 1" @change="changeShip">
<el-option v-for="item in userShip" :key="item.id" :label="item.title" :value="item.id"
:disabled="item.id == 0" />
</el-select>
</el-form-item>
<el-form-item label="充值金额:">
<!-- <input type="number" class="ship-input" v-model="payInfo.price" placeholder="自定义金额"> -->
<el-input v-model="shipForm.money" type="number" @blur="onUpdateShip" autocomplete="off">
<template #prepend></template>
<template #append></template>
</el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogFormShip = false">取消</el-button>
<el-button type="primary" @click="onOutPut">
确认
</el-button>
</div>
</template>
</el-dialog>
</div> </div>
</template> </template>
@ -681,6 +724,13 @@ onUnmounted(() => {
margin: 0.5rem; margin: 0.5rem;
} }
} }
.big-btn {
margin-top: 1rem;
width: 100%;
height: 3rem;
border-radius: 3rem;
}
} }
.footer { .footer {
@ -717,5 +767,15 @@ onUnmounted(() => {
/* 防止输入框在聚焦时出现阴影或特殊样式 */ /* 防止输入框在聚焦时出现阴影或特殊样式 */
box-shadow: none; box-shadow: none;
} }
.ship-input{
width: 100%;
text-align: center;
font-size: 2rem;
border: 0.2rem solid #67c23a !important;
padding: 1rem 0 !important;
color: #67c23a;
border-radius: 0.5rem;
}
} }
</style> </style>