Merge branch 'master' of https://e.coding.net/g-cphe0354/cashier/cashier-web into ymf
This commit is contained in:
@@ -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(',')
|
||||||
|
|||||||
@@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user