Commit a81376ea authored by chenwei's avatar chenwei

礼品列表相关逻辑更新

parent cc33a773
......@@ -49,17 +49,15 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('兑换积分')" prop="pointsRequire">
<el-input
v-model.trim="queryParams.pointsRequire"
:placeholder="$t('请输入')"
:disabled="isDisable"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item :label="$t('兑换网点')" prop="nodeId">
<el-row :gutter="10" v-for="(item, index) in queryParams.nodeIds">
<el-col :span="6">
<el-form-item
:label="$t('兑换网点')"
:prop="'nodeIds.' + index + '.nodeId'"
:rules="rules.nodeIds.nodeId"
>
<el-select
v-model="queryParams.nodeId"
v-model="item.nodeId"
:placeholder="$t('请选择兑换网点')"
:disabled="isDisable"
clearable
......@@ -73,6 +71,28 @@
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
:label="$t('兑换积分')"
:prop="'nodeIds.' + index + 'points'"
:rules="rules.nodeIds.points"
>
<el-input
v-model.trim="item.points"
:placeholder="$t('请输入')"
:disabled="isDisable"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/> </el-form-item
></el-col>
<el-col :span="1">
<el-button
type="primary"
:icon="index == '0' ? 'el-icon-plus' : 'el-icon-minus'"
@click="handleOrderVRule(item, index)"
></el-button>
</el-col>
</el-row>
<el-form-item :label="$t('剩余数量')" prop="quantityRemain">
<el-input
:disabled="isDisable && disabelEnableStatus"
......@@ -271,6 +291,7 @@ export default {
endTime: null,
imgEn: null,
imgZh: null,
nodeIds: [{ nodeId: "", points: "" }],
nodeId: null,
pickMethod: null,
pointsRequire: null,
......@@ -312,16 +333,23 @@ export default {
trigger: "blur",
},
],
pointsRequire: [
nodeIds: {
nodeId: [
{
required: true,
message: this.$t("请选择网点"),
trigger: "change",
},
],
points: [
{
required: true,
message: this.$t("请输入兑换积分"),
trigger: "blur",
},
],
nodeId: [
{ required: true, message: this.$t("请选择网点"), trigger: "change" },
],
},
quantityRemain: [
{
required: true,
......@@ -370,6 +398,13 @@ export default {
};
},
methods: {
handleOrderVRule(item, index) {
if (index == "0") {
this.queryParams.nodeIds.push({ nodeId: "", points: "" });
} else {
this.queryParams.nodeIds.splice(index, 1);
}
},
submit() {
let params = { ...this.queryParams };
params.startTime = this.queryParams.dateRangeCreateTime[0];
......@@ -400,6 +435,7 @@ export default {
this.queryParams = {
allowCount: null,
endTime: null,
nodeIds: [{ nodeId: "", points: "" }],
imgEn: null,
imgZh: null,
nodeId: null,
......
......@@ -148,7 +148,6 @@
></el-table-column>
<el-table-column :label="$t('礼品名称')" align="center">
<template slot-scope="scope">
{{ row }}
<el-button type="text" @click="handleView(scope.row)">{{
isChinese ? scope.row.titleZh : scope.row.titleEn
}}</el-button>
......@@ -224,11 +223,15 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column
:label="$t('已兑换次数')"
align="center"
prop="exchangeCount"
></el-table-column>
<el-table-column :label="$t('已兑换次数')" align="center">
<template slot-scope="scope">
<el-button
type="text"
@click="$router.push('/memberManagement/exchangeRecord')"
>{{ scope.row.exchangeCount }}</el-button
>
</template>
</el-table-column>
<el-table-column
:label="$t('剩余次数')"
align="center"
......
......@@ -39,7 +39,7 @@
<el-form-item :label="$t('状态')">
<dict-selector
clearable
:type="DICT_TYPE.REWARD_REDEEM_STATUS"
:type="DICT_TYPE.GIFT_STATUS"
v-model="queryParams.status"
>
</dict-selector>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment