This commit is contained in:
2025-03-18 16:59:28 +08:00
6 changed files with 17 additions and 35 deletions

View File

@@ -124,7 +124,6 @@ function add() {
async function handleEdit(row) { async function handleEdit(row) {
// 查看记录 // 查看记录
const res = await API.record(row.id) const res = await API.record(row.id)
console.log(res, '2222')
datas.storingWineList = res datas.storingWineList = res
// 有图片 // 有图片
// datas.DialogForm.goodsImageUrl = res.goodsImageUrl.split(',') // datas.DialogForm.goodsImageUrl = res.goodsImageUrl.split(',')

View File

@@ -270,7 +270,14 @@ async function addConfirm() {
} }
// 添加商品的回调 // 添加商品的回调
function subitgood() { function subitgood() {
if (title.value == "编辑分组") {
let arr = selectData.value
arr.push(...contentRefs.value.getselectTable())
selectData.value = arr
} else {
selectData.value = contentRefs.value.getselectTable() selectData.value = contentRefs.value.getselectTable()
}
switchref.value = false switchref.value = false
myDialogRef.value.close() myDialogRef.value.close()
} }

View File

@@ -20,7 +20,6 @@ const modalConfig: IModalConfig<UserForm> = {
}); });
data.productIds = arr data.productIds = arr
} }
console.log("提交之前处理2", data);
return UserAPI.addunit(data) return UserAPI.addunit(data)
}, },
beforeSubmit(data: any) { beforeSubmit(data: any) {

View File

@@ -27,7 +27,6 @@ const contentConfig: IContentConfig<UserPageQuery> = {
// exportAction: UserAPI.export, // exportAction: UserAPI.export,
// importTemplate: UserAPI.downloadTemplate, // importTemplate: UserAPI.downloadTemplate,
modifyAction: function (params) { modifyAction: function (params) {
console.log(params, '调试2')
let obj = { ...params } let obj = { ...params }
return UserAPI.update(obj); return UserAPI.update(obj);
}, },

View File

@@ -22,7 +22,6 @@ const modalConfig: IModalConfig<UserForm> = {
}); });
data.productIds = arr data.productIds = arr
} }
console.log("提交之前处理2", data);
// return UserAPI.update(data); // return UserAPI.update(data);
}, },

View File

@@ -3,33 +3,21 @@
<el-dialog :title="form.id ? '编辑活动' : '添加活动'" v-model="dialogVisible" @close="reset"> <el-dialog :title="form.id ? '编辑活动' : '添加活动'" v-model="dialogVisible" @close="reset">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left"> <el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left">
<el-form-item label="充值"> <el-form-item label="充值">
<el-input <el-input style="width: 220px" placeholder="请输入金额" v-model="form.amount"
style="width: 220px" @input="(v) => (form.amount = v.replace(/^(0+)|[^\d]+/g, ''))">
placeholder="请输入金额"
v-model="form.amount"
@input="(v) => (form.amount = v.replace(/^(0+)|[^\d]+/g, ''))"
>
<template #prepend></template> <template #prepend></template>
<template #append></template> <template #append></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="赠送"> <el-form-item label="赠送">
<div style="display: flex"> <div style="display: flex">
<el-input <el-input style="width: 220px" placeholder="请输入金额" v-model="form.giftAmount"
style="width: 220px" @input="(v) => (form.giftAmount = v.replace(/^(0+)|[^\d]+/g, ''))">
placeholder="请输入金额"
v-model="form.giftAmount"
@input="(v) => (form.giftAmount = v.replace(/^(0+)|[^\d]+/g, ''))"
>
<template #prepend></template> <template #prepend></template>
<template #append></template> <template #append></template>
</el-input> </el-input>
<el-input <el-input style="margin-left: 20px; width: 220px" placeholder="请输入金额" v-model="form.giftPoints"
style="margin-left: 20px; width: 220px" @input="(v) => (form.giftPoints = v.replace(/^(0+)|[^\d]+/g, ''))">
placeholder="请输入金额"
v-model="form.giftPoints"
@input="(v) => (form.giftPoints = v.replace(/^(0+)|[^\d]+/g, ''))"
>
<template #prepend></template> <template #prepend></template>
<template #append>积分</template> <template #append>积分</template>
</el-input> </el-input>
@@ -43,21 +31,13 @@
</el-form-item> </el-form-item>
<el-form-item label="选择优惠劵" v-if="form.isGiftCoupon == 1"> <el-form-item label="选择优惠劵" v-if="form.isGiftCoupon == 1">
<div> <div>
<el-button <el-button type="primary" icon="el-icon-plus" @click="$refs.coupon.show([...productIds])">
type="primary"
icon="el-icon-plus"
@click="$refs.coupon.show([...productIds])"
>
添加优惠劵 添加优惠劵
</el-button> </el-button>
</div> </div>
<div class="shop_list"> <div class="shop_list">
<div <div class="item_wrap" style="display: flex; align-items: center; margin-top: 6px"
class="item_wrap" v-for="(item, index) in productIds" :key="index">
style="display: flex; align-items: center; margin-top: 6px"
v-for="(item, index) in productIds"
:key="index"
>
<div class="name">{{ item.title }}</div> <div class="name">{{ item.title }}</div>
<el-button type="text" @click="productIds = []" style="margin-left: 20px"> <el-button type="text" @click="productIds = []" style="margin-left: 20px">
@@ -216,7 +196,6 @@ export default {
if (obj.couponId) { if (obj.couponId) {
this.productIds = [{ title: obj.couponName, id: obj.couponId }]; this.productIds = [{ title: obj.couponName, id: obj.couponId }];
} }
console.log(obj, "调试1");
} }
}, },
close() { close() {