优化店铺切换商品展示
This commit is contained in:
@@ -226,7 +226,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 选择会员 -->
|
||||
<SelectVipUser ref="SelectVipUserRef" @success="selectUserHandle" />
|
||||
<SelectVipUser ref="SelectVipUserRef" :amount="0.01" @success="selectUserHandle" />
|
||||
<!-- 选择优惠券 -->
|
||||
<CouponModal ref="CouponModalRef" :orderList="props.orderList" @success="CouponModalSuccess" />
|
||||
</template>
|
||||
@@ -708,8 +708,10 @@ async function selectUserHandle(row) {
|
||||
goodsStore.vipUserInfo = { ...row }
|
||||
// 选择会员后重新计算会员价
|
||||
if (store.shopInfo.isMemberPrice && row.isVip) {
|
||||
console.log('选择会员后重新计算会员价===', row);
|
||||
goodsStore.showVipPrice = 1
|
||||
}
|
||||
|
||||
goodsStore.calcCartInfo()
|
||||
|
||||
emit('reset')
|
||||
@@ -717,11 +719,10 @@ async function selectUserHandle(row) {
|
||||
couponForm.value.discountRatio = ''
|
||||
discountInput('')
|
||||
|
||||
setTimeout(() => {
|
||||
couponDialogOpen()
|
||||
}, 100)
|
||||
|
||||
if (showCoupon.value) {
|
||||
setTimeout(() => {
|
||||
couponDialogOpen()
|
||||
}, 100)
|
||||
couponFormUserList.value = [
|
||||
{
|
||||
id: row.userId,
|
||||
@@ -737,7 +738,9 @@ async function selectUserHandle(row) {
|
||||
}
|
||||
} else {
|
||||
if (payList.value[payActive.value].payType == 'member-account') {
|
||||
vipPayAjax(row)
|
||||
setTimeout(() => {
|
||||
vipPayAjax(row)
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-input placeholder="请输入手机号搜索会员" v-model="tableData.phone" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="tableData.isVips" placeholder="是否为会员" style="width: 150px;" @change="resetTable">
|
||||
<el-select v-model="tableData.isVips" placeholder="是否为会员" style="width: 150px;" @change="changeIsVips">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="是" :value="1"></el-option>
|
||||
<el-option label="否" :value="0"></el-option>
|
||||
@@ -43,6 +43,13 @@ import { ref, reactive } from 'vue'
|
||||
import { shopUserList } from "@/api/account.js";
|
||||
import { formatDecimal } from '@/utils/index.js'
|
||||
|
||||
const props = defineProps({
|
||||
amount: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
|
||||
const emits = defineEmits(['success'])
|
||||
const showDialog = ref(false)
|
||||
const tableData = reactive({
|
||||
@@ -68,6 +75,12 @@ async function toHomeMember(row) {
|
||||
// 重置表格
|
||||
function resetTable() {
|
||||
tableData.phone = ''
|
||||
tableData.isVips = ''
|
||||
tableData.page = 1
|
||||
getMemberList()
|
||||
}
|
||||
|
||||
function changeIsVips() {
|
||||
tableData.page = 1
|
||||
getMemberList()
|
||||
}
|
||||
@@ -80,14 +93,17 @@ async function getMemberList() {
|
||||
key: tableData.phone,
|
||||
isVips: tableData.isVips,
|
||||
page: tableData.page,
|
||||
size: tableData.size
|
||||
size: tableData.size,
|
||||
amount: props.amount
|
||||
})
|
||||
tableData.list = res.records
|
||||
tableData.total = res.totalRow
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
tableData.loading = false
|
||||
setTimeout(() => {
|
||||
tableData.loading = false
|
||||
}, 500);
|
||||
}
|
||||
|
||||
// 显示选择会员弹窗
|
||||
|
||||
Reference in New Issue
Block a user