Commit e26685d3 authored by chenwei's avatar chenwei

fixed defect

parent cc649a65
......@@ -4,6 +4,7 @@ import dialogDrag from './dialog/drag'
import dialogDragWidth from './dialog/dragWidth'
import dialogDragHeight from './dialog/dragHeight'
import clipboard from './module/clipboard'
import trim from "./trim/trim";
const install = function(Vue) {
Vue.directive('hasRole', hasRole)
......@@ -12,6 +13,7 @@ const install = function(Vue) {
Vue.directive('dialogDrag', dialogDrag)
Vue.directive('dialogDragWidth', dialogDragWidth)
Vue.directive('dialogDragHeight', dialogDragHeight)
Vue.directive("trim", trim)
}
if (window.Vue) {
......
// 获取元素
function getInput(el) {
let inputEle;
if (el.tagName !== "INPUT") {
// 若 el-input 中 type 为 textarea
if (el._prevClass.includes("el-textarea")) {
inputEle = el.querySelector("textarea");
} else {
inputEle = el.querySelector("input");
}
} else {
inputEle = el;
}
return inputEle;
}
function dispatchEvent(el, type) {
const evt = new Event(type);
el.dispatchEvent(evt);
}
const Trim = {
inserted: (el) => {
let inputEle = getInput(el);
const handler = function (event) {
const newVal = event.target.value.trim();
if (event.target.value !== newVal) {
event.target.value = newVal;
dispatchEvent(inputEle, "input");
}
};
el.inputEle = inputEle;
el._blurHandler = handler;
inputEle.addEventListener("blur", handler);
},
unbind(el) {
const { inputEle } = el;
inputEle.removeEventListener("blur", el._blurHandler);
},
};
export default Trim;
......@@ -4607,7 +4607,7 @@
"请输入整数": "Please enter an integer",
"请输入中文规则说明": "Please enter the rule description in Chinese",
"请输入英文规则说明": "Please enter English rule description",
"请输入积分规则": "Please enter the scoring rules",
"请输入积分": "Please enter the scoring",
"请选择是否推送": "Please select whether to push",
"保存并启用": "Save and Enable",
"订单入口": "Order Entry",
......@@ -4615,7 +4615,7 @@
"注册平台": "Registration platform",
"等级名称": "User level name",
"是否确认启用此礼品规则": "Do you confirm to enable this gift rule?",
"是否确认复制礼品规则": "Do you want to copy gift rules?",
"是否确认复制积分规则": "Do you want to copy points rules?",
"是否确认关闭此礼品规则": "Do you want to confirm to turn off this gift rule?",
"单次积分": "Single integration",
"规则说明": "Specification of rules",
......@@ -4661,12 +4661,12 @@
"本次最终积分应小于下一次开始积分": "This final score should be less than the next starting score ",
"确认兑换": "Confirm conversion",
"操作积分": "Operation integral",
"基本":"Base",
"基本": "Base",
"发货信息": "Shipping Information",
"设置": "Setting",
"财务": "Finance",
"开票信息": "Billing Information",
"国籍":"country",
"国籍": "country",
"首次成交时间": "First deal time",
"掉入公海时间": "Time fall to Common Customers List",
"获取方式": "Get method",
......@@ -4692,6 +4692,6 @@
"已卸柜/已到仓时间": "Unloaded/arrived Time",
"动态": "Dynamics",
"增值服务": "Added services",
"开启会员积分系统":"Enable member points system",
"是否确认{val}会员积分系统":"Confirm whether to {val} the member points system"
"开启会员积分系统": "Enable member points system",
"是否确认{val}会员积分系统": "Confirm whether to {val} the member points system"
}
......@@ -11,22 +11,22 @@
<el-col :span="12">
<el-form-item :label="$t('中文礼品名称')" prop="titleZh">
<el-input
v-model.trim="queryParams.titleZh"
v-model="queryParams.titleZh"
:placeholder="$t('请输入')"
:disabled="isDisable"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
v-trim
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('英文礼品名称')" prop="titleEn">
<el-input
v-model.trim="queryParams.titleEn"
v-model="queryParams.titleEn"
:disabled="isDisable"
:placeholder="$t('请输入')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
v-trim
/>
</el-form-item>
</el-col>
......@@ -53,7 +53,7 @@
<el-col :span="6">
<el-form-item
:label="$t('兑换网点')"
:prop="'nodeIds.' + index + '.nodeId'"
:prop="`nodeIds[${index}].nodeId`"
:rules="rules.nodeIds.nodeId"
>
<el-select
......@@ -75,10 +75,11 @@
<el-col :span="6">
<el-form-item
:label="$t('兑换积分')"
:prop="'nodeIds.' + index + 'points'"
:prop="`nodeIds[${index}].points`"
:rules="rules.nodeIds.points"
>
<el-input
type="number"
v-model.trim="item.points"
:placeholder="$t('请输入')"
:disabled="isDisable"
......@@ -95,6 +96,7 @@
</el-row>
<el-form-item :label="$t('剩余数量')" prop="quantityRemain">
<el-input
class="input-item-width"
:disabled="isDisable && disabelEnableStatus"
v-model.trim="queryParams.quantityRemain"
:placeholder="$t('请输入')"
......@@ -127,6 +129,8 @@
</el-form-item>
<el-form-item :label="$t('允许兑换次数')" prop="allowCount">
<el-input
class="input-item-width"
type="number"
v-model.trim="queryParams.allowCount"
:placeholder="$t('请输入')"
clearable
......@@ -441,7 +445,6 @@ export default {
nodeId: null,
pickMethod: null,
pointsRequire: null,
quantityRemain: null,
remarkEn: null,
remarkFr: null,
remarkZh: null,
......@@ -455,3 +458,8 @@ export default {
},
};
</script>
<style>
.input-item-width{
width: 194px;
}
</style>
......@@ -264,7 +264,7 @@
icon="el-icon-edit"
:disabled="scope.row.status != '1'"
@click="handlePostpone(scope.row)"
>{{ $t("延期") }}</el-button>
>{{ $t("延期")}}</el-button>
<el-button
v-hasPermi="['ecw:giftManagement:delete']"
size="mini"
......@@ -286,11 +286,12 @@
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.isInOpenSea"
:disabled="scope.row.status == '3' || scope.row.status == '4'"
size="mini"
type="text"
icon="el-icon-user"
......
......@@ -21,10 +21,10 @@
<el-form-item :label="$t('中文标题')" prop="titleZh">
<el-input
style="width: 300px"
v-model.trim="queryParams.titleZh"
v-model="queryParams.titleZh"
:placeholder="$t('请输入查找')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
v-trim
/>
<el-button
size="mini"
......@@ -40,10 +40,10 @@
<el-form-item :label="$t('英文标题')" prop="titleEn">
<el-input
style="width: 300px"
v-model.trim="queryParams.titleEn"
v-model="queryParams.titleEn"
:placeholder="$t('请输入查找')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
v-trim
/> </el-form-item
></el-col>
</el-row>
......@@ -105,10 +105,10 @@
<el-input
type="textarea"
style="width: 300px"
v-model.trim="queryParams.extraRecommend.shareContentZh"
v-model="queryParams.extraRecommend.shareContentZh"
:placeholder="$t('请输入分享文案')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
v-trim
/> </el-form-item
></el-col>
<el-col :span="12">
......@@ -119,10 +119,10 @@
<el-input
type="textarea"
style="width: 300px"
v-model.trim="queryParams.extraRecommend.shareContentEn"
v-model="queryParams.extraRecommend.shareContentEn"
:placeholder="$t('请输入分享文案')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
v-trim
/> </el-form-item
></el-col>
</el-row>
......@@ -178,7 +178,7 @@
</el-select>
</el-form-item>
<el-form-item
:label="$t('积分规则')"
:label="$t('积分')"
v-if="queryParams.type == '1'"
required
>
......@@ -240,7 +240,7 @@
<!-- 除v值之外的积分规则 -->
<el-form-item
v-if="queryParams.type != '1'"
:label="$t('积分规则')"
:label="$t('积分')"
prop="getScoreOnce"
>
<el-input
......@@ -662,7 +662,7 @@ export default {
getScoreOnce: [
{
required: true,
message: this.$t("请输入积分规则"),
message: this.$t("请输入积分"),
trigger: "blur",
},
{
......
......@@ -176,8 +176,16 @@
<el-table-column
:label="$t('礼品名称')"
align="center"
:prop="isChinese ? 'rewardTitleZh' : 'rewardTitleEn'"
/>
>
<template #default="{ row }">
<el-button
type="text"
@click="
handleShowRewardsDetail(row)
"
>{{isChinese ? row.rewardTitleZh : row.rewardTitleEn }}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('会员名称')" align="center">
<template #default="{ row }">
<el-button
......@@ -398,11 +406,20 @@
}}</el-button>
</span>
</el-dialog>
<!-- 查看 礼品 -->
<operating-gift
ref="operatingGift"
:title="operatingPagetitle"
:rewards-details="rewardsItem"
:show.sync="dialogVisible"
:node-list="nodeList"
/>
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { getNodeList } from '@/api/ecw/giftManagement'
import { getNodeList, getRewardsDetails } from '@/api/ecw/giftManagement'
import {
queryMemberExchangeRecord,
batchVerifyAPI,
......@@ -413,8 +430,12 @@ import {
} from '@/api/ecw/memberManagement'
import { getNowDateTime, parseTime } from '@/utils/ruoyi'
import { getBaseHeader } from '@/utils/request'
import OperatingGift from '@/views/ecw/giftManagement/components/operatingGift.vue'
export default {
name: 'ExchangeRecord',
components: {
OperatingGift
},
data() {
return {
upload: {
......@@ -442,6 +463,8 @@ export default {
showSearch: true,
selectedMember: [],
cityList: [],
operatingPagetitle: '',
rewardsItem: {},
dateRangeCreateTime: [],
total: 0,
loading: true,
......@@ -485,6 +508,16 @@ export default {
this.handleQuery()
},
methods: {
handleShowRewardsDetail(row){
let params = {
id: row.rewardId
};
getRewardsDetails(params).then((res) => {
this.dialogVisible = true
this.operatingPagetitle = '1'
this.rewardsItem = res.data;
});
},
// 核销回退
handleVerificationRollback(row) {
this.$confirm(this.$t('是否继续核销回退?'), this.$t('提示'), {
......
<template>
<div class="app-container">
<div class="container">
<div class="formBox">
<div class="formBox exchangeRecordOperation">
<el-form
v-for="(item, index) in queryParamsList"
:key="item.memberId"
......@@ -129,7 +129,7 @@
>
</dict-selector>
</el-form-item>
<el-form-item :label="$t('费用')" required>
<el-form-item :label="$t('费用')">
<el-row :gutter="10">
<el-col :span="12">
<el-form-item prop="expenses">
......@@ -162,7 +162,7 @@
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('收件人姓名')" prop="recipientName"
<el-form-item :label="$t('收件人姓名')"
><el-input
:placeholder="$t('请输入收件人姓名')"
clearable
......@@ -172,7 +172,6 @@
</el-form-item>
<el-form-item
:label="$t('收件人电话')"
prop="recipientPhoneNum"
>
<el-input
:placeholder="$t('请输入收件人电话')"
......@@ -183,7 +182,6 @@
</el-form-item>
<el-form-item
:label="$t('收件人地址')"
prop="recipientAddress"
v-if="item.redeemType != '1'"
>
<el-input
......@@ -380,6 +378,15 @@ export default {
return callback();
}
};
var expensesCurrency = (rule, value, callback) => {
if (this.queryParamsList[0].expenses && !value) {
return callback(
new Error(this.$t("请选择币种"))
);
} else {
return callback();
}
};
return {
env: process.env.NODE_ENV,
// 是否显示弹出层
......@@ -445,11 +452,11 @@ export default {
},
],
expenses: [
{
required: true,
message: this.$t("请输入费用"),
trigger: "blur",
},
// {
// required: true,
// message: this.$t("请输入费用"),
// trigger: "blur",
// },
{
pattern: /^\d+(\.\d{1,2})?$/,
message: this.$t("请输入整数或保留小数点后两位"),
......@@ -458,8 +465,9 @@ export default {
],
currency: [
{
required: true,
message: this.$t("请选择币种"),
// required: true,
// message: this.$t("请选择币种"),
validator:expensesCurrency,
trigger: "change",
},
],
......@@ -775,13 +783,16 @@ export default {
},
};
</script>
<style>
#colorRedInput .el-input__inner {
<style scoped lang="scss">
::v-deep #colorRedInput .el-input__inner {
color: red;
font-size: 14px;
}
</style>
<style scoped lang="scss">
::v-deep .exchangeRecordOperation{
.el-input{
width: 206px;
}
}
.card-title {
padding-right: 10px;
border-right: 4px solid rgb(64, 158, 255);
......@@ -791,10 +802,6 @@ export default {
.del-btn {
color: red;
}
.app-container .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 194px;
}
.container {
padding: 20px 0;
}
......
......@@ -18,21 +18,21 @@
</el-form-item>
<el-form-item :label="$t('标题:')">
<el-input
v-model.trim="queryParams.title"
v-model="queryParams.title"
v-trim
style="width: 300px"
:placeholder="$t('请输入查找')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('规则说明')">
<el-input
v-model.trim="queryParams.desc"
v-model="queryParams.desc"
style="width: 300px"
:placeholder="$t('请输入关键词查找')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
v-trim
@keyup.enter.native="handleQuery"
/>
</el-form-item>
......@@ -169,7 +169,10 @@
:label="$t('累计最高积分')"
align="center"
prop="maxScoreTotal"
/>
>
<template #default="{ row }">
{{ row.maxScoreTotal || "--" }}</template>
</el-table-column>
<el-table-column
:label="$t('规则说明')"
align="center"
......@@ -407,7 +410,7 @@ export default {
// 复制按钮操作
handleCopyButton(row) {
this.$modal
.confirm(this.$t('是否确认复制礼品规则'))
.confirm(this.$t('是否确认复制积分规则'))
.then(function() {
return integralRuleCopy({ id: row.id })
})
......
......@@ -121,7 +121,7 @@
:label="$t('会员编号')"
align="center"
prop="memberCode"
/>
></el-table-column>
<el-table-column :label="$t('会员名称')" align="center">
<template #default="{ row }">
<el-button
......
......@@ -108,8 +108,15 @@
<el-table-column
:label="$t('会员编号')"
align="center"
prop="memberCode"
/>
width="120px"
>
<template #default="{ row }">
<el-button
type="text"
@click="$router.push('/member/member/member-details/' + row.id)"
>{{row.memberCode}}</el-button>
</template>
</el-table-column>
<el-table-column
:label="$t('公司名称')"
align="center"
......@@ -269,13 +276,13 @@
@click="deleteFn(scope.row)"
>{{ $t("删 除") }}</el-button
>
<el-button
<!-- <el-button
type="text"
v-has-permi="['member:user:info']"
size="mini"
@click="$router.push('member/member-details/' + scope.row.id)"
>{{ $t("查看") }}</el-button
>
> -->
</template>
</el-table-column>
</el-table>
......
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