新增分销配置
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
<el-dialog title="添加兑换码" width="500px" v-model="visible" @closed="onClosed">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="80px" label-position="right">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入" :maxlength="50" show-word-limit
|
||||
style="width: 350px;"></el-input>
|
||||
<el-input v-model="form.name" placeholder="请输入" :maxlength="50" style="width: 350px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="有效期" prop="timeScope">
|
||||
<div style="width: 350px;">
|
||||
@@ -13,18 +12,18 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入" :maxlength="8" show-word-limit style="width: 350px;"
|
||||
<el-input v-model="form.amount" placeholder="请输入" :maxlength="8" style="width: 350px;"
|
||||
@input="e => form.amount = filterNumberInput(e)" :disabled="!!form.id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="发行数量" prop="total">
|
||||
<div class="column">
|
||||
<el-input v-model="form.total" placeholder="请输入" :maxlength="4" show-word-limit style="width: 350px;"
|
||||
<el-input v-model="form.total" placeholder="请输入" :maxlength="4" style="width: 350px;"
|
||||
@input="e => form.total = filterNumberInput(e, true)" :disabled="!!form.id"></el-input>
|
||||
<div class="tips" style="color: #999;">单次发行上限1000个,如需更多请分多次创建</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存" prop="stock" v-if="form.id">
|
||||
<el-input v-model="form.stock" placeholder="请输入" :maxlength="4" show-word-limit style="width: 350px;"
|
||||
<el-input v-model="form.stock" placeholder="请输入" :maxlength="4" style="width: 350px;"
|
||||
@input="e => form.stock = filterNumberInput(e, true)"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="gyq_content" v-else>
|
||||
门店未参券兑换码活动,如需开启参与请联系主店
|
||||
门店未参与充值兑换码活动,如需开启参与请联系主店
|
||||
</div>
|
||||
<useShops ref="useShopsRef" />
|
||||
<add ref="addRef" @success="getTableData" />
|
||||
@@ -150,16 +150,20 @@ async function rechargeRedemptionEnableStatusAjax() {
|
||||
const res = await rechargeRedemptionEnableStatus();
|
||||
queryForm.value.isEnable = res.isEnable;
|
||||
|
||||
if (res.useType == 'all') {
|
||||
if (shopInfo.value.shopType == 'only') {
|
||||
isUse.value = true
|
||||
} else {
|
||||
let currentShopId = shopInfo.value.shopId;
|
||||
res.shopIdList.some((item) => {
|
||||
if (item == currentShopId) {
|
||||
isUse.value = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (res.useType == 'all') {
|
||||
isUse.value = true
|
||||
} else {
|
||||
let currentShopId = shopInfo.value.shopId;
|
||||
res.shopIdList.some((item) => {
|
||||
if (item == currentShopId) {
|
||||
isUse.value = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
Reference in New Issue
Block a user