Commit a4c28076 authored by chenwei's avatar chenwei

Merge branch 'feature/099_customer_filter' into 'dev'

问题汇总修改

See merge request !35

(cherry picked from commit 1150e645)

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