|
@@ -92,11 +92,16 @@
|
|
<div style="width:calc(100% - 250px);height:100%;overflow:auto">
|
|
<div style="width:calc(100% - 250px);height:100%;overflow:auto">
|
|
<byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :statConfig="[]"
|
|
<byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :statConfig="[]"
|
|
:selectConfig="selectConfig" highlight-current-row :action-list="[
|
|
:selectConfig="selectConfig" highlight-current-row :action-list="[
|
|
- {
|
|
|
|
- text: '添加客户',
|
|
|
|
- action: () => openModal(),
|
|
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ text: '更新小满客户',
|
|
|
|
+ action: () => updateList(),
|
|
},
|
|
},
|
|
]" @moreSearch="moreSearch" @get-list="getList" ref="table">
|
|
]" @moreSearch="moreSearch" @get-list="getList" ref="table">
|
|
|
|
+ <!-- {
|
|
|
|
+ text: '添加客户',
|
|
|
|
+ action: () => openModal(),
|
|
|
|
+ }, -->
|
|
<template #isTop="{ item }">
|
|
<template #isTop="{ item }">
|
|
<div>
|
|
<div>
|
|
<img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)"
|
|
<img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)"
|
|
@@ -134,6 +139,19 @@
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template #companyId="{item}">
|
|
|
|
+ <div style="width: 100%;">
|
|
|
|
+ <div v-if="item.companyId" style="display:flex;justify-content:space-between">
|
|
|
|
+ <span>{{item.companyId}}</span>
|
|
|
|
+ <el-icon style="cursor:pointer;position:relative;top:6px" size="18" color="#409EFF" @click="handleDeleteCompanyId(item)">
|
|
|
|
+ <Delete />
|
|
|
|
+ </el-icon>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else style="text-align:right"><el-icon style="cursor:pointer" size="18" color="#409EFF" @click="handleBindCompanyId(item)">
|
|
|
|
+ <CirclePlus />
|
|
|
|
+ </el-icon></div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
<template #follow="{ item }">
|
|
<template #follow="{ item }">
|
|
<div :class="'getWidth' + item.id" style="width: 100%">
|
|
<div :class="'getWidth' + item.id" style="width: 100%">
|
|
<div style="width: 100%; display: flex">
|
|
<div style="width: 100%; display: flex">
|
|
@@ -343,6 +361,32 @@
|
|
<el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
|
|
<el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog title="手动绑定小满客户" v-if="xmDialog" v-model="xmDialog" width="600">
|
|
|
|
+ <byForm :formConfig="xmFormConfig" :formOption="xmFormOption" v-model="xmFormData.data" :rules="xmRules" ref="xmFormDom">
|
|
|
|
+ <template #companyId>
|
|
|
|
+ <div style="width:100%;display:flex">
|
|
|
|
+ <div style="width:calc(100% - 85px)">
|
|
|
|
+ <el-form-item label="" prop="companyName" label-width="0px">
|
|
|
|
+ <el-input disabled v-model="xmFormData.data.companyName" placeholder="请选择"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ <el-button type="primary" style="width:68px;margin-left:15px" @click="openSelectXm = true" plain>选择</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </byForm>
|
|
|
|
+ <template #footer>
|
|
|
|
+ <el-button @click="xmDialog = false" size="large">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="submitXmForm()" size="large">确 定</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog :title="'选择小满客户'" v-if="openSelectXm" v-model="openSelectXm" width="80%">
|
|
|
|
+ <XmCustomer :isSelect="true" @selectXmCustomer="selectXmCustomer"></XmCustomer>
|
|
|
|
+ <template #footer>
|
|
|
|
+ <el-button @click="openSelectXm = false" size="large">取 消</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -355,6 +399,8 @@ import useUserStore from "@/store/modules/user";
|
|
import selectCity from "@/components/selectCity/index.vue";
|
|
import selectCity from "@/components/selectCity/index.vue";
|
|
import TitleInfo from "@/components/TitleInfo/index.vue";
|
|
import TitleInfo from "@/components/TitleInfo/index.vue";
|
|
import AddCustomer from "@/views/customer/addCustomer.vue";
|
|
import AddCustomer from "@/views/customer/addCustomer.vue";
|
|
|
|
+import XmCustomer from "@/views/xiaoman/index.vue";
|
|
|
|
+
|
|
const AddCustomerDom = ref(null);
|
|
const AddCustomerDom = ref(null);
|
|
const customerId = ref("");
|
|
const customerId = ref("");
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
@@ -528,10 +574,22 @@ const config = computed(() => {
|
|
attrs: {
|
|
attrs: {
|
|
label: "客户来源",
|
|
label: "客户来源",
|
|
prop: "source",
|
|
prop: "source",
|
|
- width: 120,
|
|
|
|
|
|
+ width: 150,
|
|
},
|
|
},
|
|
render(type) {
|
|
render(type) {
|
|
- return proxy.dictValueLabel(type, customerSource.value);
|
|
|
|
|
|
+ let arr = type.split(",");
|
|
|
|
+ if (arr && arr.length > 0) {
|
|
|
|
+ let str = "";
|
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
|
+ const val = arr[i];
|
|
|
|
+ str =
|
|
|
|
+ str +
|
|
|
|
+ proxy.dictValueLabel(val, customerSource.value) +
|
|
|
|
+ (i < arr.length - 1 ? " , " : "");
|
|
|
|
+ }
|
|
|
|
+ return str;
|
|
|
|
+ }
|
|
|
|
+ // return proxy.dictValueLabel(type, customerSource.value);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -566,6 +624,14 @@ const config = computed(() => {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ // {
|
|
|
|
+ // attrs: {
|
|
|
|
+ // label: "小满客户ID",
|
|
|
|
+ // slot: "companyId",
|
|
|
|
+ // width: 170,
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
|
|
+
|
|
{
|
|
{
|
|
attrs: {
|
|
attrs: {
|
|
label: "跟进",
|
|
label: "跟进",
|
|
@@ -1302,6 +1368,80 @@ const refreshList = () => {
|
|
dialogVisible.value = false;
|
|
dialogVisible.value = false;
|
|
getList();
|
|
getList();
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+const updateList = () => {
|
|
|
|
+ proxy.msgTip("更新中", 2);
|
|
|
|
+ proxy.post("/xiaomanCustomer/updateList").then((res) => {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ proxy.msgTip("更新成功", 1);
|
|
|
|
+ }, 300);
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const handleDeleteCompanyId = (row) => {
|
|
|
|
+ proxy
|
|
|
|
+ .msgConfirm()
|
|
|
|
+ .then((res) => {
|
|
|
|
+ proxy
|
|
|
|
+ .post("/afterSalesRecords/delete", {
|
|
|
|
+ id: row.id,
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ proxy.msgTip("解绑成功", 1);
|
|
|
|
+ getList();
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {});
|
|
|
|
+};
|
|
|
|
+const openSelectXm = ref(false);
|
|
|
|
+const xmDialog = ref(false);
|
|
|
|
+const xmFormDom = ref(null);
|
|
|
|
+const xmFormData = reactive({
|
|
|
|
+ data: {},
|
|
|
|
+});
|
|
|
|
+const xmFormOption = reactive({
|
|
|
|
+ inline: true,
|
|
|
|
+ labelWidth: 100,
|
|
|
|
+ itemWidth: 100,
|
|
|
|
+});
|
|
|
|
+const xmFormConfig = computed(() => {
|
|
|
|
+ return [
|
|
|
|
+ {
|
|
|
|
+ type: "slot",
|
|
|
|
+ slotName: "companyId",
|
|
|
|
+ label: "小满客户",
|
|
|
|
+ prop: "companyName",
|
|
|
|
+ itemWidth: 100,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+});
|
|
|
|
+const xmRules = ref({
|
|
|
|
+ companyName: [{ required: true, message: "请选择小满客户", trigger: "blur" }],
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+const handleBindCompanyId = (row) => {
|
|
|
|
+ xmDialog.value = true;
|
|
|
|
+ xmFormData.data = {
|
|
|
|
+ id: row.id,
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const selectXmCustomer = (row) => {
|
|
|
|
+ console.log(row, "sada");
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const submitXmForm = () => {
|
|
|
|
+ xmFormDom.value.handleSubmit(() => {
|
|
|
|
+ proxy.post("/customer/CustomerAllocationss", xmFormData.data).then(() => {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: "绑定成功",
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
|
|
+ xmDialog.value = false;
|
|
|
|
+ getList();
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|