Commit 143227ff authored by chenwei's avatar chenwei

问题汇总修改

parent 7dbfdb1d
...@@ -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,15 +368,15 @@ export default { ...@@ -349,15 +368,15 @@ export default {
}, },
{ type: "number", message: "输入数字", trigger: "blur" }, { type: "number", message: "输入数字", trigger: "blur" },
], ],
quantityRemain: [
{
required: true,
message: this.$t("请输入剩余数量"),
trigger: "blur",
},
],
}, },
quantityRemain: [
{
required: true,
message: this.$t("请输入剩余数量"),
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,24 +437,29 @@ export default { ...@@ -409,24 +437,29 @@ 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 (this.title == "2") { if (valid) {
editRewards(params).then((res) => { if (this.title == "2") {
this.$emit("update:show", false); editRewards(params).then((res) => {
this.$message.success(this.$t("编辑成功")); this.$emit("update:show", false);
this.$refs["queryForm"].resetFields(); this.$message.success(this.$t("编辑成功"));
this.$parent.getList(); 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 { } else {
//Add console.log("error submit!!");
addRewards(params).then((res) => { return false;
this.$emit("update:show", false);
this.$message.success(this.$t("成功"));
this.$refs["queryForm"].resetFields();
});
} }
}); });
}, },
...@@ -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;
}); });
}, },
......
...@@ -159,6 +159,9 @@ ...@@ -159,6 +159,9 @@
v-if="cascaderState" v-if="cascaderState"
style="width: 400px" style="width: 400px"
:options="regionTreeList" :options="regionTreeList"
@change="selectHandle"
@expand-change="selectExpand"
collapse-tags
v-model="queryParams.extraOrderV.receiveAddrList" v-model="queryParams.extraOrderV.receiveAddrList"
:props="cascaderProps" :props="cascaderProps"
clearable clearable
...@@ -588,8 +591,6 @@ export default { ...@@ -588,8 +591,6 @@ 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 &&
...@@ -848,6 +849,8 @@ export default { ...@@ -848,6 +849,8 @@ export default {
], ],
}, },
}, },
lastSelectedList: [], //上一次选中数据
oneDimensionalList: [],
queryParams: { queryParams: {
dateRangeCreateTime: [], //活动有效期 dateRangeCreateTime: [], //活动有效期
type: "", //指标类型 type: "", //指标类型
...@@ -941,14 +944,15 @@ export default { ...@@ -941,14 +944,15 @@ export default {
}, },
created() { created() {
this.handleGetChannelList(); this.handleGetChannelList();
this.handleGetRegionTreeList();
this.getList(); this.getList();
if (this.$route.query.pageStatus == "edit") { if (this.$route.query.pageStatus == "edit") {
this.handleIntegralRuleDetails(); this.handleIntegralRuleDetails();
} } else if (this.$route.query.pageStatus == "view") {
if (this.$route.query.pageStatus == "view") {
this.showViewTime = true; this.showViewTime = true;
this.handleIntegralRuleDetails(); this.handleIntegralRuleDetails();
} else {
this.handleGetRegionTreeList();
} }
}, },
activated() {}, activated() {},
...@@ -963,6 +967,13 @@ export default { ...@@ -963,6 +967,13 @@ export default {
this.queryParams.extraOrderV?.orderEntry?.join(); this.queryParams.extraOrderV?.orderEntry?.join();
params.extraRegister.registerPlatform = params.extraRegister.registerPlatform =
this.queryParams.extraRegister.registerPlatform?.join(); this.queryParams.extraRegister.registerPlatform?.join();
if (
(this.queryParams.type =
1 && this.queryParams.extraOrderV.receiveAddrList[0][0] == "000")
) {
// params.extraOrderV.receiveAddrList[0] = [0, 0, 0];
params.extraOrderV.receiveAddrList = [[0, 0, 0]];
}
integralRuleUpdated(params).then((res) => { integralRuleUpdated(params).then((res) => {
this.$message.success(this.$t("更新成功")); this.$message.success(this.$t("更新成功"));
this.$router.go(-1); this.$router.go(-1);
...@@ -984,6 +995,7 @@ export default { ...@@ -984,6 +995,7 @@ export default {
return b === null ? a : undefined; return b === null ? a : undefined;
} }
); );
params.createTime = parseTime(res.data.createTime); params.createTime = parseTime(res.data.createTime);
params.updateTime = parseTime(res.data.updateTime); params.updateTime = parseTime(res.data.updateTime);
...@@ -1008,7 +1020,14 @@ export default { ...@@ -1008,7 +1020,14 @@ export default {
parseTime(res.data.endTime), parseTime(res.data.endTime),
]; ];
if (
params.type == 1 &&
params.extraOrderV.receiveAddrList[0].toString() == "0,0,0"
) {
params.extraOrderV.receiveAddrList = [["000"]];
}
this.queryParams = { ...params }; this.queryParams = { ...params };
this.handleGetRegionTreeList();
}); });
}, },
handleSelectBannerDialog() { handleSelectBannerDialog() {
...@@ -1057,7 +1076,6 @@ export default { ...@@ -1057,7 +1076,6 @@ 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);
...@@ -1067,6 +1085,12 @@ export default { ...@@ -1067,6 +1085,12 @@ export default {
params.extraRegister.registerPlatform = params.extraRegister.registerPlatform =
this.queryParams.extraRegister.registerPlatform?.join(); this.queryParams.extraRegister.registerPlatform?.join();
params.status = this.queryParams.status || "2"; params.status = this.queryParams.status || "2";
if (
(this.queryParams.type =
1 && this.queryParams.extraOrderV.receiveAddrList[0][0] == "000")
) {
params.extraOrderV.receiveAddrList = [[0, 0, 0]];
}
createIntegralRule(params).then((res) => { createIntegralRule(params).then((res) => {
this.$message.success(this.$t("成功")); this.$message.success(this.$t("成功"));
this.$router.go(-1); this.$router.go(-1);
...@@ -1088,6 +1112,12 @@ export default { ...@@ -1088,6 +1112,12 @@ export default {
params.extraRegister.registerPlatform = params.extraRegister.registerPlatform =
this.queryParams.extraRegister.registerPlatform?.join(); this.queryParams.extraRegister.registerPlatform?.join();
params.status = this.queryParams.status || "1"; params.status = this.queryParams.status || "1";
if (
(this.queryParams.type =
1 && this.queryParams.extraOrderV.receiveAddrList[0][0] == "000")
) {
params.extraOrderV.receiveAddrList = [[0, 0, 0]];
}
createIntegralRule(params).then((res) => { createIntegralRule(params).then((res) => {
this.$message.success(this.$t("成功")); this.$message.success(this.$t("成功"));
this.$router.go(-1); this.$router.go(-1);
...@@ -1115,21 +1145,164 @@ export default { ...@@ -1115,21 +1145,164 @@ export default {
this.channelList = res.data; this.channelList = res.data;
}); });
}, },
selectExpand(val) {
console.log("PPPPPPP", val);
},
selectHandle(val, defaultStatus = false) {
this.queryParams.extraOrderV.receiveAddrList = [];
let current = []; // 获取当前选中的哪个数据
if (val.length >= this.lastSelectedList.length) {
let keys = this.lastSelectedList.map((item) => JSON.stringify(item));
current = val.filter((item) => !keys.includes(JSON.stringify(item)));
} else {
// 取消选中
let keys = val.map((item) => JSON.stringify(item));
current = this.lastSelectedList.filter(
(item) => !keys.includes(JSON.stringify(item))
);
}
const currentValue = current.length > 0 ? current[0][0] || "" : "";
if (currentValue == "000") {
if (this.judgetAllSelected(val)) {
this.traverseTree(this.regionTreeList); //获取全选时回显的数据
} else {
this.queryParams.extraOrderV.receiveAddrList = []; //不选
}
} else {
this.queryParams.extraOrderV.receiveAddrList = val; //半选
}
if (!defaultStatus) {
this.checkIsAddAllSelected();
}
// this.$nextTick(() => {
//
this.lastSelectedList = this.queryParams.extraOrderV.receiveAddrList;
// });
},
checkIsAddAllSelected() {
//这里你要判断好你的dom是否正确
let label1 = document
.querySelectorAll(".el-cascader-panel")[0]
.querySelector(".el-cascader-menu__wrap")
.querySelectorAll("li")[0]
.querySelectorAll("label")[0];
let span1 = document
.querySelectorAll(".el-cascader-panel")[0]
.querySelector(".el-cascader-menu__wrap")
.querySelectorAll("li")[0]
.querySelectorAll("label")[0]
.querySelectorAll("span")[0];
// 获取所有的数据
let list = this.regionTreeList; // 原始数据列表
if (this.oneDimensionalList.length === 0) {
this.getTreeList(list); // 把所有的父子级平铺成一个一级列表
}
let origin = [...this.oneDimensionalList].filter(
(item) => !item.children
); //获取所有的叶子节点
let nowList = [...this.queryParams.extraOrderV.receiveAddrList].filter(
(item) => item[0] !== "000"
);
// 半选时, 如果有之前选过全选,要把全选过滤掉
if (origin.length > nowList.length && nowList.length != 0) {
this.queryParams.extraOrderV.receiveAddrList = deepClone(
this.queryParams.extraOrderV.receiveAddrList.filter(
(item) => item[0] !== "000"
)
);
//设置半选样式,setTimeout可以解决样式渲染不上的问题
setTimeout(function () {
label1.className = "el-checkbox";
span1.className = "el-checkbox__input is-indeterminate";
}, 1);
} else if (nowList.length == 0) {
//不选时, 如果有之前选过全选,要把全选过滤掉
this.queryParams.extraOrderV.receiveAddrList = deepClone(
this.queryParams.extraOrderV.receiveAddrList.filter(
(item) => item[0] !== "000"
)
);
label1.className = "el-checkbox";
span1.className = "el-checkbox__input";
} else {
// 当所有的数据都选择时, 要自动把全选勾选上 最后这种是:origin.length == nowList.length
if (
this.queryParams.extraOrderV.receiveAddrList[0] &&
this.queryParams.extraOrderV.receiveAddrList[0][0] !== "000"
) {
this.queryParams.extraOrderV.receiveAddrList = [
["000"],
...this.queryParams.extraOrderV.receiveAddrList,
];
label1.className = "el-checkbox";
span1.className = "el-checkbox__input is-checked";
}
}
},
getTreeList(list) {
let _this = this;
for (let i = 0; i < list.length; i++) {
let a = list[i];
if (a.id !== "000") {
this.oneDimensionalList.push(list[i]);
}
if (a.children && a.children.length > 0) {
let res = _this.getTreeList(a.children);
if (res) {
return res;
}
}
}
},
judgetAllSelected(node) {
// 判断是否是全选,也就是看已选择的选中中包不包含"全选"
let isAllSelected = false;
for (let i = 0; i < node.length; i++) {
if (node[i][0] == "000") {
isAllSelected = true;
break;
}
}
return isAllSelected;
},
traverseTree(list, parentNode = []) {
list.length > 0 &&
list.forEach((e) => {
let pNode = deepClone(parentNode);
if (e.children && e.children.length > 0) {
pNode.push(e.id); // 1 11
this.traverseTree(e.children, pNode);
} else {
if (parentNode.length > 0) {
this.queryParams.extraOrderV.receiveAddrList.push([
...parentNode,
e.id,
]);
} else {
this.queryParams.extraOrderV.receiveAddrList.push([e.id]);
}
}
});
},
//获取目的仓列表 //获取目的仓列表
handleGetRegionTreeList() { handleGetRegionTreeList() {
getRegionTreeList().then((res) => { getRegionTreeList().then((res) => {
this.regionTreeList = res.data; this.regionTreeList = res.data;
this.regionTreeList.unshift({
id: "000",
labelZh: "全选",
labelEn: "select ALL",
});
this.$nextTick(() => {
this.selectHandle(this.queryParams.extraOrderV.receiveAddrList, true);
});
}); });
}, },
traverseTree(tree, newVal) {
for (let node of tree) {
node.labeluu = newVal ? node.labelZh : node.labelEn;
if (node.children && node.children.length > 0) {
this.traverseTree(node.children); // 递归遍历子节点
}
}
return tree;
},
//积分来源 //积分来源
handleSourceType(id) { handleSourceType(id) {
return this.getDictDatas(DICT_TYPE.SCORE_RULE_TYPE).filter( return this.getDictDatas(DICT_TYPE.SCORE_RULE_TYPE).filter(
......
...@@ -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">
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
</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
:placeholder="$t('请输入收件人姓名')" :placeholder="$t('请输入收件人姓名')"
clearable clearable
...@@ -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,10 +798,16 @@ export default { ...@@ -802,10 +798,16 @@ 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 {
padding-right: 10px; padding-right: 10px;
......
...@@ -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