Commit 1c7946bf authored by chenwei's avatar chenwei

修复兑换记录,礼品操作等问题


(cherry picked from commit 778fa5e3)
parent 7c1116b6
<template> <template>
<el-dialog <el-dialog :title="$t('选择会员')" :visible.sync="dialogVisible" width="80%" :before-close="dialogBeforeClose">
:title="$t('选择会员')"
:visible.sync="dialogVisible"
width="80%"
:before-close="dialogBeforeClose"
>
<div class="app-container"> <div class="app-container">
<el-form <el-form :model="queryParams" ref="queryForm" size="small" v-show="showSearch" :inline="true" label-width="120px">
:model="queryParams"
ref="queryForm"
size="small"
v-show="showSearch"
:inline="true"
label-width="120px"
>
<el-form-item :label="$t('当前积分')"> <el-form-item :label="$t('当前积分')">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<dict-selector <dict-selector clearable :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" v-model="queryParams.holdScoreOperate" @change="handleQuery"> </dict-selector>
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.holdScoreOperate"
@change="handleQuery"
>
</dict-selector>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-input <el-input v-model.trim="queryParams.holdScore" :placeholder="$t('请输入数字')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
v-model.trim="queryParams.holdScore"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('关键词')"> <el-form-item :label="$t('关键词')">
<el-input <el-input style="width: 300px" v-model.trim="queryParams.key" :placeholder="$t('请输入会员名称/会员编号/手机号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
style="width: 300px"
v-model.trim="queryParams.key"
:placeholder="$t('请输入会员名称/会员编号/手机号')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')"> <el-form-item :label="$t('国家')">
<el-select <el-select v-model="queryParams.country" :placeholder="$t('请选择国家')" clearable @change="handleGetCityList($event)" size="small">
v-model="queryParams.country" <el-option v-for="nodeItem in countryList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" />
:placeholder="$t('请选择国家')"
clearable
@change="handleGetCityList($event)"
size="small"
>
<el-option
v-for="nodeItem in countryList"
:key="nodeItem.id"
:label="isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value="nodeItem.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('城市')"> <el-form-item :label="$t('城市')">
<el-select <el-select v-model="queryParams.city" :placeholder="$t('请选择城市')" clearable size="small">
v-model="queryParams.city" <el-option v-for="nodeItem in cityList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" />
:placeholder="$t('请选择城市')"
clearable
size="small"
>
<el-option
v-for="nodeItem in cityList"
:key="nodeItem.id"
:label="isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value="nodeItem.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
type="primary" <el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
icon="el-icon-search"
@click="handleQuery"
>{{ $t("搜索") }}</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置")
}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="mb8"> <el-row class="mb8">
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="handleQueryPagination"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="handleQueryPagination"
></right-toolbar>
</el-row> </el-row>
<el-table <el-table ref="multipleTable" v-loading="loading" @selection-change="handleSelectionChange" :data="memberList">
ref="multipleTable" <el-table-column type="selection" width="55" :selectable="selectable"> </el-table-column>
v-loading="loading" <el-table-column :label="$t('会员名称')" align="center" :prop="isChinese ? 'memberNameZh' : 'memberNameEn'"></el-table-column>
@selection-change="handleSelectionChange" <el-table-column width="140" :label="$t('会员编号')" align="center" prop="id"></el-table-column>
:data="memberList" <el-table-column width="140" :label="$t('手机号')" align="center" prop="mobile"></el-table-column>
> <el-table-column width="140" align="center" :label="$t('国家')" :prop="isChinese ? 'countryNameZh' : 'countryNameEn'"></el-table-column>
<el-table-column type="selection" width="55" :selectable="selectable"> <el-table-column :label="$t('城市')" align="center" :prop="isChinese ? 'cityNameZh' : 'cityNameEn'"></el-table-column>
</el-table-column> <el-table-column :label="$t('当前积分')" align="center" prop="holdScore"></el-table-column>
<el-table-column
:label="$t('会员名称')"
align="center"
:prop="isChinese ? 'memberNameZh' : 'memberNameEn'"
></el-table-column>
<el-table-column
width="140"
:label="$t('会员编号')"
align="center"
prop="id"
></el-table-column>
<el-table-column
width="140"
:label="$t('手机号')"
align="center"
prop="mobile"
></el-table-column>
<el-table-column
width="140"
align="center"
:label="$t('国家')"
:prop="isChinese ? 'countryNameZh' : 'countryNameEn'"
></el-table-column>
<el-table-column
:label="$t('城市')"
align="center"
:prop="isChinese ? 'cityNameZh' : 'cityNameEn'"
></el-table-column>
<el-table-column
:label="$t('当前积分')"
align="center"
prop="holdScore"
></el-table-column>
</el-table> </el-table>
<!-- //分页列表 --> <!-- //分页列表 -->
<span v-show="selectedMember.memberList.length > 0" <span v-show="selectedMember.memberList.length > 0"
...@@ -143,13 +48,7 @@ ...@@ -143,13 +48,7 @@
<span style="color: red"> {{ selectedMember.memberList.length }} </span> <span style="color: red"> {{ selectedMember.memberList.length }} </span>
{{ $t("") }}</span {{ $t("") }}</span
> >
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="handleQueryPagination" />
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="handleQueryPagination"
/>
</div> </div>
<div slot="footer"> <div slot="footer">
<el-button @click="dialogBeforeClose">取 消</el-button> <el-button @click="dialogBeforeClose">取 消</el-button>
...@@ -158,35 +57,35 @@ ...@@ -158,35 +57,35 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getDictDatas, DICT_TYPE } from "@/utils/dict"; import { getDictDatas, DICT_TYPE } from "@/utils/dict"
import { import { getCityList, getTradeCountryList, getMemberList } from "@/api/ecw/giftManagement"
getCityList, import { color } from "echarts/lib/export"
getTradeCountryList,
getMemberList,
} from "@/api/ecw/giftManagement";
import { color } from "echarts/lib/export";
export default { export default {
name: "chooseMember", name: "chooseMember",
props: { props: {
dialogVisible: { dialogVisible: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
memberSelectList: { memberSelectList: {
type: Array, type: Array,
default: () => [], default: () => []
}, },
giftScore: {
type: Number | String,
default: 0
}
}, },
watch: { watch: {
dialogVisible(val) { dialogVisible(val) {
if (val == true) { if (val == true) {
this.handleQuery(); this.handleQuery()
} }
}, },
memberSelectList(val) { memberSelectList(val) {
this.selectedMember.memberList = val; this.selectedMember.memberList = val
}, }
}, },
data() { data() {
return { return {
...@@ -209,52 +108,55 @@ export default { ...@@ -209,52 +108,55 @@ export default {
pageSize: 10, pageSize: 10,
startTime: "", startTime: "",
usedScore: null, usedScore: null,
usedScoreOperate: null, usedScoreOperate: null
}, }
}; }
}, },
computed: { computed: {
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN"; return this.$i18n.locale === "zh_CN"
}, }
}, },
created() { created() {
this.handleQuery(); this.handleQuery()
this.getCountryList(); this.getCountryList()
}, },
activated() { activated() {
this.handleQuery(); this.handleQuery()
}, },
methods: { methods: {
selectable(row, index) { selectable(row, index) {
if (this.giftScore > row.holdScore) {
return false
}
if (this.memberSelectList.length > 0) { if (this.memberSelectList.length > 0) {
return this.memberSelectList.some((item) => { return this.memberSelectList.some((item) => {
return item.id != row.id; return item.id != row.id
}); })
} else { } else {
return true; return true
} }
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.selectedMember.memberList = val; this.selectedMember.memberList = val
let arraryMemberName = []; let arraryMemberName = []
if (val) { if (val) {
this.selectedMember.memberList.forEach((element) => { this.selectedMember.memberList.forEach((element) => {
if (this.isChinese) { if (this.isChinese) {
arraryMemberName.push(element.memberNameZh); arraryMemberName.push(element.memberNameZh)
} else { } else {
arraryMemberName.push(element.memberNameEn); arraryMemberName.push(element.memberNameEn)
} }
}); })
} }
this.selectedMember.memberName = arraryMemberName.join(""); this.selectedMember.memberName = arraryMemberName.join("")
}, },
transferSelectMember() { transferSelectMember() {
this.dialogBeforeClose(); this.dialogBeforeClose()
this.$emit("transferSelectMemberInfo", this.selectedMember.memberList); this.$emit("transferSelectMemberInfo", this.selectedMember.memberList)
}, },
dialogBeforeClose() { dialogBeforeClose() {
this.loading = true; this.loading = true
this.queryParams = { this.queryParams = {
country: null, country: null,
city: null, city: null,
...@@ -266,47 +168,47 @@ export default { ...@@ -266,47 +168,47 @@ export default {
pageSize: 10, pageSize: 10,
startTime: null, startTime: null,
usedScore: null, usedScore: null,
usedScoreOperate: null, usedScoreOperate: null
}; }
// this.dialogVisible = false; // this.dialogVisible = false;
this.$emit("update:dialogVisible", false); this.$emit("update:dialogVisible", false)
}, },
getCountryList() { getCountryList() {
getTradeCountryList().then((res) => { getTradeCountryList().then((res) => {
this.countryList = res.data; this.countryList = res.data
}); })
}, },
handleGetCityList(id) { handleGetCityList(id) {
if (id) { if (id) {
let params = { let params = {
id: id, id: id
}; }
getCityList(params).then((res) => { getCityList(params).then((res) => {
this.cityList = res.data; this.cityList = res.data
}); })
} else { } else {
this.cityList = []; this.cityList = []
} }
}, },
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1
let params = { ...this.queryParams }; let params = { ...this.queryParams }
getMemberList(params).then((res) => { getMemberList(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() {
let params = { ...this.queryParams }; let params = { ...this.queryParams }
getMemberList(params).then((res) => { getMemberList(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.queryParams = { this.queryParams = {
country: null, country: null,
city: null, city: null,
...@@ -318,10 +220,10 @@ export default { ...@@ -318,10 +220,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>
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
</el-row> </el-row>
</div> </div>
<choose-Member :dialogVisible.sync="dialogVisible" @transferSelectMemberInfo="onGetSelectMemberInfo" :memberSelectList="memberList"> </choose-Member> <choose-Member :dialogVisible.sync="dialogVisible" @transferSelectMemberInfo="onGetSelectMemberInfo" :memberSelectList="memberList" :giftScore.sync="rewardsDetails.pointsRequire"> </choose-Member>
</div> </div>
</template> </template>
<script> <script>
...@@ -175,6 +175,7 @@ export default { ...@@ -175,6 +175,7 @@ export default {
currencyList: [], currencyList: [],
quantityComputation: null, quantityComputation: null,
checkFormResult: [], checkFormResult: [],
rewardsDetails: {},
rules: { rules: {
rewardCount: [ rewardCount: [
{ {
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="1"> <el-col :span="1">
<el-button type="primary" :disabled="isDisable" :icon="index == '0' ? 'el-icon-plus' : 'el-icon-minus'" @click="handleOrderVRule(item, index)"></el-button> <el-button type="primary" :disabled="isDisable" v-if="title == 3" :icon="index == '0' ? 'el-icon-plus' : 'el-icon-minus'" @click="handleOrderVRule(item, index)"></el-button>
</el-col> </el-col>
</el-row> </el-row>
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item :label="$t('礼品名称')"> <el-form-item :label="$t('礼品名称')">
<el-input <el-input v-model.trim="queryParams.title" :placeholder="$t('请输入礼品名称')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
v-model.trim="queryParams.title"
:placeholder="$t('请输入礼品名称')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('兑换积分')"> <el-form-item :label="$t('兑换积分')">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<dict-selector <dict-selector v-model="queryParams.pointsRequireSymbol" clearable :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" @change="handleQuery" />
v-model="queryParams.pointsRequireSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@change="handleQuery"
/>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-input <el-input v-model.trim="queryParams.pointsRequire" :placeholder="$t('请输入数字')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
v-model.trim="queryParams.pointsRequire"
:placeholder="$t('请输入数字')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('领取方式')" prop="level"> <el-form-item :label="$t('领取方式')" prop="level">
<dict-selector <dict-selector v-model="queryParams.pickMethod" clearable :type="DICT_TYPE.WAY_OF_RECEIVING" @change="handleQuery" />
v-model="queryParams.pickMethod"
clearable
:type="DICT_TYPE.WAY_OF_RECEIVING"
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('提货点')" prop="level"> <el-form-item :label="$t('提货点')" prop="level">
<el-select <el-select v-model="queryParams.nodeId" :placeholder="$t('请选择提货点')" clearable size="small" @change="handleQuery">
v-model="queryParams.nodeId" <el-option v-for="nodeItem in nodeList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" />
:placeholder="$t('请选择提货点')"
clearable
size="small"
@change="handleQuery"
>
<el-option
v-for="nodeItem in nodeList"
:key="nodeItem.id"
:label="isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value="nodeItem.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')" prop="level"> <el-form-item :label="$t('状态')" prop="level">
<dict-selector <dict-selector v-model="queryParams.status" clearable :type="DICT_TYPE.GIFT_STATUS" @change="handleQuery" />
v-model="queryParams.status"
clearable
:type="DICT_TYPE.GIFT_STATUS"
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('备注')" prop="level"> <el-form-item :label="$t('备注')" prop="level">
<el-input <el-input v-model.trim="queryParams.remark" :placeholder="$t('请输入备注')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
v-model.trim="queryParams.remark"
:placeholder="$t('请输入备注')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('剩余数量')"> <el-form-item :label="$t('剩余数量')">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<dict-selector <dict-selector v-model="queryParams.quantityRemainSymbol" clearable :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" @change="handleQuery" />
v-model="queryParams.quantityRemainSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@change="handleQuery"
/>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-input <el-input v-model.trim="queryParams.quantityRemain" :placeholder="$t('请输入数字')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
v-model.trim="queryParams.quantityRemain"
:placeholder="$t('请输入数字')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
<el-date-picker <el-date-picker v-model="dateRangeCreateTime" type="datetimerange" clearable placement="bottom-start" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
v-model="dateRangeCreateTime"
type="datetimerange"
clearable
placement="bottom-start"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
$t("搜索") <el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置")
}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="mb8"> <el-row class="mb8">
<el-button <el-button v-hasPermi="['ecw:giftManagement:add']" type="success" size="mini" icon="el-icon-plus" @click="handleAddReward">{{ $t("添加礼品") }}</el-button>
v-hasPermi="['ecw:giftManagement:add']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleAddReward"
>{{ $t("添加礼品") }}</el-button
>
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" /> <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row> </el-row>
<!-- 礼品列表 --> <!-- 礼品列表 -->
<el-table ref="multipleTable" v-loading="loading" :data="list"> <el-table ref="multipleTable" v-loading="loading" :data="list">
<el-table-column <el-table-column width="140" :label="$t('礼品ID')" align="center" prop="code" />
width="140"
:label="$t('礼品ID')"
align="center"
prop="code"
/>
<el-table-column :label="$t('礼品名称')" align="center"> <el-table-column :label="$t('礼品名称')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handleView(scope.row)">{{ <el-button type="text" @click="handleView(scope.row)">{{ isChinese ? scope.row.titleZh : scope.row.titleEn }}</el-button>
isChinese ? scope.row.titleZh : scope.row.titleEn
}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('图片')"> <el-table-column :label="$t('图片')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image :src="firstImg(isChinese ? scope.row.imgZh : scope.row.imgEn)" style="width: 50px; height: 50px">{{ $t("") }}</el-image>
:src="firstImg(isChinese ? scope.row.imgZh : scope.row.imgEn)"
style="width: 50px; height: 50px"
>{{ $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('开始日期')">
...@@ -177,41 +83,19 @@ ...@@ -177,41 +83,19 @@
</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 }">
{{ {{ isChinese ? handleExchangeNodeId(row.nodeId).titleZh : handleExchangeNodeId(row.nodeId).titleEn }}
isChinese
? handleExchangeNodeId(row.nodeId).titleZh
: handleExchangeNodeId(row.nodeId).titleEn
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('允许兑换次数')" align="center" prop="allowCount" />
:label="$t('允许兑换次数')"
align="center"
prop="allowCount"
/>
<el-table-column :label="$t('状态')"> <el-table-column :label="$t('状态')">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ {{ isChinese ? handleRewardsStatus(row.status).label : handleRewardsStatus(row.status).labelEn }}
isChinese
? handleRewardsStatus(row.status).label
: handleRewardsStatus(row.status).labelEn
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('备注')" align="center" width="200"> <el-table-column :label="$t('备注')" align="center" width="200">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-tooltip <el-tooltip popper-class="rewardstToolTip" :content="isChinese ? row.remarkZh : remarkEn" placement="top">
popper-class="rewardstToolTip" <div style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
:content="isChinese ? row.remarkZh : remarkEn"
placement="top"
>
<div
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
{{ isChinese ? row.remarkZh : remarkEn }} {{ isChinese ? row.remarkZh : remarkEn }}
</div> </div>
</el-tooltip> </el-tooltip>
...@@ -223,164 +107,54 @@ ...@@ -223,164 +107,54 @@
type="text" type="text"
@click=" @click="
$router.push({ $router.push({
path: '/memberManagement/exchangeRecord', path: '/member/giftManagement/exchangeRecord',
query: { rewardCode: scope.row.code }, query: { rewardCode: scope.row.code }
}) })
" "
>{{ scope.row.exchangeCount }}</el-button >{{ scope.row.exchangeCount }}</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('剩余数量')" align="center" prop="quantityRemain" />
:label="$t('剩余数量')" <el-table-column width="220px" align="center" :label="$t('操作')" class-name="small-padding fixed-width">
align="center"
prop="quantityRemain"
/>
<el-table-column
width="220px"
align="center"
:label="$t('操作')"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button v-hasPermi="['ecw:giftManagement:check']" size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">{{ $t("查看") }}</el-button>
v-hasPermi="['ecw:giftManagement:check']" <el-button v-hasPermi="['ecw:giftManagement:close']" size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status == '2' || scope.row.status == '3'" @click="handleCloseStatus(scope.row)">{{ $t("关闭") }}</el-button>
size="mini" <el-button v-hasPermi="['ecw:giftManagement:copy']" size="mini" type="text" icon="el-icon-edit" @click="copyRewards(scope.row)">{{ $t("复制") }}</el-button>
type="text" <el-button v-hasPermi="['ecw:giftManagement:postpone']" size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status != '1'" @click="handlePostpone(scope.row)">{{ $t("延期") }}</el-button>
icon="el-icon-view" <el-button v-hasPermi="['ecw:giftManagement:delete']" size="mini" type="text" icon="el-icon-delete" :disabled="scope.row.status != '2'" @click="handleDelete(scope.row)">{{ $t("删除") }}</el-button>
@click="handleView(scope.row)" <el-button v-has-permi="['ecw:giftManagement:edit']" size="mini" type="text" :disabled="scope.row.status != '2' && scope.row.status != '1'" icon="el-icon-collection" @click="editRewards(scope.row)">{{ $t("编辑") }}</el-button>
>{{ $t("查看") }}</el-button <el-button v-has-permi="['ecw:giftManagement:enable']" size="mini" type="text" icon="el-icon-user" :disabled="scope.row.status == '1' || scope.row.status == '3' || scope.row.status == '4'" @click="handleLaunchRewards(scope.row)">{{ $t("启用") }}</el-button>
> <el-button v-has-permi="['ecw:giftManagement:exchange']" :disabled="scope.row.status == '3' || scope.row.status == '4'" size="mini" type="text" icon="el-icon-user" @click="handleExchange(scope.row)">{{ $t("兑换") }}</el-button>
<el-button
v-hasPermi="['ecw:giftManagement:close']"
size="mini"
type="text"
icon="el-icon-edit"
:disabled="scope.row.status == '2' || scope.row.status == '3'"
@click="handleCloseStatus(scope.row)"
>{{ $t("关闭") }}</el-button
>
<el-button
v-hasPermi="['ecw:giftManagement:copy']"
size="mini"
type="text"
icon="el-icon-edit"
@click="copyRewards(scope.row)"
>{{ $t("复制") }}</el-button
>
<el-button
v-hasPermi="['ecw:giftManagement:postpone']"
size="mini"
type="text"
icon="el-icon-edit"
:disabled="scope.row.status != '1'"
@click="handlePostpone(scope.row)"
>{{ $t("延期") }}</el-button
>
<el-button
v-hasPermi="['ecw:giftManagement:delete']"
size="mini"
type="text"
icon="el-icon-delete"
:disabled="scope.row.status != '2'"
@click="handleDelete(scope.row)"
>{{ $t("删除") }}</el-button
>
<el-button
v-has-permi="['ecw:giftManagement:edit']"
size="mini"
type="text"
:disabled="scope.row.status != '2' && scope.row.status != '1'"
icon="el-icon-collection"
@click="editRewards(scope.row)"
>{{ $t("编辑") }}</el-button
>
<el-button
v-has-permi="['ecw:giftManagement:enable']"
size="mini"
type="text"
icon="el-icon-user"
:disabled="
scope.row.status == '1' ||
scope.row.status == '3' ||
scope.row.status == '4'
"
@click="handleLaunchRewards(scope.row)"
>{{ $t("启用") }}</el-button
>
<el-button
v-has-permi="['ecw:giftManagement:exchange']"
:disabled="scope.row.status == '3' || scope.row.status == '4'"
size="mini"
type="text"
icon="el-icon-user"
@click="handleExchange(scope.row)"
>{{ $t("兑换") }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- //分页列表 --> <!-- //分页列表 -->
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<!-- 查看 编辑 新增弹窗 --> <!-- 查看 编辑 新增弹窗 -->
<operating-gift <operating-gift ref="operatingGift" :title="operatingPagetitle" :rewards-details="rewardsItem" :show.sync="dialogVisible" :node-list="nodeList" />
ref="operatingGift" <el-dialog :title="$t('提示')" :visible.sync="dialogPostponeVisible" width="30%">
:title="operatingPagetitle"
:rewards-details="rewardsItem"
:show.sync="dialogVisible"
:node-list="nodeList"
/>
<el-dialog
:title="$t('提示')"
:visible.sync="dialogPostponeVisible"
width="30%"
>
<el-row class="mb8">{{ $t("请选择延期时间") }}</el-row> <el-row class="mb8">{{ $t("请选择延期时间") }}</el-row>
<el-date-picker <el-date-picker v-model="postponeDatetime" type="datetime" clearable style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :placeholder="$t('请选择时间')" />
v-model="postponeDatetime"
type="datetime"
clearable
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
:placeholder="$t('请选择时间')"
/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogPostponeVisible = false">{{ <el-button @click="dialogPostponeVisible = false">{{ $t("取 消") }}</el-button>
$t("取 消") <el-button type="primary" @click="confirmPostponeRewards">{{ $t("确 定") }}</el-button>
}}</el-button>
<el-button type="primary" @click="confirmPostponeRewards">{{
$t("确 定")
}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import { getGiftList, deleteRewards, copyRewardsAPI, changeRewardsStatus, delayRewards, getWarehouseList } from "@/api/ecw/giftManagement"
getGiftList, import { getDictDatas, DICT_TYPE } from "@/utils/dict"
deleteRewards, import { parseTime } from "../../../utils/ruoyi"
copyRewardsAPI, import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue"
changeRewardsStatus, import { uploadFile } from "@/api/infra/file"
delayRewards, import ImageUpload from "@/components/ImageUpload"
getWarehouseList,
} from "@/api/ecw/giftManagement";
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { parseTime } from "../../../utils/ruoyi";
import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue";
import { uploadFile } from "@/api/infra/file";
import ImageUpload from "@/components/ImageUpload";
export default { export default {
name: "EcwGiftmanagementIndex", name: "EcwGiftmanagementIndex",
components: { components: {
OperatingGift, OperatingGift
}, },
data() { data() {
return { return {
...@@ -419,203 +193,190 @@ export default { ...@@ -419,203 +193,190 @@ export default {
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()
}, },
watch: { watch: {
dialogVisible(val, old) { dialogVisible(val, old) {
if (old && !val) { if (old && !val) {
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)[0]
(dicItem) => dicItem.value.toString() == status
)[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), pickMethod.split(",")).forEach((element) => {
this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING), pickMethodLabel.push(element.label)
pickMethod.split(",") })
).forEach((element) => {
pickMethodLabel.push(element.label);
});
} else { } else {
this.arraysEqual( this.arraysEqual(this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING), pickMethod.split(",")).forEach((element) => {
this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING), pickMethodLabel.push(element.labelEn)
pickMethod.split(",") })
).forEach((element) => {
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: "/member/giftManagement/bulkExchange", path: "/member/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() {
let params = { title: "" }; let params = { title: "" }
getWarehouseList(params).then((res) => { getWarehouseList(params).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, this.dateRangeCreateTime, "createTime", false)
params,
this.dateRangeCreateTime,
"createTime",
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,
...@@ -631,12 +392,12 @@ export default { ...@@ -631,12 +392,12 @@ export default {
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 {
......
...@@ -304,19 +304,20 @@ export default { ...@@ -304,19 +304,20 @@ 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("osdpoopd", index)
if (index == "0") { if (index == "0") {
if (this.queryParams.extraOrderV.orderVRule[index].low && this.queryParams.extraOrderV.orderVRule[index].low >= this.queryParams.extraOrderV.orderVRule[index].high) { if (this.queryParams.extraOrderV.orderVRule[index].low && this.queryParams.extraOrderV.orderVRule[index].low >= this.queryParams.extraOrderV.orderVRule[index].high) {
callback(this.$t("本次最终积分应大于本次开始积分")) callback(this.$t("最终积分应大于本次开始积分"))
} else if (this.queryParams.extraOrderV.orderVRule[index + 1] && this.queryParams.extraOrderV.orderVRule[index + 1].low && this.queryParams.extraOrderV.orderVRule[index + 1].low <= this.queryParams.extraOrderV.orderVRule[index].high) { } else if (this.queryParams.extraOrderV.orderVRule[index + 1] && this.queryParams.extraOrderV.orderVRule[index + 1].low && this.queryParams.extraOrderV.orderVRule[index + 1].low <= this.queryParams.extraOrderV.orderVRule[index].high) {
callback(this.$t("本次最终积分应小于下一次开始积分")) callback(this.$t("最终积分应小于下次开始积分"))
} else { } else {
callback() callback()
} }
} else if (index > 0) { } else if (index > 0) {
if (this.queryParams.extraOrderV.orderVRule[index].low && this.queryParams.extraOrderV.orderVRule[index].low >= this.queryParams.extraOrderV.orderVRule[index].high) { if (this.queryParams.extraOrderV.orderVRule[index].low && this.queryParams.extraOrderV.orderVRule[index].low >= this.queryParams.extraOrderV.orderVRule[index].high) {
callback(this.$t("本次最终积分应大于本次开始积分")) callback(this.$t("最终积分应大于本次开始积分"))
} else if (this.queryParams.extraOrderV.orderVRule[index + 1]?.low && this.queryParams.extraOrderV.orderVRule[index].high <= this.queryParams.extraOrderV.orderVRule[index + 1].low) { } else if (this.queryParams.extraOrderV.orderVRule[index + 1]?.low && this.queryParams.extraOrderV.orderVRule[index + 1].low <= this.queryParams.extraOrderV.orderVRule[index].high) {
callback(this.$t("本次最终积分应小于下一次开始积分")) callback(this.$t("最终积分应小于下次开始积分"))
} else { } else {
callback() callback()
} }
......
...@@ -435,7 +435,8 @@ export default { ...@@ -435,7 +435,8 @@ export default {
// 新增兑换 // 新增兑换
handleNewExchange() { handleNewExchange() {
this.$router.push({ this.$router.push({
path: "/member/memberManagement/exchangeRecordOperation" path: "/member/memberManagement/exchangeRecordOperation",
query: { pageStatus: "add" }
}) })
}, },
getNodeListAPI() { getNodeListAPI() {
......
...@@ -5,6 +5,16 @@ ...@@ -5,6 +5,16 @@
<el-form v-for="(item, index) in queryParamsList" :key="item.memberId" :model="queryParamsList[index]" :ref="`queryForm${item.memberId}`" size="small" :inline="true" :rules="rules" :disabled="viewRecordDisable" label-width="148px"> <el-form v-for="(item, index) in queryParamsList" :key="item.memberId" :model="queryParamsList[index]" :ref="`queryForm${item.memberId}`" size="small" :inline="true" :rules="rules" :disabled="viewRecordDisable" label-width="148px">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<div>
<el-row :gutter="10" v-if="$route.query.pageStatus != 'add'">
<el-form-item :label="$t('记录ID')">
<el-input :placeholder="$t('请输入记录ID')" clearable disabled v-model="item.redemptionNumber" />
</el-form-item>
<el-form-item :label="$t('状态')">
<el-input :placeholder="$t('请输入状态')" clearable disabled v-model="item.exchangeStatusName" />
</el-form-item>
</el-row>
</div>
<el-row :gutter="10"> <el-row :gutter="10">
<span class="card-title">{{ $t("基础信息") }}</span> <span class="card-title">{{ $t("基础信息") }}</span>
</el-row> </el-row>
...@@ -104,7 +114,7 @@ ...@@ -104,7 +114,7 @@
<el-input :placeholder="$t('请输入快递寄出人')" clearable v-model="item.expressSender" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" /> <el-input :placeholder="$t('请输入快递寄出人')" clearable v-model="item.expressSender" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('上传附件')"> <el-form-item :label="$t('上传附件')">
<file-upload v-model="item.annex" :disabled="veriftyDisable || viewRecordDisable"></file-upload> <file-upload v-model="item.annex" :fileType="['doc', 'docx', 'xls', 'xlsx', 'txt', 'pdf', 'jpg', 'jpeg', 'png']" :disabled="veriftyDisable || viewRecordDisable"></file-upload>
</el-form-item> </el-form-item>
<el-form-item :label="$t('备注')"> <el-form-item :label="$t('备注')">
<el-input style="width: 500px" :disabled="veriftyDisable" type="textarea" v-model="item.remark"></el-input> <el-input style="width: 500px" :disabled="veriftyDisable" type="textarea" v-model="item.remark"></el-input>
...@@ -114,19 +124,19 @@ ...@@ -114,19 +124,19 @@
<el-input v-model="item.verifyUser"></el-input> <el-input v-model="item.verifyUser"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('核销时间')"> <el-form-item :label="$t('核销时间')">
<el-date-picker type="date" :placeholder="$t('选择核销时间')" v-model="item.verifyTime" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('选择核销时间')" v-model="item.verifyTime" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建人')" v-if="!veriftyDisable"> <el-form-item :label="$t('创建人')" v-if="!veriftyDisable">
<el-input v-model="item.creatorName"></el-input> <el-input v-model="item.creatorName"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')" v-if="!veriftyDisable"> <el-form-item :label="$t('创建时间')" v-if="!veriftyDisable">
<el-date-picker type="date" :placeholder="$t('创建时间')" v-model="item.createTime" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('创建时间')" v-model="item.createTime" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('最后更新人')" v-if="!veriftyDisable"> <el-form-item :label="$t('最后更新人')" v-if="!veriftyDisable">
<el-input v-model="item.updater"></el-input> <el-input v-model="item.updater"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('最后更新时间')" v-if="!veriftyDisable"> <el-form-item :label="$t('最后更新时间')" v-if="!veriftyDisable">
<el-date-picker type="date" :placeholder="$t('最后更新时间')" v-model="item.updateTime" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('最后更新时间')" v-model="item.updateTime" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
</el-row> </el-row>
...@@ -332,7 +342,7 @@ export default { ...@@ -332,7 +342,7 @@ export default {
break break
case "add": case "add":
this.submitButtonText = this.$t("确认兑换") this.submitButtonText = this.$t("确认兑换")
this.getDetails() // this.getDetails()
break break
default: default:
...@@ -343,6 +353,10 @@ export default { ...@@ -343,6 +353,10 @@ export default {
activated() {}, activated() {},
methods: { methods: {
// 兑换状态
handleExchangeStatus(id) {
return this.isChinese ? this.getDictDatas(DICT_TYPE.REWARD_REDEEM_STATUS).filter((item) => item.value == id)[0].label : this.getDictDatas(DICT_TYPE.REWARD_REDEEM_STATUS).filter((item) => item.value == id)[0].labelEn
},
getDetails() { getDetails() {
memberUserGet({ id: this.$route.query.memberId }).then((r) => { memberUserGet({ id: this.$route.query.memberId }).then((r) => {
// this.details = r.data; // this.details = r.data;
...@@ -379,6 +393,7 @@ export default { ...@@ -379,6 +393,7 @@ export default {
this.queryParamsList[0].updateTime = parseTime(data.updateTime) this.queryParamsList[0].updateTime = parseTime(data.updateTime)
this.queryParamsList[0].createTime = parseTime(data.createTime) this.queryParamsList[0].createTime = parseTime(data.createTime)
this.queryParamsList[0].expressDate = parseTime(data.expressDate) //快递时间 this.queryParamsList[0].expressDate = parseTime(data.expressDate) //快递时间
this.queryParamsList[0].exchangeStatusName = this.handleExchangeStatus(data.status)
this.handleRewardCount(data, 0, data.rewardCount) this.handleRewardCount(data, 0, data.rewardCount)
if (this.$route.query.pageStatus == "verify") { if (this.$route.query.pageStatus == "verify") {
this.queryParamsList[0].verifyTime = getNowDateTime() this.queryParamsList[0].verifyTime = getNowDateTime()
......
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