gengx
This commit is contained in:
parent
a5c4046453
commit
06573b8e0d
|
@ -123,8 +123,8 @@ onUnmounted(() => {
|
|||
</el-radio-group>
|
||||
<el-date-picker v-model="date" type="daterange" start-placeholder="开始时间" end-placeholder="结束时间"
|
||||
size="small" value-format="YYYY/MM/DD" :disabled-date="disabledDate" @change="changeDate"
|
||||
:clearable="false" style="width: 10rem; margin: 0 1rem" />
|
||||
<el-button size="small">重置</el-button>
|
||||
:clearable="false" style="width: 10rem; margin: 0 0 0 1rem" />
|
||||
<!-- <el-button size="small">重置</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-input">
|
||||
|
|
|
@ -39,7 +39,7 @@ const toPay = () => {
|
|||
});
|
||||
payRef.value.drawer = true;
|
||||
}
|
||||
const paySuccess = (e=null) => {
|
||||
const paySuccess = (e = null) => {
|
||||
getUserInfo();
|
||||
// mitt.emit('re-load-user-list', e ? true : false);
|
||||
}
|
||||
|
@ -66,27 +66,27 @@ const cancelUserShip = () => {
|
|||
updateShip.value = false;
|
||||
}
|
||||
|
||||
const updateLable = ref(false);
|
||||
const userLable = ref([]);
|
||||
const getLableList = () => {
|
||||
userLabelListApi().then(res => {
|
||||
userLable.value = res.data.lists;
|
||||
})
|
||||
}
|
||||
getLableList()
|
||||
const updateUserLable = () => {
|
||||
userLabelUpdateApi({
|
||||
id: formData.value.id,
|
||||
label_id: formData.value.label_id
|
||||
}).then(res => {
|
||||
ElMessage.success('修改成功');
|
||||
formData.value.label_name = userLable.value.find(item => item.label_id == formData.value.label_id)?.label_name;
|
||||
updateLable.value = false;
|
||||
})
|
||||
}
|
||||
const cancelLable = () => {
|
||||
updateLable.value = false;
|
||||
}
|
||||
// const updateLable = ref(false);
|
||||
// const userLable = ref([]);
|
||||
// const getLableList = () => {
|
||||
// userLabelListApi().then(res => {
|
||||
// userLable.value = res.data.lists;
|
||||
// })
|
||||
// }
|
||||
// getLableList()
|
||||
// const updateUserLable = () => {
|
||||
// userLabelUpdateApi({
|
||||
// id: formData.value.id,
|
||||
// label_id: formData.value.label_id
|
||||
// }).then(res => {
|
||||
// ElMessage.success('修改成功');
|
||||
// formData.value.label_name = userLable.value.find(item => item.label_id == formData.value.label_id)?.label_name;
|
||||
// updateLable.value = false;
|
||||
// })
|
||||
// }
|
||||
// const cancelLable = () => {
|
||||
// updateLable.value = false;
|
||||
// }
|
||||
|
||||
|
||||
const addressInfo = ref({
|
||||
|
@ -272,14 +272,14 @@ const onOutAll = () => {
|
|||
// onOutPut();
|
||||
}
|
||||
// 发送短信验证码
|
||||
const onSendCode = ()=>{
|
||||
const onSendCode = () => {
|
||||
console.log('发送短信验证码');
|
||||
ElMessage.success("验证码已发送");
|
||||
}
|
||||
|
||||
// 出库
|
||||
const onOutPut = () => {
|
||||
if(outForm.value.code == '') return ElMessage.error("请输入验证码")
|
||||
if (outForm.value.code == '') return ElMessage.error("请输入验证码")
|
||||
userProductStorageSupplyApi({
|
||||
uid: formData.value.id,
|
||||
info: info
|
||||
|
@ -291,7 +291,7 @@ const onOutPut = () => {
|
|||
})
|
||||
}
|
||||
|
||||
const getUserInfo = ()=>{
|
||||
const getUserInfo = () => {
|
||||
userDetailApi({
|
||||
id: formData.value.id
|
||||
}).then(({ data }) => {
|
||||
|
@ -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(() => {
|
||||
mitt.on("set-user-detail", (res) => {
|
||||
formData.value = res;
|
||||
|
@ -405,7 +419,7 @@ onUnmounted(() => {
|
|||
<template v-else>
|
||||
<el-select v-model="formData.user_ship" placeholder="请选择用户类型" style="width: 10rem;">
|
||||
<el-option v-for="item in userShip" :key="item.id" :label="item.title"
|
||||
:value="item.id" :disabled="item.id==1||item.id==2||item.id==3" />
|
||||
:value="item.id" :disabled="item.id == 1 || item.id == 2 || item.id == 3" />
|
||||
</el-select>
|
||||
<el-button type="primary" style="margin-left: 1rem;"
|
||||
@click="updateUserShip">确认</el-button>
|
||||
|
@ -413,7 +427,7 @@ onUnmounted(() => {
|
|||
</template>
|
||||
</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;">
|
||||
<div class="info-item-title">用户标签:</div>
|
||||
<div class="info-item-info">
|
||||
|
@ -435,7 +449,7 @@ onUnmounted(() => {
|
|||
<el-button style="margin-left: 1rem;" @click="cancelLable">取消</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="info-item" style="width: 100%;flex-shrink: 0;align-items: center;">
|
||||
<div class="info-item-title">用户地址:</div>
|
||||
<el-cascader :key="formData.id" style="flex: 1;" v-model="selectedValues" :options="options"
|
||||
|
@ -446,8 +460,9 @@ onUnmounted(() => {
|
|||
@click="updateAddress">确认</el-button>
|
||||
<el-button v-if="!isDisabled" style="margin-left: 1rem;" @click="cancelUpdate">取消</el-button>
|
||||
</div>
|
||||
<el-button type="primary" class="big-btn" @click="dialogFormShip = true">成为会员</el-button>
|
||||
</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="pay-btn">
|
||||
<div class="pay-item" :class="{ 'pay-item-active': payInfo.type == 1 }"
|
||||
|
@ -468,7 +483,7 @@ onUnmounted(() => {
|
|||
</div>
|
||||
</div>
|
||||
<el-button type="primary" size="large" class="pay" @click="toPay">立即支付</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail" v-if="formData.id && activeStore == 1" v-loading="whereProduct.loading">
|
||||
|
@ -483,8 +498,8 @@ onUnmounted(() => {
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="单价" :width="isOut?130:200" />
|
||||
<el-table-column prop="nums" label="存量" :width="isOut?100:200" />
|
||||
<el-table-column prop="price" label="单价" :width="isOut ? 130 : 200" />
|
||||
<el-table-column prop="nums" label="存量" :width="isOut ? 100 : 200" />
|
||||
<el-table-column prop="nums" v-if="isOut" label="出库量" width="250">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; align-items: center" v-if="row.nums">
|
||||
|
@ -532,6 +547,34 @@ onUnmounted(() => {
|
|||
</div>
|
||||
</template>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
|
@ -681,6 +724,13 @@ onUnmounted(() => {
|
|||
margin: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.big-btn {
|
||||
margin-top: 1rem;
|
||||
width: 100%;
|
||||
height: 3rem;
|
||||
border-radius: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
@ -717,5 +767,15 @@ onUnmounted(() => {
|
|||
/* 防止输入框在聚焦时出现阴影或特殊样式 */
|
||||
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>
|
||||
|
|
Loading…
Reference in New Issue