Commit 8849fbe9 authored by chenwei's avatar chenwei

修复问题

parent ff4def43
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
:placeholder="$t('请输入')" :placeholder="$t('请输入')"
:disabled="isDisable" :disabled="isDisable"
clearable clearable
v-trim v-trim
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
:disabled="isDisable" :disabled="isDisable"
:placeholder="$t('请输入')" :placeholder="$t('请输入')"
clearable clearable
v-trim v-trim
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -79,11 +79,9 @@ ...@@ -79,11 +79,9 @@
:rules="rules.nodeIds.points" :rules="rules.nodeIds.points"
> >
<el-input <el-input
type="number" v-model.trim.number="item.points"
v-model.trim="item.points"
:placeholder="$t('请输入')" :placeholder="$t('请输入')"
:disabled="isDisable" :disabled="isDisable"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/> </el-form-item /> </el-form-item
></el-col> ></el-col>
<el-col :span="1"> <el-col :span="1">
...@@ -130,12 +128,10 @@ ...@@ -130,12 +128,10 @@
<el-form-item :label="$t('允许兑换次数')" prop="allowCount"> <el-form-item :label="$t('允许兑换次数')" prop="allowCount">
<el-input <el-input
class="input-item-width" class="input-item-width"
type="number" v-model.trim.number="queryParams.allowCount"
v-model.trim="queryParams.allowCount"
:placeholder="$t('请输入')" :placeholder="$t('请输入')"
clearable clearable
:disabled="isDisable" :disabled="isDisable"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/> />
</el-form-item> </el-form-item>
<el-row :gutter="10"> <el-row :gutter="10">
...@@ -351,16 +347,17 @@ export default { ...@@ -351,16 +347,17 @@ export default {
message: this.$t("请输入兑换积分"), message: this.$t("请输入兑换积分"),
trigger: "blur", trigger: "blur",
}, },
{ type: "number", message: "输入数字", trigger: "blur" },
], ],
}, },
quantityRemain: [ quantityRemain: [
{ {
required: true, required: true,
message: this.$t("请输入剩余数量"), message: this.$t("请输入剩余数量"),
trigger: "blur", trigger: "blur",
}, },
], ],
pickMethod: [ pickMethod: [
{ {
required: true, required: true,
...@@ -374,6 +371,7 @@ export default { ...@@ -374,6 +371,7 @@ export default {
message: this.$t("请输入允许兑换次数"), message: this.$t("请输入允许兑换次数"),
trigger: "blur", trigger: "blur",
}, },
{ type: "number", message: "输入数字", trigger: "blur" },
], ],
remarkZh: [ remarkZh: [
{ {
...@@ -444,7 +442,7 @@ export default { ...@@ -444,7 +442,7 @@ export default {
imgZh: null, imgZh: null,
nodeId: null, nodeId: null,
pickMethod: null, pickMethod: null,
pointsRequire: null, pointsRequire: null,
remarkEn: null, remarkEn: null,
remarkFr: null, remarkFr: null,
remarkZh: null, remarkZh: null,
...@@ -459,7 +457,7 @@ export default { ...@@ -459,7 +457,7 @@ export default {
}; };
</script> </script>
<style> <style>
.input-item-width{ .input-item-width {
width: 194px; width: 194px;
} }
</style> </style>
...@@ -131,7 +131,8 @@ ...@@ -131,7 +131,8 @@
size="mini" size="mini"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAddReward" @click="handleAddReward"
>{{ $t("添加礼品") }}</el-button> >{{ $t("添加礼品") }}</el-button
>
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" /> <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row> </el-row>
<!-- 礼品列表 --> <!-- 礼品列表 -->
...@@ -154,7 +155,8 @@ ...@@ -154,7 +155,8 @@
<el-image <el-image
:src="firstImg(isChinese ? scope.row.imgZh : scope.row.imgEn)" :src="firstImg(isChinese ? scope.row.imgZh : scope.row.imgEn)"
style="width: 50px; height: 50px" style="width: 50px; height: 50px"
>{{ $t("") }}</el-image> >{{ $t("") }}</el-image
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" :label="$t('开始日期')"> <el-table-column width="100" :label="$t('开始日期')">
...@@ -220,7 +222,8 @@ ...@@ -220,7 +222,8 @@
<el-button <el-button
type="text" type="text"
@click="$router.push('/memberManagement/exchangeRecord')" @click="$router.push('/memberManagement/exchangeRecord')"
>{{ scope.row.exchangeCount }}</el-button> >{{ scope.row.exchangeCount }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -241,7 +244,8 @@ ...@@ -241,7 +244,8 @@
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row)" @click="handleView(scope.row)"
>{{ $t("查看") }}</el-button> >{{ $t("查看") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:giftManagement:close']" v-hasPermi="['ecw:giftManagement:close']"
size="mini" size="mini"
...@@ -249,14 +253,16 @@ ...@@ -249,14 +253,16 @@
icon="el-icon-edit" icon="el-icon-edit"
:disabled="scope.row.status == '2' || scope.row.status == '3'" :disabled="scope.row.status == '2' || scope.row.status == '3'"
@click="handleCloseStatus(scope.row)" @click="handleCloseStatus(scope.row)"
>{{ $t("关闭") }}</el-button> >{{ $t("关闭") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:giftManagement:copy']" v-hasPermi="['ecw:giftManagement:copy']"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="copyRewards(scope.row)" @click="copyRewards(scope.row)"
>{{ $t("复制") }}</el-button> >{{ $t("复制") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:giftManagement:postpone']" v-hasPermi="['ecw:giftManagement:postpone']"
size="mini" size="mini"
...@@ -264,7 +270,8 @@ ...@@ -264,7 +270,8 @@
icon="el-icon-edit" icon="el-icon-edit"
:disabled="scope.row.status != '1'" :disabled="scope.row.status != '1'"
@click="handlePostpone(scope.row)" @click="handlePostpone(scope.row)"
>{{ $t("延期")}}</el-button> >{{ $t("延期") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:giftManagement:delete']" v-hasPermi="['ecw:giftManagement:delete']"
size="mini" size="mini"
...@@ -272,7 +279,8 @@ ...@@ -272,7 +279,8 @@
icon="el-icon-delete" icon="el-icon-delete"
:disabled="scope.row.status != '2'" :disabled="scope.row.status != '2'"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>{{ $t("删除") }}</el-button> >{{ $t("删除") }}</el-button
>
<el-button <el-button
v-has-permi="['ecw:giftManagement:edit']" v-has-permi="['ecw:giftManagement:edit']"
size="mini" size="mini"
...@@ -280,23 +288,30 @@ ...@@ -280,23 +288,30 @@
:disabled="scope.row.status != '2' && scope.row.status != '1'" :disabled="scope.row.status != '2' && scope.row.status != '1'"
icon="el-icon-collection" icon="el-icon-collection"
@click="editRewards(scope.row)" @click="editRewards(scope.row)"
>{{ $t("编辑") }}</el-button> >{{ $t("编辑") }}</el-button
>
<el-button <el-button
v-has-permi="['ecw:giftManagement:enable']" v-has-permi="['ecw:giftManagement:enable']"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-user" icon="el-icon-user"
:disabled="scope.row.status == '1' || scope.row.status == '3' || scope.row.status == '4'" :disabled="
scope.row.status == '1' ||
scope.row.status == '3' ||
scope.row.status == '4'
"
@click="handleLaunchRewards(scope.row)" @click="handleLaunchRewards(scope.row)"
>{{ $t("启用") }}</el-button> >{{ $t("启用") }}</el-button
>
<el-button <el-button
v-has-permi="['ecw:giftManagement:exchange']" v-has-permi="['ecw:giftManagement:exchange']"
:disabled="scope.row.status == '3' || scope.row.status == '4'" :disabled="scope.row.status == '3' || scope.row.status == '4'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-user" icon="el-icon-user"
@click="handleExchange(scope.row)" @click="handleExchange(scope.row)"
>{{ $t("兑换") }}</el-button> >{{ $t("兑换") }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -350,17 +365,17 @@ import { ...@@ -350,17 +365,17 @@ import {
deleteRewards, deleteRewards,
copyRewardsAPI, copyRewardsAPI,
changeRewardsStatus, changeRewardsStatus,
delayRewards delayRewards,
} from '@/api/ecw/giftManagement' } from "@/api/ecw/giftManagement";
import { getDictDatas, DICT_TYPE } from '@/utils/dict' import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { parseTime } from '../../../utils/ruoyi' import { parseTime } from "../../../utils/ruoyi";
import OperatingGift from '@/views/ecw/giftManagement/components/operatingGift.vue' import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue";
import { uploadFile } from '@/api/infra/file' import { uploadFile } from "@/api/infra/file";
import ImageUpload from '@/components/ImageUpload' import ImageUpload from "@/components/ImageUpload";
export default { export default {
name: 'GiftManagementList', name: "GiftManagementList",
components: { components: {
OperatingGift OperatingGift,
}, },
data() { data() {
return { return {
...@@ -377,13 +392,13 @@ export default { ...@@ -377,13 +392,13 @@ export default {
// 礼品列表 // 礼品列表
list: [], list: [],
// 弹出层标题 // 弹出层标题
operatingPagetitle: '', operatingPagetitle: "",
// 是否显示弹出层 // 是否显示弹出层
dialogVisible: false, dialogVisible: false,
rewardsItem: {}, rewardsItem: {},
dateRangeCreateTime: [], dateRangeCreateTime: [],
postponeDatetime: '', postponeDatetime: "",
postponeRewardsID: '', postponeRewardsID: "",
dialogPostponeVisible: false, dialogPostponeVisible: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
...@@ -394,200 +409,200 @@ export default { ...@@ -394,200 +409,200 @@ export default {
pointsRequireSymbol: null, pointsRequireSymbol: null,
pickMethod: null, pickMethod: null,
nodeId: null, nodeId: null,
status: null, status: "1",
remark: null, remark: null,
quantityRemainSymbol: null, quantityRemainSymbol: null,
quantityRemain: null, quantityRemain: null,
beginCreateTime: null, beginCreateTime: null,
endCreateTime: null endCreateTime: null,
}, },
// 网点 // 网点
nodeList: [], nodeList: [],
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7 return time.getTime() < Date.now() - 8.64e7;
} },
} },
} };
}, },
computed: { computed: {
isChinese() { isChinese() {
return this.$i18n.locale === 'zh_CN' return this.$i18n.locale === "zh_CN";
} },
}, },
created() { created() {
this.getList() this.getList();
this.getNodeList() this.getNodeList();
}, },
activated() { activated() {
this.getList() this.getList();
}, },
methods: { methods: {
arraysEqual(arr1, arr2) { arraysEqual(arr1, arr2) {
return arr1.filter((current) => { return arr1.filter((current) => {
return !!arr2.find((item) => item == current.value.toString()) return !!arr2.find((item) => item == current.value.toString());
}) });
}, },
handleRewardsStatus(status) { handleRewardsStatus(status) {
return this.getDictDatas(DICT_TYPE.GIFT_STATUS).filter( return this.getDictDatas(DICT_TYPE.GIFT_STATUS).filter(
(dicItem) => dicItem.value.toString() == status (dicItem) => dicItem.value.toString() == status
)[0] )[0];
}, },
firstImg(imgString) { firstImg(imgString) {
if (!imgString || imgString == '') return imgString if (!imgString || imgString == "") return imgString;
const imgs = imgString.split(',') const imgs = imgString.split(",");
return imgs.length ? imgs[0] : null return imgs.length ? imgs[0] : null;
}, },
handlePickMethod(pickMethod) { handlePickMethod(pickMethod) {
const pickMethodLabel = [] const pickMethodLabel = [];
if (this.isChinese) { if (this.isChinese) {
this.arraysEqual( this.arraysEqual(
this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING), this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING),
pickMethod.split(',') pickMethod.split(",")
).forEach((element) => { ).forEach((element) => {
pickMethodLabel.push(element.label) pickMethodLabel.push(element.label);
}) });
} else { } else {
this.arraysEqual( this.arraysEqual(
this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING), this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING),
pickMethod.split(',') pickMethod.split(",")
).forEach((element) => { ).forEach((element) => {
pickMethodLabel.push(element.labelEn) pickMethodLabel.push(element.labelEn);
}) });
} }
return pickMethodLabel.join() return pickMethodLabel.join();
}, },
handleExchangeNodeId(nodeId) { handleExchangeNodeId(nodeId) {
return this.nodeList.filter((nodeItem) => nodeItem.id == nodeId)[0] return this.nodeList.filter((nodeItem) => nodeItem.id == nodeId)[0];
}, },
handleAddReward() { handleAddReward() {
this.rewardsItem = {} this.rewardsItem = {};
this.dialogVisible = true this.dialogVisible = true;
this.operatingPagetitle = '3' this.operatingPagetitle = "3";
}, },
handleExchange(row) { handleExchange(row) {
this.$router.push({ this.$router.push({
path: '/giftManagement/bulkExchange', path: "/giftManagement/bulkExchange",
query: { rewardsID: row.id } query: { rewardsID: row.id },
}) });
}, },
/** 延期按钮操作 */ /** 延期按钮操作 */
handlePostpone(row) { handlePostpone(row) {
this.postponeRewardsID = row.id this.postponeRewardsID = row.id;
this.dialogPostponeVisible = true this.dialogPostponeVisible = true;
}, },
confirmPostponeRewards() { confirmPostponeRewards() {
this.dialogPostponeVisible = false this.dialogPostponeVisible = false;
delayRewards({ delayRewards({
id: this.postponeRewardsID, id: this.postponeRewardsID,
endTime: this.postponeDatetime endTime: this.postponeDatetime,
}).then((res) => { }).then((res) => {
this.getList() this.getList();
this.$message.success(this.$t('延期成功')) this.$message.success(this.$t("延期成功"));
}) });
}, },
/** 关闭按钮操作 */ /** 关闭按钮操作 */
handleCloseStatus(row) { handleCloseStatus(row) {
this.$confirm(this.$t('是否关闭当前礼品?'), this.$t('提示'), { this.$confirm(this.$t("是否关闭当前礼品?"), this.$t("提示"), {
confirmButtonText: this.$t('确定'), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t('取消'), cancelButtonText: this.$t("取消"),
type: 'warning' type: "warning",
}) })
.then((_) => { .then((_) => {
return changeRewardsStatus({ id: row.id, status: '3' }) return changeRewardsStatus({ id: row.id, status: "3" });
}) })
.then((res) => { .then((res) => {
this.getList() this.getList();
this.$message.success(this.$t('关闭成功')) this.$message.success(this.$t("关闭成功"));
}) })
.catch((_) => { .catch((_) => {
// this.queryAllData(); // this.queryAllData();
}) });
}, },
// 启用礼品状态 // 启用礼品状态
handleLaunchRewards(row) { handleLaunchRewards(row) {
this.$confirm(this.$t('是否启用当前礼品?'), this.$t('提示'), { this.$confirm(this.$t("是否启用当前礼品?"), this.$t("提示"), {
confirmButtonText: this.$t('确定'), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t('取消'), cancelButtonText: this.$t("取消"),
type: 'warning' type: "warning",
}) })
.then(() => { .then(() => {
changeRewardsStatus({ id: row.id, status: '1' }).then((r) => { changeRewardsStatus({ id: row.id, status: "1" }).then((r) => {
this.$message.success(this.$t('启用成功')) this.$message.success(this.$t("启用成功"));
this.getList() this.getList();
}) });
}) })
.catch(() => {}) .catch(() => {});
}, },
getNodeList() { getNodeList() {
getNodeList().then((res) => { getNodeList().then((res) => {
this.nodeList = res.data this.nodeList = res.data;
}) });
}, },
getList() { getList() {
this.loading = true this.loading = true;
// 处理查询参数 // 处理查询参数
const params = { ...this.queryParams } const params = { ...this.queryParams };
this.addBeginAndEndTime( this.addBeginAndEndTime(
params, params,
this.dateRangeCreateTime, this.dateRangeCreateTime,
'createTime', "createTime",
false false
) );
getGiftList(params).then((res) => { getGiftList(params).then((res) => {
this.loading = false this.loading = false;
this.list = res.data.list this.list = res.data.list;
this.total = res.data.total this.total = res.data.total;
}) });
}, },
// 新增潜在客户 // 新增潜在客户
handleAddPotential() { handleAddPotential() {
this.$refs.potentialCustom.dialogTableVisible = true this.$refs.potentialCustom.dialogTableVisible = true;
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal this.$modal
.confirm(this.$t('是否确认删除此礼品')) .confirm(this.$t("是否确认删除此礼品"))
.then(function() { .then(function () {
return deleteRewards({ id: row.id }) return deleteRewards({ id: row.id });
}) })
.then(() => { .then(() => {
this.getList() this.getList();
this.$modal.msgSuccess(this.$t('删除成功')) this.$modal.msgSuccess(this.$t("删除成功"));
}) })
.catch(() => {}) .catch(() => {});
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.$nextTick(() => { this.$nextTick(() => {
this.queryParams.page = 1 this.queryParams.page = 1;
this.getList() this.getList();
}) });
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleView(row) { handleView(row) {
this.dialogVisible = true this.dialogVisible = true;
this.operatingPagetitle = '1' this.operatingPagetitle = "1";
this.rewardsItem = row this.rewardsItem = row;
}, },
/** 编辑按钮操作 */ /** 编辑按钮操作 */
editRewards(row) { editRewards(row) {
this.dialogVisible = true this.dialogVisible = true;
this.operatingPagetitle = '2' this.operatingPagetitle = "2";
this.rewardsItem = row this.rewardsItem = row;
}, },
/** 复制按钮操作 */ /** 复制按钮操作 */
copyRewards(row) { copyRewards(row) {
copyRewardsAPI(row.id).then((res) => { copyRewardsAPI(row.id).then((res) => {
this.$modal.msgSuccess(this.$t('复制成功')) this.$modal.msgSuccess(this.$t("复制成功"));
this.handleQuery() this.handleQuery();
}) });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeCreateTime = [] this.dateRangeCreateTime = [];
this.queryParams = { this.queryParams = {
page: 1, page: 1,
rows: 10, rows: 10,
...@@ -596,19 +611,19 @@ export default { ...@@ -596,19 +611,19 @@ export default {
level: null, level: null,
source: null, source: null,
customerService: null, customerService: null,
status: null, status: "1",
department: null, department: null,
creditLevel: null, creditLevel: null,
country: null, country: null,
memberCode: null, memberCode: null,
memberName: null, memberName: null,
memberMobile: null, memberMobile: null,
memberAreaCode: null memberAreaCode: null,
} };
this.handleQuery() this.handleQuery();
} },
} },
} };
</script> </script>
<style> <style>
.rewardstToolTip { .rewardstToolTip {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
ref="queryForm" ref="queryForm"
size="small" size="small"
:rules="rules" :rules="rules"
class="integral-rule-operate"
:disabled="showViewTime" :disabled="showViewTime"
label-width="120px" label-width="120px"
> >
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
v-model="queryParams.titleZh" v-model="queryParams.titleZh"
:placeholder="$t('请输入查找')" :placeholder="$t('请输入查找')"
clearable clearable
v-trim v-trim
/> />
<el-button <el-button
size="mini" size="mini"
...@@ -43,7 +44,7 @@ ...@@ -43,7 +44,7 @@
v-model="queryParams.titleEn" v-model="queryParams.titleEn"
:placeholder="$t('请输入查找')" :placeholder="$t('请输入查找')"
clearable clearable
v-trim v-trim
/> </el-form-item /> </el-form-item
></el-col> ></el-col>
</el-row> </el-row>
...@@ -108,7 +109,7 @@ ...@@ -108,7 +109,7 @@
v-model="queryParams.extraRecommend.shareContentZh" v-model="queryParams.extraRecommend.shareContentZh"
:placeholder="$t('请输入分享文案')" :placeholder="$t('请输入分享文案')"
clearable clearable
v-trim v-trim
/> </el-form-item /> </el-form-item
></el-col> ></el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -122,7 +123,7 @@ ...@@ -122,7 +123,7 @@
v-model="queryParams.extraRecommend.shareContentEn" v-model="queryParams.extraRecommend.shareContentEn"
:placeholder="$t('请输入分享文案')" :placeholder="$t('请输入分享文案')"
clearable clearable
v-trim v-trim
/> </el-form-item /> </el-form-item
></el-col> ></el-col>
</el-row> </el-row>
...@@ -177,11 +178,7 @@ ...@@ -177,11 +178,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('积分')" v-if="queryParams.type == '1'" required>
:label="$t('积分')"
v-if="queryParams.type == '1'"
required
>
<el-row <el-row
type="flex" type="flex"
justify="start" justify="start"
...@@ -283,7 +280,7 @@ ...@@ -283,7 +280,7 @@
clearable clearable
placement="bottom-start" placement="bottom-start"
v-model="queryParams.dateRangeCreateTime" v-model="queryParams.dateRangeCreateTime"
style="width: 240px" style="width: 300px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-" range-separator="-"
:start-placeholder="$t('开始日期')" :start-placeholder="$t('开始日期')"
...@@ -591,6 +588,8 @@ export default { ...@@ -591,6 +588,8 @@ export default {
}; };
const validatehigh = (rule, value, callback) => { const validatehigh = (rule, value, callback) => {
const index = Number(rule.field.split(".")[2]); const index = Number(rule.field.split(".")[2]);
console.log("000000", index);
console.log("0000001", this.queryParams.extraOrderV);
if (index == "0") { if (index == "0") {
if ( if (
this.queryParams.extraOrderV.orderVRule[index].low && this.queryParams.extraOrderV.orderVRule[index].low &&
...@@ -608,7 +607,7 @@ export default { ...@@ -608,7 +607,7 @@ export default {
} else { } else {
callback(); callback();
} }
} else if (index > "0") { } else if (index > 0) {
if ( if (
this.queryParams.extraOrderV.orderVRule[index].low && this.queryParams.extraOrderV.orderVRule[index].low &&
this.queryParams.extraOrderV.orderVRule[index].low >= this.queryParams.extraOrderV.orderVRule[index].low >=
...@@ -616,8 +615,9 @@ export default { ...@@ -616,8 +615,9 @@ export default {
) { ) {
callback(this.$t("本次最终积分应大于本次开始积分")); callback(this.$t("本次最终积分应大于本次开始积分"));
} else if ( } else if (
this.queryParams.extraOrderV.orderVRule[index + 1]?.low &&
this.queryParams.extraOrderV.orderVRule[index].high <= this.queryParams.extraOrderV.orderVRule[index].high <=
this.queryParams.extraOrderV.orderVRule[index + 1].low this.queryParams.extraOrderV.orderVRule[index + 1].low
) { ) {
callback(this.$t("本次最终积分应小于下一次开始积分")); callback(this.$t("本次最终积分应小于下一次开始积分"));
} else { } else {
...@@ -1057,6 +1057,7 @@ export default { ...@@ -1057,6 +1057,7 @@ export default {
}, },
//保存 //保存
handleSaveIntegralRule() { handleSaveIntegralRule() {
console.log("23333");
this.$refs["queryForm"].validate((valid) => { this.$refs["queryForm"].validate((valid) => {
if (valid) { if (valid) {
let params = deepClone(this.queryParams); let params = deepClone(this.queryParams);
...@@ -1139,6 +1140,9 @@ export default { ...@@ -1139,6 +1140,9 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .integral-rule-operate .el-input {
width: 300px;
}
.del-btn { .del-btn {
color: red; color: red;
padding-left: 120px; padding-left: 120px;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('兑换方式')"> <el-form-item :label="$t('领取方式')">
<dict-selector <dict-selector
v-model="queryParams.redeemType" v-model="queryParams.redeemType"
clearable clearable
...@@ -127,28 +127,32 @@ ...@@ -127,28 +127,32 @@
size="mini" size="mini"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleNewExchange" @click="handleNewExchange"
>{{ $t("新增兑换") }}</el-button> >{{ $t("新增兑换") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:memberManagement:batchWriteOff']" v-hasPermi="['ecw:memberManagement:batchWriteOff']"
type="success" type="success"
size="mini" size="mini"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleBatchVerify" @click="handleBatchVerify"
>{{ $t("批量核销") }}</el-button> >{{ $t("批量核销") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:memberManagement:export']" v-hasPermi="['ecw:memberManagement:export']"
type="success" type="success"
size="mini" size="mini"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleBatchExport" @click="handleBatchExport"
>{{ $t("导出") }}</el-button> >{{ $t("导出") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:memberManagement:exchangeoInfoImport']" v-hasPermi="['ecw:memberManagement:exchangeoInfoImport']"
type="success" type="success"
size="mini" size="mini"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleShowFileUploadDialog" @click="handleShowFileUploadDialog"
>{{ $t("兑换信息导入") }}</el-button> >{{ $t("兑换信息导入") }}</el-button
>
<right-toolbar <right-toolbar
:show-search.sync="showSearch" :show-search.sync="showSearch"
@queryTable="handleQueryPagination" @queryTable="handleQueryPagination"
...@@ -173,17 +177,11 @@ ...@@ -173,17 +177,11 @@
align="center" align="center"
prop="rewardCode" prop="rewardCode"
/> />
<el-table-column <el-table-column :label="$t('礼品名称')" align="center">
:label="$t('礼品名称')" <template #default="{ row }">
align="center" <el-button type="text" @click="handleShowRewardsDetail(row)">{{
> isChinese ? row.rewardTitleZh : row.rewardTitleEn
<template #default="{ row }"> }}</el-button>
<el-button
type="text"
@click="
handleShowRewardsDetail(row)
"
>{{isChinese ? row.rewardTitleZh : row.rewardTitleEn }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('会员名称')" align="center"> <el-table-column :label="$t('会员名称')" align="center">
...@@ -193,12 +191,14 @@ ...@@ -193,12 +191,14 @@
@click=" @click="
$router.push('/member/member/member-details/' + row.memberId) $router.push('/member/member/member-details/' + row.memberId)
" "
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button> >{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('兑换时间')" align="center"> <el-table-column :label="$t('兑换时间')" align="center">
<template #default="{ row }"> <template #default="{ row }">
{{ parseTime(row.redemptionTime) || "/" }}</template> {{ parseTime(row.redemptionTime) || "/" }}</template
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:label="$t('兑换积分')" :label="$t('兑换积分')"
...@@ -276,7 +276,8 @@ ...@@ -276,7 +276,8 @@
icon="el-icon-view" icon="el-icon-view"
:disabled="scope.row.status != '1'" :disabled="scope.row.status != '1'"
@click="handleRewardCancel(scope.row)" @click="handleRewardCancel(scope.row)"
>{{ $t("撤销") }}</el-button> >{{ $t("撤销") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:memberManagement:edit']" v-hasPermi="['ecw:memberManagement:edit']"
size="mini" size="mini"
...@@ -284,14 +285,16 @@ ...@@ -284,14 +285,16 @@
icon="el-icon-edit" icon="el-icon-edit"
:disabled="scope.row.status != '1'" :disabled="scope.row.status != '1'"
@click="handleRewardEdit(scope.row)" @click="handleRewardEdit(scope.row)"
>{{ $t("编辑") }}</el-button> >{{ $t("编辑") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:memberManagement:view']" v-hasPermi="['ecw:memberManagement:view']"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleViewRecord(scope.row)" @click="handleViewRecord(scope.row)"
>{{ $t("查看") }}</el-button> >{{ $t("查看") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:memberManagement:verification']" v-hasPermi="['ecw:memberManagement:verification']"
size="mini" size="mini"
...@@ -299,7 +302,8 @@ ...@@ -299,7 +302,8 @@
icon="el-icon-edit" icon="el-icon-edit"
:disabled="scope.row.status != '1'" :disabled="scope.row.status != '1'"
@click="handleVerify(scope.row)" @click="handleVerify(scope.row)"
>{{ $t("核销") }}</el-button> >{{ $t("核销") }}</el-button
>
<el-button <el-button
v-hasPermi="['ecw:memberManagement:verificationRollback']" v-hasPermi="['ecw:memberManagement:verificationRollback']"
size="mini" size="mini"
...@@ -307,7 +311,8 @@ ...@@ -307,7 +311,8 @@
icon="el-icon-delete" icon="el-icon-delete"
:disabled="scope.row.status != '2'" :disabled="scope.row.status != '2'"
@click="handleVerificationRollback(scope.row)" @click="handleVerificationRollback(scope.row)"
>{{ $t("核销回退") }}</el-button> >{{ $t("核销回退") }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -351,7 +356,7 @@ ...@@ -351,7 +356,7 @@
:underline="false" :underline="false"
style="font-size: 12px; vertical-align: baseline" style="font-size: 12px; vertical-align: baseline"
@click="importTemplate" @click="importTemplate"
>{{ $t("下载模板") }} >{{ $t("下载模板") }}
</el-link> </el-link>
</div> </div>
</el-upload> </el-upload>
...@@ -407,8 +412,8 @@ ...@@ -407,8 +412,8 @@
</span> </span>
</el-dialog> </el-dialog>
<!-- 查看 礼品 --> <!-- 查看 礼品 -->
<operating-gift <operating-gift
ref="operatingGift" ref="operatingGift"
:title="operatingPagetitle" :title="operatingPagetitle"
:rewards-details="rewardsItem" :rewards-details="rewardsItem"
...@@ -418,23 +423,23 @@ ...@@ -418,23 +423,23 @@
</div> </div>
</template> </template>
<script> <script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict' import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getNodeList, getRewardsDetails } from '@/api/ecw/giftManagement' import { getNodeList, getRewardsDetails } from "@/api/ecw/giftManagement";
import { import {
queryMemberExchangeRecord, queryMemberExchangeRecord,
batchVerifyAPI, batchVerifyAPI,
batchRecordExport, batchRecordExport,
batchRecordImportTemplate, batchRecordImportTemplate,
rewardCancelQuery, rewardCancelQuery,
verifyRollback verifyRollback,
} from '@/api/ecw/memberManagement' } from "@/api/ecw/memberManagement";
import { getNowDateTime, parseTime } from '@/utils/ruoyi' import { getNowDateTime, parseTime } from "@/utils/ruoyi";
import { getBaseHeader } from '@/utils/request' import { getBaseHeader } from "@/utils/request";
import OperatingGift from '@/views/ecw/giftManagement/components/operatingGift.vue' import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue";
export default { export default {
name: 'ExchangeRecord', name: "ExchangeRecord",
components: { components: {
OperatingGift OperatingGift,
}, },
data() { data() {
return { return {
...@@ -442,7 +447,7 @@ export default { ...@@ -442,7 +447,7 @@ export default {
// 是否显示弹出层(用户导入) // 是否显示弹出层(用户导入)
open: false, open: false,
// 弹出层标题(用户导入) // 弹出层标题(用户导入)
title: this.$t('兑换信息导入'), title: this.$t("兑换信息导入"),
// 是否禁用上传 // 是否禁用上传
isUploading: false, isUploading: false,
// 设置上传的请求头部 // 设置上传的请求头部
...@@ -450,20 +455,20 @@ export default { ...@@ -450,20 +455,20 @@ export default {
// 上传的地址 // 上传的地址
url: url:
process.env.VUE_APP_BASE_API + process.env.VUE_APP_BASE_API +
'/admin-api/reward/redeem/record/import' "/admin-api/reward/redeem/record/import",
}, },
// 批量核销 // 批量核销
dialogBatchVerify: false, dialogBatchVerify: false,
batchVerifyForm: { batchVerifyForm: {
ids: [], ids: [],
verifyTime: '', verifyTime: "",
verifyUser: '' verifyUser: "",
}, },
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
selectedMember: [], selectedMember: [],
cityList: [], cityList: [],
operatingPagetitle: '', operatingPagetitle: "",
rewardsItem: {}, rewardsItem: {},
dateRangeCreateTime: [], dateRangeCreateTime: [],
total: 0, total: 0,
...@@ -471,270 +476,270 @@ export default { ...@@ -471,270 +476,270 @@ export default {
dialogVisible: false, dialogVisible: false,
memberList: [], memberList: [],
formQuery: { formQuery: {
comment: '', comment: "",
memberIds: [], memberIds: [],
operateType: null, operateType: null,
scoreCount: null scoreCount: null,
}, },
queryParams: { queryParams: {
rewardTitle: '', rewardTitle: "",
memberName: '', // 会员昵称 memberName: "", // 会员昵称
redeemType: '', // 兑换方式 redeemType: "", // 兑换方式
status: '', status: "",
rewardCount: '', rewardCount: "",
rewardCountOperate: '', rewardCountOperate: "",
rewardCode: '', rewardCode: "",
entrance: '', // 兑换入口 entrance: "", // 兑换入口
startTime: '', startTime: "",
endTime: '', endTime: "",
nodeId: '', nodeId: "",
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10,
}, },
// 网点 // 网点
nodeList: [] nodeList: [],
} };
}, },
computed: { computed: {
isChinese() { isChinese() {
return this.$i18n.locale === 'zh_CN' return this.$i18n.locale === "zh_CN";
} },
}, },
created() { created() {
this.getNodeListAPI() this.getNodeListAPI();
this.handleQuery() this.handleQuery();
}, },
activated() { activated() {
this.handleQuery() this.handleQuery();
}, },
methods: { methods: {
handleShowRewardsDetail(row){ handleShowRewardsDetail(row) {
let params = { let params = {
id: row.rewardId id: row.rewardId,
}; };
getRewardsDetails(params).then((res) => { getRewardsDetails(params).then((res) => {
this.dialogVisible = true this.dialogVisible = true;
this.operatingPagetitle = '1' this.operatingPagetitle = "1";
this.rewardsItem = res.data; this.rewardsItem = res.data;
}); });
}, },
// 核销回退 // 核销回退
handleVerificationRollback(row) { handleVerificationRollback(row) {
this.$confirm(this.$t('是否继续核销回退?'), this.$t('提示'), { this.$confirm(this.$t("是否继续核销回退?"), this.$t("提示"), {
confirmButtonText: this.$t('确定'), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t('取消'), cancelButtonText: this.$t("取消"),
type: 'warning' type: "warning",
}) })
.then(() => { .then(() => {
const params = { const params = {
redeemIds: [row.id] redeemIds: [row.id],
} };
verifyRollback(params).then((res) => { verifyRollback(params).then((res) => {
this.$message({ this.$message({
type: 'success', type: "success",
message: this.$t('回退成功!') message: this.$t("回退成功!"),
}) });
this.handleQuery() this.handleQuery();
}) });
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: 'info', type: "info",
message: this.$t('已取消回退') message: this.$t("已取消回退"),
}) });
}) });
}, },
// 核销 // 核销
handleVerify(row) { handleVerify(row) {
this.$router.push({ this.$router.push({
path: '/memberManagement/exchangeRecordOperation', path: "/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: 'verify' } query: { exchangeRewardID: row.id, pageStatus: "verify" },
}) });
}, },
// 查看按钮操作 // 查看按钮操作
handleViewRecord(row) { handleViewRecord(row) {
this.$router.push({ this.$router.push({
path: '/memberManagement/exchangeRecordOperation', path: "/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: 'view' } query: { exchangeRewardID: row.id, pageStatus: "view" },
}) });
}, },
// 兑换记录编辑操作 // 兑换记录编辑操作
handleRewardEdit(row) { handleRewardEdit(row) {
this.$router.push({ this.$router.push({
path: '/memberManagement/exchangeRecordOperation', path: "/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: 'edit' } query: { exchangeRewardID: row.id, pageStatus: "edit" },
}) });
}, },
// 撤销按钮操作 // 撤销按钮操作
handleRewardCancel(row) { handleRewardCancel(row) {
this.$confirm( this.$confirm(
this.$t('此操作积分可能存在到期积分, 撤销后积分将进行扣除,是否继续?'), this.$t("此操作积分可能存在到期积分, 撤销后积分将进行扣除,是否继续?"),
this.$t('提示'), this.$t("提示"),
{ {
confirmButtonText: this.$t('确定'), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t('取消'), cancelButtonText: this.$t("取消"),
type: 'warning' type: "warning",
} }
) )
.then(() => { .then(() => {
const params = { const params = {
id: row.id id: row.id,
} };
rewardCancelQuery(params).then((res) => { rewardCancelQuery(params).then((res) => {
this.$message({ this.$message({
type: 'success', type: "success",
message: this.$t('撤销成功!') message: this.$t("撤销成功!"),
}) });
this.handleQuery() this.handleQuery();
}) });
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: 'info', type: "info",
message: this.$t('已取消撤销') message: this.$t("已取消撤销"),
}) });
}) });
}, },
// 下载导入模板 // 下载导入模板
importTemplate() { importTemplate() {
batchRecordImportTemplate().then((res) => { batchRecordImportTemplate().then((res) => {
this.$download.excel(res, '用户导入模板.xls') this.$download.excel(res, "用户导入模板.xls");
this.$message({ this.$message({
message: this.$t('下载模板成功'), message: this.$t("下载模板成功"),
type: 'success' type: "success",
}) });
}) });
}, },
// 导入 // 导入
handleShowFileUploadDialog() { handleShowFileUploadDialog() {
this.upload.open = true this.upload.open = true;
}, },
handleFileUploadProgress(event, file, fileList) { handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true this.upload.isUploading = true;
}, },
// 文件上传成功处理 // 文件上传成功处理
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
if (response.code == '1001011027') { if (response.code == "1001011027") {
this.$message.error(response.msg) this.$message.error(response.msg);
} }
if ( if (
!response.data.redeemIdFailedMap || !response.data.redeemIdFailedMap ||
JSON.stringify(response.data.redeemIdFailedMap) == '{}' JSON.stringify(response.data.redeemIdFailedMap) == "{}"
) { ) {
this.upload.open = false this.upload.open = false;
this.$modal.msgSuccess(this.$t('导入成功')) this.$modal.msgSuccess(this.$t("导入成功"));
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles();
this.upload.isUploading = false this.upload.isUploading = false;
this.handleQuery() this.handleQuery();
return return;
} }
this.upload.open = false this.upload.open = false;
this.upload.isUploading = false this.upload.isUploading = false;
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles();
// 拼接提示语 // 拼接提示语
const data = response.data const data = response.data;
let text = `${this.$t('导入失败:')}` let text = `${this.$t("导入失败:")}`;
for (const username in data.redeemIdFailedMap) { for (const username in data.redeemIdFailedMap) {
text += text +=
'<br />&nbsp;&nbsp;&nbsp;&nbsp;' + "<br />&nbsp;&nbsp;&nbsp;&nbsp;" +
username + username +
this.$t('') + this.$t("") +
data.redeemIdFailedMap[username] data.redeemIdFailedMap[username];
} }
text += `<br />&nbsp;&nbsp;&nbsp;&nbsp;${this.$t('以上数据格式有问题')}` text += `<br />&nbsp;&nbsp;&nbsp;&nbsp;${this.$t("以上数据格式有问题")}`;
this.$alert(text, this.$t('导入结果'), { this.$alert(text, this.$t("导入结果"), {
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true,
}) });
}, },
// 提交上传文件 // 提交上传文件
submitFileForm() { submitFileForm() {
this.$refs.upload.submit() this.$refs.upload.submit();
}, },
// 导出 // 导出
handleBatchExport() { handleBatchExport() {
const params = { ...this.queryParams } const params = { ...this.queryParams };
if (this.dateRangeCreateTime) { if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0] params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1] params.endTime = this.dateRangeCreateTime[1];
} }
batchRecordExport(params).then((res) => { batchRecordExport(params).then((res) => {
this.$message({ this.$message({
message: this.$t('已加入导出队列,请稍后在下载日志中下载'), message: this.$t("已加入导出队列,请稍后在下载日志中下载"),
type: 'success' type: "success",
}) });
}) });
}, },
// 批量核销确认按钮 // 批量核销确认按钮
handleBatchVerifySubmit() { handleBatchVerifySubmit() {
this.$confirm(this.$t('确认提交?')) this.$confirm(this.$t("确认提交?"))
.then((_) => { .then((_) => {
const params = { ...this.batchVerifyForm } const params = { ...this.batchVerifyForm };
batchVerifyAPI(params).then((res) => { batchVerifyAPI(params).then((res) => {
this.dialogBatchVerify = false this.dialogBatchVerify = false;
this.$message({ this.$message({
message: this.$t('核销成功'), message: this.$t("核销成功"),
type: 'success' type: "success",
}) });
}) });
}) })
.catch((_) => {}) .catch((_) => {});
}, },
// 批量核销 // 批量核销
handleBatchVerify() { handleBatchVerify() {
if (this.batchVerifyForm.ids.length > 0) { if (this.batchVerifyForm.ids.length > 0) {
this.dialogBatchVerify = true this.dialogBatchVerify = true;
this.batchVerifyForm.verifyUser = this.$store.getters.name this.batchVerifyForm.verifyUser = this.$store.getters.name;
this.batchVerifyForm.verifyTime = getNowDateTime() this.batchVerifyForm.verifyTime = getNowDateTime();
} else { } else {
this.$message({ this.$message({
message: this.$t('请先选择兑换记录'), message: this.$t("请先选择兑换记录"),
type: 'warning' type: "warning",
}) });
} }
}, },
// 新增兑换 // 新增兑换
handleNewExchange() { handleNewExchange() {
this.$router.push({ this.$router.push({
path: '/memberManagement/exchangeRecordOperation' path: "/memberManagement/exchangeRecordOperation",
}) });
}, },
getNodeListAPI() { getNodeListAPI() {
getNodeList().then((res) => { getNodeList().then((res) => {
this.nodeList = res.data this.nodeList = res.data;
}) });
}, },
handleExchangeRedeemType(id) { handleExchangeRedeemType(id) {
return this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING).filter( return this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING).filter(
(item) => item.value == id (item) => item.value == id
)[0] )[0];
}, },
// 兑换入口 // 兑换入口
handleExchangeEntrance(id) { handleExchangeEntrance(id) {
return this.getDictDatas(DICT_TYPE.PLATFORM_TYPE).filter( return this.getDictDatas(DICT_TYPE.PLATFORM_TYPE).filter(
(item) => item.value == id (item) => item.value == id
)[0] )[0];
}, },
// 兑换状态 // 兑换状态
handleExchangeStatus(id) { handleExchangeStatus(id) {
return this.getDictDatas(DICT_TYPE.REWARD_REDEEM_STATUS).filter( return this.getDictDatas(DICT_TYPE.REWARD_REDEEM_STATUS).filter(
(item) => item.value == id (item) => item.value == id
)[0] )[0];
}, },
handleClose(done) { handleClose(done) {
this.$confirm(this.$t('确认关闭?')) this.$confirm(this.$t("确认关闭?"))
.then((_) => { .then((_) => {
done() done();
}) })
.catch((_) => {}) .catch((_) => {});
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.selectedMember = val this.selectedMember = val;
this.batchVerifyForm.ids = val.map((item) => { this.batchVerifyForm.ids = val.map((item) => {
return item.id return item.id;
}) });
}, },
dialogBeforeClose() { dialogBeforeClose() {
this.loading = true this.loading = true;
this.queryParams = { this.queryParams = {
country: null, country: null,
city: null, city: null,
...@@ -746,37 +751,37 @@ export default { ...@@ -746,37 +751,37 @@ export default {
pageSize: 10, pageSize: 10,
startTime: null, startTime: null,
usedScore: null, usedScore: null,
usedScoreOperate: null usedScoreOperate: null,
} };
}, },
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1 this.queryParams.pageNo = 1;
const params = { ...this.queryParams } const params = { ...this.queryParams };
if (this.dateRangeCreateTime) { if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0] params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1] params.endTime = this.dateRangeCreateTime[1];
} }
queryMemberExchangeRecord(params).then((res) => { queryMemberExchangeRecord(params).then((res) => {
this.loading = false this.loading = false;
this.memberList = res.data.list this.memberList = res.data.list;
this.total = res.data.total this.total = res.data.total;
}) });
}, },
handleQueryPagination() { handleQueryPagination() {
const params = { ...this.queryParams } const params = { ...this.queryParams };
if (this.dateRangeCreateTime) { if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0] params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1] params.endTime = this.dateRangeCreateTime[1];
} }
queryMemberExchangeRecord(params).then((res) => { queryMemberExchangeRecord(params).then((res) => {
this.loading = false this.loading = false;
this.memberList = res.data.list this.memberList = res.data.list;
this.total = res.data.total this.total = res.data.total;
}) });
}, },
resetQuery() { resetQuery() {
this.loading = true this.loading = true;
this.dateRangeCreateTime = [] this.dateRangeCreateTime = [];
this.queryParams = { this.queryParams = {
country: null, country: null,
city: null, city: null,
...@@ -788,10 +793,10 @@ export default { ...@@ -788,10 +793,10 @@ export default {
pageSize: 10, pageSize: 10,
startTime: null, startTime: null,
usedScore: null, usedScore: null,
usedScoreOperate: null usedScoreOperate: null,
} };
this.handleQuery() this.handleQuery();
} },
} },
} };
</script> </script>
...@@ -325,7 +325,7 @@ export default { ...@@ -325,7 +325,7 @@ export default {
pointsRequireSymbol: null, pointsRequireSymbol: null,
pickMethod: null, pickMethod: null,
nodeId: null, nodeId: null,
status: null, status: "1",
remark: null, remark: null,
quantityRemainSymbol: null, quantityRemainSymbol: null,
quantityRemain: null, quantityRemain: null,
...@@ -363,7 +363,7 @@ export default { ...@@ -363,7 +363,7 @@ export default {
pointsRequireSymbol: null, pointsRequireSymbol: null,
pickMethod: null, pickMethod: null,
nodeId: null, nodeId: null,
status: null, status: "1",
remark: null, remark: null,
quantityRemainSymbol: null, quantityRemainSymbol: null,
quantityRemain: null, quantityRemain: null,
...@@ -478,7 +478,7 @@ export default { ...@@ -478,7 +478,7 @@ export default {
level: null, level: null,
source: null, source: null,
customerService: null, customerService: null,
status: null, status: "1",
department: null, department: null,
creditLevel: null, creditLevel: null,
country: null, country: null,
......
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