Commit f2f315f8 by 张立顺

fix bug

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