Commit 65c81e67 authored by chenwei's avatar chenwei

Merge branch 'hotfix/preReleaseDefect' into 'pre-release'

Hotfix/pre release defect

See merge request !37
parents d47ab990 2a78f8f3
...@@ -116,3 +116,12 @@ export function bulkConversion(data) { ...@@ -116,3 +116,12 @@ export function bulkConversion(data) {
data, data,
}); });
} }
//获取仓库列表下拉框
export function getWarehouseList(data) {
return request({
url: "/ecw/warehouse/list-all-simple",
method: "post",
data,
});
}
...@@ -4520,6 +4520,7 @@ ...@@ -4520,6 +4520,7 @@
"领取方式": "Collection method", "领取方式": "Collection method",
"兑换网点": "Exchange outlet", "兑换网点": "Exchange outlet",
"请选择兑换网点": "Please select an exchange outlet", "请选择兑换网点": "Please select an exchange outlet",
"请选择提货点": "Please select a pickup warehouse",
"剩余数量": "Remaining Quantity", "剩余数量": "Remaining Quantity",
"礼品ID": "Gift ID", "礼品ID": "Gift ID",
"允许兑换次数": "Allow redemption times", "允许兑换次数": "Allow redemption times",
......
...@@ -52,19 +52,25 @@ ...@@ -52,19 +52,25 @@
<el-row :gutter="10" v-for="(item, index) in queryParams.nodeIds"> <el-row :gutter="10" v-for="(item, index) in queryParams.nodeIds">
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item
:label="$t('兑换网点')" :label="$t('提货点')"
:prop="`nodeIds[${index}].nodeId`" :prop="`nodeIds[${index}].wareHouses`"
:rules="rules.nodeIds.nodeId" :rules="rules.nodeIds.wareHouses"
> >
<el-select <el-select
v-model="item.nodeId" v-model="item.wareHouses"
:placeholder="$t('请选择兑换网点')" :placeholder="$t('请选择提货点')"
:disabled="isDisable" :disabled="isDisable"
clearable clearable
multiple
filterable
remote
reserve-keyword
:remote-method="handleWarehouseList"
:loading="loading"
size="small" size="small"
> >
<el-option <el-option
v-for="nodeItem in nodeList" v-for="nodeItem in warehouseList"
:key="nodeItem.id" :key="nodeItem.id"
:label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value="nodeItem.id" :value="nodeItem.id"
...@@ -84,6 +90,21 @@ ...@@ -84,6 +90,21 @@
:disabled="isDisable" :disabled="isDisable"
/> </el-form-item /> </el-form-item
></el-col> ></el-col>
<el-col :span="6">
<el-form-item
:label="$t('剩余数量')"
:prop="`nodeIds[${index}].quantityRemain`"
:rules="rules.nodeIds.quantityRemain"
>
<el-input
class="input-item-width"
:disabled="isDisable && disabelEnableStatus"
v-model.trim="item.quantityRemain"
:placeholder="$t('请输入')"
type="number"
/>
</el-form-item>
</el-col>
<el-col :span="1"> <el-col :span="1">
<el-button <el-button
type="primary" type="primary"
...@@ -92,15 +113,7 @@ ...@@ -92,15 +113,7 @@
></el-button> ></el-button>
</el-col> </el-col>
</el-row> </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('请输入')"
type="number"
/>
</el-form-item>
<el-form-item :label="$t('活动时间')" prop="dateRangeCreateTime"> <el-form-item :label="$t('活动时间')" prop="dateRangeCreateTime">
<el-date-picker <el-date-picker
:disabled="isDisable" :disabled="isDisable"
...@@ -192,7 +205,11 @@ ...@@ -192,7 +205,11 @@
</template> </template>
<script> <script>
import { editRewards, addRewards } from "@/api/ecw/giftManagement"; import {
editRewards,
addRewards,
getWarehouseList,
} from "@/api/ecw/giftManagement";
import { getDictDatas, DICT_TYPE } from "@/utils/dict"; import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import imageUpload from "@/components/ImageUpload"; import imageUpload from "@/components/ImageUpload";
import { parseTime, resetForm } from "../../../../utils/ruoyi"; import { parseTime, resetForm } from "../../../../utils/ruoyi";
...@@ -286,16 +303,17 @@ export default { ...@@ -286,16 +303,17 @@ export default {
}, },
data() { data() {
return { return {
loading: false,
queryParams: { queryParams: {
allowCount: null, allowCount: null,
endTime: null, endTime: null,
imgEn: null, imgEn: null,
imgZh: null, imgZh: null,
nodeIds: [{ nodeId: "", points: "" }], nodeIds: [{ wareHouses: "", points: "", quantityRemain: null }],
nodeId: null, nodeId: null,
pickMethod: null, pickMethod: null,
pointsRequire: null, pointsRequire: null,
quantityRemain: null,
remarkEn: null, remarkEn: null,
remarkFr: null, remarkFr: null,
remarkZh: null, remarkZh: null,
...@@ -306,6 +324,7 @@ export default { ...@@ -306,6 +324,7 @@ export default {
dateRangeCreateTime: null, dateRangeCreateTime: null,
}, },
disabelEnableStatus: false, disabelEnableStatus: false,
warehouseList: [],
rules: { rules: {
titleZh: [ titleZh: [
{ {
...@@ -334,7 +353,7 @@ export default { ...@@ -334,7 +353,7 @@ export default {
}, },
], ],
nodeIds: { nodeIds: {
nodeId: [ wareHouses: [
{ {
required: true, required: true,
message: this.$t("请选择网点"), message: this.$t("请选择网点"),
...@@ -349,8 +368,6 @@ export default { ...@@ -349,8 +368,6 @@ export default {
}, },
{ type: "number", message: "输入数字", trigger: "blur" }, { type: "number", message: "输入数字", trigger: "blur" },
], ],
},
quantityRemain: [ quantityRemain: [
{ {
required: true, required: true,
...@@ -358,6 +375,8 @@ export default { ...@@ -358,6 +375,8 @@ export default {
trigger: "blur", trigger: "blur",
}, },
], ],
},
pickMethod: [ pickMethod: [
{ {
required: true, required: true,
...@@ -399,7 +418,16 @@ export default { ...@@ -399,7 +418,16 @@ export default {
}, },
}; };
}, },
created() {
this.handleWarehouseList();
},
methods: { methods: {
handleWarehouseList(val = "") {
let params = { title: val };
getWarehouseList(params).then((res) => {
this.warehouseList = res.data;
});
},
handleOrderVRule(item, index) { handleOrderVRule(item, index) {
if (index == "0") { if (index == "0") {
this.queryParams.nodeIds.push({ nodeId: "", points: "" }); this.queryParams.nodeIds.push({ nodeId: "", points: "" });
...@@ -409,10 +437,11 @@ export default { ...@@ -409,10 +437,11 @@ export default {
}, },
submit() { submit() {
let params = { ...this.queryParams }; let params = { ...this.queryParams };
params.startTime = this.queryParams.dateRangeCreateTime[0]; params.startTime = this.queryParams?.dateRangeCreateTime?.[0];
params.endTime = this.queryParams.dateRangeCreateTime[1]; params.endTime = this.queryParams?.dateRangeCreateTime?.[1];
params.pickMethod = this.queryParams.pickMethod.toString(); params.pickMethod = this.queryParams.pickMethod.toString();
this.$refs["queryForm"].validate((valid) => { this.$refs["queryForm"].validate((valid) => {
if (valid) {
if (this.title == "2") { if (this.title == "2") {
editRewards(params).then((res) => { editRewards(params).then((res) => {
this.$emit("update:show", false); this.$emit("update:show", false);
...@@ -428,6 +457,10 @@ export default { ...@@ -428,6 +457,10 @@ export default {
this.$refs["queryForm"].resetFields(); this.$refs["queryForm"].resetFields();
}); });
} }
} else {
console.log("error submit!!");
return false;
}
}); });
}, },
close() { close() {
...@@ -437,7 +470,7 @@ export default { ...@@ -437,7 +470,7 @@ export default {
this.queryParams = { this.queryParams = {
allowCount: null, allowCount: null,
endTime: null, endTime: null,
nodeIds: [{ nodeId: "", points: "" }], nodeIds: [{ wareHouses: "", points: "", quantityRemain: null }],
imgEn: null, imgEn: null,
imgZh: null, imgZh: null,
nodeId: null, nodeId: null,
......
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
/> />
</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" v-model="queryParams.nodeId"
:placeholder="$t('请选择兑换网点')" :placeholder="$t('请选择提货点')"
clearable clearable
size="small" size="small"
@change="handleQuery" @change="handleQuery"
...@@ -221,7 +221,12 @@ ...@@ -221,7 +221,12 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@click="$router.push('/memberManagement/exchangeRecord')" @click="
$router.push({
path: '/memberManagement/exchangeRecord',
query: { rewardCode: scope.row.code },
})
"
>{{ scope.row.exchangeCount }}</el-button >{{ scope.row.exchangeCount }}</el-button
> >
</template> </template>
...@@ -360,12 +365,12 @@ ...@@ -360,12 +365,12 @@
</template> </template>
<script> <script>
import { import {
getNodeList,
getGiftList, getGiftList,
deleteRewards, deleteRewards,
copyRewardsAPI, copyRewardsAPI,
changeRewardsStatus, changeRewardsStatus,
delayRewards, delayRewards,
getWarehouseList,
} 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";
...@@ -535,7 +540,8 @@ export default { ...@@ -535,7 +540,8 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
getNodeList() { getNodeList() {
getNodeList().then((res) => { let params = { title: "" };
getWarehouseList(params).then((res) => {
this.nodeList = res.data; this.nodeList = res.data;
}); });
}, },
......
...@@ -516,6 +516,16 @@ export default { ...@@ -516,6 +516,16 @@ export default {
return this.$i18n.locale === "zh_CN"; return this.$i18n.locale === "zh_CN";
}, },
}, },
watch: {
"$route.query.rewardCode": {
handler(val) {
if (val) {
this.queryParams.rewardCode = val;
}
},
immediate: true,
},
},
created() { created() {
this.getNodeListAPI(); this.getNodeListAPI();
this.handleQuery(); this.handleQuery();
......
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
</dict-selector> </dict-selector>
</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" v-model="queryParams.nodeId"
:placeholder="$t('请选择兑换网点')" :placeholder="$t('请选择提货点')"
clearable clearable
size="small" size="small"
@change="handleQuery" @change="handleQuery"
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
{{ handlePickMethod(row.pickMethod) }} {{ handlePickMethod(row.pickMethod) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('兑换网点')" align="center"> <el-table-column :label="$t('提货点')" align="center">
<template v-slot="{ row }"> <template v-slot="{ row }">
{{ {{
isChinese isChinese
...@@ -279,6 +279,7 @@ import { ...@@ -279,6 +279,7 @@ import {
copyRewardsAPI, copyRewardsAPI,
changeRewardsStatus, changeRewardsStatus,
delayRewards, delayRewards,
getWarehouseList,
} 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";
...@@ -438,7 +439,8 @@ export default { ...@@ -438,7 +439,8 @@ export default {
}, },
getNodeList() { getNodeList() {
getNodeList().then((res) => { let params = { title: "" };
getWarehouseList(params).then((res) => {
this.nodeList = res.data; this.nodeList = res.data;
}); });
}, },
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
:inline="true" :inline="true"
:rules="rules" :rules="rules"
:disabled="viewRecordDisable" :disabled="viewRecordDisable"
label-width="168px" label-width="148px"
> >
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
> >
</dict-selector> </dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('费用')"> <el-form-item class="expenses" :label="$t('费用')">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="expenses"> <el-form-item prop="expenses">
...@@ -171,9 +171,7 @@ ...@@ -171,9 +171,7 @@
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('收件人电话')">
:label="$t('收件人电话')"
>
<el-input <el-input
:placeholder="$t('请输入收件人电话')" :placeholder="$t('请输入收件人电话')"
clearable clearable
...@@ -381,18 +379,14 @@ export default { ...@@ -381,18 +379,14 @@ export default {
}; };
var expensesCurrency = (rule, value, callback) => { var expensesCurrency = (rule, value, callback) => {
if (this.queryParamsList[0].expenses && !value) { if (this.queryParamsList[0].expenses && !value) {
return callback( return callback(new Error(this.$t("请选择币种")));
new Error(this.$t("请选择币种"))
);
} else { } else {
return callback(); return callback();
} }
}; };
var expensesValidate =(rule, value, callback) => { var expensesValidate = (rule, value, callback) => {
if (this.queryParamsList[0].currency && !value) { if (this.queryParamsList[0].currency && !value) {
return callback( return callback(new Error(this.$t("请输入")));
new Error(this.$t("请输入"))
);
} else { } else {
return callback(); return callback();
} }
...@@ -473,15 +467,15 @@ export default { ...@@ -473,15 +467,15 @@ export default {
trigger: "blur", trigger: "blur",
}, },
{ {
validator:expensesValidate, validator: expensesValidate,
trigger: "change", trigger: "change",
} },
], ],
currency: [ currency: [
{ {
// required: true, // required: true,
// message: this.$t("请选择币种"), // message: this.$t("请选择币种"),
validator:expensesCurrency, validator: expensesCurrency,
trigger: "change", trigger: "change",
}, },
], ],
...@@ -554,7 +548,6 @@ export default { ...@@ -554,7 +548,6 @@ export default {
methods: { methods: {
getDetails() { getDetails() {
memberUserGet({ id: this.$route.query.memberId }).then((r) => { memberUserGet({ id: this.$route.query.memberId }).then((r) => {
console.log(r, "rrrr");
// this.details = r.data; // this.details = r.data;
this.isChinese this.isChinese
? (this.queryParamsList[0].memberName = r.data.nickname) ? (this.queryParamsList[0].memberName = r.data.nickname)
...@@ -681,12 +674,15 @@ export default { ...@@ -681,12 +674,15 @@ export default {
} }
this.queryParamsList[0].pointsRequire = item.pointsRequire; this.queryParamsList[0].pointsRequire = item.pointsRequire;
this.queryParamsList[0].rewardCount = ""; this.queryParamsList[0].rewardCount = "1";
this.queryParamsList[0].spendCredit = ""; this.queryParamsList[0].spendCredit = "";
this.queryParamsList[0].remainingPoints = this.queryParamsList[0].remainingPoints =
this.queryParamsList[0].holdScore; this.queryParamsList[0].holdScore;
this.quantityComputation = this.quantityComputation =
this.queryParamsList[0].remainingPoints >= 0 ? true : false; this.queryParamsList[0].remainingPoints >= 0 ? true : false;
// if (this.queryParamsList[0].holdScore) {
this.handleRewardCount({}, 0, 1);
// }
}, },
handleSelectMember() { handleSelectMember() {
this.dialogVisible = true; this.dialogVisible = true;
...@@ -802,9 +798,15 @@ export default { ...@@ -802,9 +798,15 @@ export default {
color: red; color: red;
font-size: 14px; font-size: 14px;
} }
::v-deep .exchangeRecordOperation{ ::v-deep .exchangeRecordOperation {
.el-input{ .el-input,
width: 206px; .upload-file {
width: 286px;
}
.expenses {
.el-form-item--small.el-form-item {
margin-bottom: 0;
}
} }
} }
.card-title { .card-title {
......
...@@ -140,7 +140,13 @@ ...@@ -140,7 +140,13 @@
v-loading="loading" v-loading="loading"
:data="integrationRuleList" :data="integrationRuleList"
> >
<el-table-column :label="$t('编号')" align="center" prop="code" /> <el-table-column :label="$t('编号')" align="center">
<template #default="{ row }">
<el-button size="mini" type="text" @click="handleViewDetails(row)">
{{ row.code || "/" }}</el-button
>
</template>
</el-table-column>
<el-table-column width="140" :label="$t('指标类型')" align="center"> <el-table-column width="140" :label="$t('指标类型')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
...@@ -213,12 +219,12 @@ ...@@ -213,12 +219,12 @@
</el-table-column> </el-table-column>
<el-table-column width="220px" :label="$t('操作')" align="center"> <el-table-column width="220px" :label="$t('操作')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <!-- <el-button
size="mini" size="mini"
type="text" type="text"
@click="handleViewDetails(scope.row)" @click="handleViewDetails(scope.row)"
>{{ $t("查看") }}</el-button >{{ $t("查看") }}</el-button
> > -->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
......
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