Commit f2f315f8 by 张立顺

fix bug

1 parent 2903f579
......@@ -68,7 +68,7 @@
</el-table-column>
<el-table-column align="center"
label="群关联信息"
width="90">
width="110">
<template #default="scope">
<span>{{ formatGroupStatus(scope.row) }}</span>
</template>
......@@ -138,6 +138,7 @@ import { getParkStore, getServiceStore } from "@api/editCustomer";
// import { asyncExportExcel } from '@api/sys.base'
import { mapActions, mapState } from "vuex";
import {
buildCustomerStatusFilterOptions,
CUSTOMER_STATUS_LIST,
formatCarModelForList,
formatCreateTime,
......@@ -163,10 +164,9 @@ export default {
label: "客户状态",
name: "customerStatus",
type: "select",
optionList: [],
optionList: buildCustomerStatusFilterOptions(),
optionId: "confId",
optionLabel: "confLabel",
optionsName: "customerStatusList",
}, {
label: "客户分类",
name: "customerClass",
......@@ -264,16 +264,16 @@ export default {
},
// 表格
tableData: [],
// 创建方式;1-系统录入;2-现场升级;5-核销抵扣
// 创建方式;1-系统录入;2-现场升级;5-核销抵扣;13-PAD录入
sourceStatusObj: {
1: [1, 2, 6],
2: [3],
5: [5],
13: [13],
},
baseData: {
parkServiceList: [],
storeIdList: [],
customerStatusList: CUSTOMER_STATUS_LIST.slice(),
customerClassList: [{
confId: "A",
confLabel: "A类",
......@@ -310,6 +310,9 @@ export default {
}, {
confId: 5,
confLabel: "核销抵扣",
}, {
confId: 13,
confLabel: "PAD录入",
}],
},
total: 0,
......@@ -362,7 +365,7 @@ export default {
formatRecorder,
formatCreateTime,
formatCustomerStatusLabel(row) {
return formatCustomerStatus(row, this.baseData.customerStatusList);
return formatCustomerStatus(row, CUSTOMER_STATUS_LIST);
},
getParams() {
let params = {
......@@ -373,7 +376,9 @@ export default {
// upgradeFinishFlag: this.searchForm.upgradeFinishFlag
};
// this.searchForm.baseGoodsId && (params.baseGoodsCodeList = [this.searchForm.baseGoodsId])
this.searchForm.customerStatus && (params.customerStatus = this.searchForm.customerStatus);
if (this.searchForm.customerStatus !== "" && this.searchForm.customerStatus != null) {
params.customerStatus = Number(this.searchForm.customerStatus);
}
if (this.searchForm.groupLinked !== "" && this.searchForm.groupLinked != null) {
params.groupLinked = this.searchForm.groupLinked;
}
......@@ -427,7 +432,7 @@ export default {
let formList = ["showFormData"];
formList.forEach((i) => {
this[i].forEach((item, index) => {
if (item.type === "select") {
if (item.type === "select" && item.optionsName && this.baseData[item.optionsName]) {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[i][index].optionLabel] !== "全部") {
const temp = {};
temp[this[i][index].optionId] = "";
......
......@@ -7,6 +7,13 @@ export const CUSTOMER_STATUS_LIST = [
{ confId: 4, confLabel: "已退款" },
];
export function buildCustomerStatusFilterOptions() {
return [
{ confId: "", confLabel: "全部" },
...CUSTOMER_STATUS_LIST,
];
}
export function saveCustomerSnapshot(row) {
if (!row) {
return;
......@@ -145,6 +152,9 @@ export function formatSource(row = {}) {
if (source === 5) {
return "核销抵扣";
}
if (source === 13) {
return "PAD录入";
}
return "系统录入";
}
......
......@@ -228,23 +228,24 @@ export default {
},
async handleConfirm() {
try {
const payload = {
remark: this.editData.remark || undefined,
};
if (this.isEdit) {
payload.id = this.editData.id;
if (!this.enumNameReadonly) {
payload.enumName = (this.editData.enumName || "").trim();
}
if (!this.scoreReadonly && this.editData.score !== "") {
const payload = {
id: this.editData.id,
enumName: (this.editData.enumName || "").trim(),
remark: this.editData.remark ?? "",
};
if (this.editData.score !== "" && this.editData.score != null) {
payload.score = Number(this.editData.score);
}
await updateTagEnum(payload);
this.$message.success("编辑成功");
} else {
payload.dimensionId = this.editData.dimensionId;
payload.enumName = (this.editData.enumName || "").trim();
payload.score = Number(this.editData.score);
const payload = {
dimensionId: this.editData.dimensionId,
enumName: (this.editData.enumName || "").trim(),
score: Number(this.editData.score),
remark: this.editData.remark ?? "",
};
await createTagEnum(payload);
this.$message.success("新增成功");
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!