|
@@ -37,20 +37,19 @@
|
|
|
<span>{{ item.advanceRatio }}%</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
<template #tags="{ item }">
|
|
|
- <div style="width: 100%" v-if="item.tag">
|
|
|
+ <div style="width: 100%">
|
|
|
<el-tag
|
|
|
style="margin-right: 8px"
|
|
|
type="success"
|
|
|
- v-for="(tag, index) in item.tag"
|
|
|
+ v-for="(tag, index) in item.tags"
|
|
|
closable
|
|
|
:key="index"
|
|
|
@close="tagClose(tag, item)"
|
|
|
>
|
|
|
{{ dictValueLabel(tag, customerTag) }}
|
|
|
</el-tag>
|
|
|
- <template v-if="item.tag.length !== customerTag.length">
|
|
|
+ <template v-if="item.tags.length !== customerTag.length">
|
|
|
<el-select
|
|
|
v-if="item.addTagShow"
|
|
|
v-model="addTag"
|
|
@@ -66,7 +65,7 @@
|
|
|
:key="tag.value"
|
|
|
:label="tag.label"
|
|
|
:value="tag.value"
|
|
|
- :disabled="judgeTagSelect(item.tag, tag.value)"
|
|
|
+ :disabled="judgeTagSelect(item.tags, tag.value)"
|
|
|
/>
|
|
|
</el-select>
|
|
|
<el-tag
|
|
@@ -419,6 +418,7 @@
|
|
|
import { computed, ref } from "vue";
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
import moment from "moment";
|
|
|
+import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const accountList = ref([]);
|
|
@@ -511,13 +511,13 @@ const config = computed(() => {
|
|
|
"min-width": 220,
|
|
|
},
|
|
|
},
|
|
|
- // {
|
|
|
- // attrs: {
|
|
|
- // label: "客户标签",
|
|
|
- // slot: "tags",
|
|
|
- // width: 180,
|
|
|
- // },
|
|
|
- // },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "客户标签",
|
|
|
+ slot: "tags",
|
|
|
+ width: 180,
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "报价金额",
|
|
@@ -631,6 +631,14 @@ const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
proxy.post("/saleQuotation/page", sourceList.value.pagination).then((res) => {
|
|
|
+ res.rows.forEach((x) => {
|
|
|
+ x.addTagShow = false;
|
|
|
+ if (x.tag) {
|
|
|
+ x.tags = x.tag.split(",");
|
|
|
+ } else {
|
|
|
+ x.tags = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
sourceList.value.data = res.rows;
|
|
|
sourceList.value.pagination.total = res.total;
|
|
|
setTimeout(() => {
|
|
@@ -759,6 +767,9 @@ const getAllMoney = (num) => {
|
|
|
return money;
|
|
|
};
|
|
|
const addTag = ref("");
|
|
|
+const showSelect = (item) => {
|
|
|
+ item.addTagShow = true;
|
|
|
+};
|
|
|
const judgeTagSelect = (data, val) => {
|
|
|
if (data && data.length > 0) {
|
|
|
if (data.includes(val)) {
|
|
@@ -771,7 +782,7 @@ const judgeTagSelect = (data, val) => {
|
|
|
const changeTag = (val, item) => {
|
|
|
let data = {
|
|
|
id: item.buyCorporationId,
|
|
|
- tag: JSON.parse(JSON.stringify(item.tag)),
|
|
|
+ tag: proxy.deepClone(item.tags),
|
|
|
};
|
|
|
data.tag.push(val);
|
|
|
data.tag = data.tag.join(",");
|
|
@@ -789,7 +800,7 @@ const changeTag = (val, item) => {
|
|
|
const tagClose = (val, item) => {
|
|
|
let data = {
|
|
|
id: item.buyCorporationId,
|
|
|
- tag: JSON.parse(JSON.stringify(item.tag)),
|
|
|
+ tag: proxy.deepClone(item.tags),
|
|
|
};
|
|
|
data.tag = data.tag.filter((row) => row !== val);
|
|
|
if (data.tag && data.tag.length > 0) {
|