|
@@ -18,40 +18,151 @@
|
|
|
<van-list v-model:loading="isLoading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
|
|
<div v-for="item in listData.records" :key="item.id" @click="toDetail(item)">
|
|
|
<van-swipe-cell>
|
|
|
- <div :class="`${item.needPin ? 'bg-slate-50' : 'bg-white'} px-5 py-5 flex items-center flex-row w-full listContent`">
|
|
|
+ <div
|
|
|
+ :class="`${item.needPin ? 'bg-slate-50' : 'bg-white'} px-5 py-5 flex items-center flex-row w-full listContent`">
|
|
|
<div class="listOfImages items-justify-center rounded-full overflow-hidden bg-[#FFEEEC]">
|
|
|
<img :src="queryParameters.homeImage" class="w-full h-full">
|
|
|
</div>
|
|
|
<div class="flex-1 h-full">
|
|
|
<!-- 商机 -->
|
|
|
- <template v-if="queryParameters?.key == 'business'">{{ item.name }}</template>
|
|
|
+ <template v-if="queryParameters?.key == 'business'">
|
|
|
+ <div>
|
|
|
+ <div class="flex items-center flex-row">
|
|
|
+ <div class="flex-1 truncate mr-8 titles relative">{{ item.name }}</div>
|
|
|
+ <div><van-tag type="primary">{{ item.stageValue }}</van-tag></div>
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center flex-row mt-1">
|
|
|
+ <van-text-ellipsis :content="item.customerName"
|
|
|
+ class="flex-1 text-[#B9B9B9] text-size-small" />
|
|
|
+ <div class="text-[#B9B9B9] text-size-small" v-if="item.inchargerName">负责人:{{
|
|
|
+ item.inchargerName }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- 线索 -->
|
|
|
- <template v-if="queryParameters?.key == 'thread'">{{ item.clueName }}</template>
|
|
|
+ <template v-if="queryParameters?.key == 'thread'">
|
|
|
+ <div>
|
|
|
+ <div class="flex items-center flex-row">
|
|
|
+ <div class="flex-1 truncate mr-8 titles relative">{{ item.clueName }}</div>
|
|
|
+ <div class="text-[#B9B9B9]">{{ item.customerLevelValue }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center flex-row mt-1">
|
|
|
+ <div class="text-[#B9B9B9] text-size-small" v-if="item.inchargerName">负责人:{{
|
|
|
+ item.inchargerName }}</div>
|
|
|
+ <div></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- 客户 -->
|
|
|
- <template v-if="queryParameters?.key == 'customer'">{{ item.customName }}</template>
|
|
|
+ <template v-if="queryParameters?.key == 'customer'">
|
|
|
+ <div>
|
|
|
+ <div class="flex items-center flex-row">
|
|
|
+ <div class="flex-1 truncate mr-8 titles relative">{{ item.customName }}</div>
|
|
|
+ <div class="text-[#B9B9B9]">{{ item.customerLevelValue }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center flex-row mt-1">
|
|
|
+ <div class="text-[#B9B9B9] text-size-small" v-if="item.inchargerName">负责人:{{
|
|
|
+ item.inchargerName }}</div>
|
|
|
+ <div></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- 联系人 -->
|
|
|
- <template v-if="queryParameters?.key == 'contacts'">{{ item.name }}</template>
|
|
|
+ <template v-if="queryParameters?.key == 'contacts'">
|
|
|
+ <div>
|
|
|
+ <div class="flex items-center flex-row">
|
|
|
+ <div class="flex-1 truncate mr-8 titles relative">{{ item.name }}</div>
|
|
|
+ <div class="text-[#B9B9B9]">{{ item.position }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center justify-between flex-row mt-1">
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/5 truncate" v-if="item.ownerName">客户:{{
|
|
|
+ item.customName }}</div>
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/5 truncate text-right" v-if="item.ownerName">负责人:{{
|
|
|
+ item.ownerName }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- 任务 -->
|
|
|
- <template v-if="queryParameters?.key == 'tasks'">{{ item.taskName }}</template>
|
|
|
+ <template v-if="queryParameters?.key == 'tasks'">
|
|
|
+ <div>
|
|
|
+ <div class="flex items-center flex-row">
|
|
|
+ <div class="flex-1 truncate mr-8 titles relative">{{ item.taskName }}</div>
|
|
|
+ <div class="text-[#B9B9B9]">
|
|
|
+ {{ fixedFieldTaskStatus.find(subItem => subItem.value == item.status)?.label || '' }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center justify-between flex-row mt-1">
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/5 truncate">
|
|
|
+ {{ item.businessName || item.orderName || item.clueName || item.customName }}
|
|
|
+ </div>
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/5 truncate text-right">优先级:
|
|
|
+ {{ fixedFieldPriority.find(subItem => subItem.value == item.priority)?.label || '' }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- 产品 -->
|
|
|
- <template v-if="queryParameters?.key == 'product'">{{ item.productName }}</template>
|
|
|
+ <template v-if="queryParameters?.key == 'product'">
|
|
|
+ <div>
|
|
|
+ <div class="flex items-center flex-row">
|
|
|
+ <div class="flex-1 truncate mr-8 titles relative">{{ item.productName }}</div>
|
|
|
+ <div class="text-[#B9B9B9]">{{ item.status ? '上架' : '下架' }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center justify-between flex-row mt-1">
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/5 truncate">负责人:{{
|
|
|
+ item.inchargerName }}</div>
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/5 truncate text-right">库存:{{
|
|
|
+ item.unit || 0 }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- 合同 -->
|
|
|
- <template v-if="queryParameters?.key == 'contract'">{{ item.name }}</template>
|
|
|
+ <template v-if="queryParameters?.key == 'contract'">
|
|
|
+ <div>
|
|
|
+ <div class="flex items-center flex-row">
|
|
|
+ <div class="flex-1 truncate mr-8 titles relative">{{ item.name }}</div>
|
|
|
+ <div class="text-[#B9B9B9]">
|
|
|
+ <span :style="fixedFieldStatusArray[item.status].color">
|
|
|
+ {{ fixedFieldStatusArray[item.status].label }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center justify-between flex-row mt-1">
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/6 truncate">{{ item.number }}</div>
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/3 truncate text-right">
|
|
|
+ 合同金额¥{{ item.amounts }} / 回款进度 {{ item.payment ? (100 * item.payment / item.amounts).toFixed(1) + '%' : '0%' }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- 销售 -->
|
|
|
- <template v-if="queryParameters?.key == 'order'">{{ item.orderName }}</template>
|
|
|
+ <template v-if="queryParameters?.key == 'order'">
|
|
|
+ <div>
|
|
|
+ <div class="flex items-center flex-row">
|
|
|
+ <div class="flex-1 truncate mr-8 titles relative">{{ item.orderName }}</div>
|
|
|
+ <div class="text-[#B9B9B9]">{{ fixedFieldPaymentStatus.find(subItem => subItem.value == item.receivedStatus)?.label || '' }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center justify-between flex-row mt-1">
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/6 truncate">{{ item.customName }}</div>
|
|
|
+ <div class="text-[#B9B9B9] text-size-small w-2/3 truncate text-right">
|
|
|
+ 订单金额¥{{ item.price }} / 已回款¥ {{ item.receivedPayment }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
<template #right>
|
|
|
<div class="flex items-center h-full bg-white">
|
|
|
<template v-if="!item.inchargerName">
|
|
|
- <div class="buttonCircle rounded-full" @click="claimAndClaim(item)" v-if="['business', 'thread',
|
|
|
- 'customer'].includes(queryParameters?.key)">
|
|
|
+ <div class="buttonCircle rounded-full" @click="claimAndClaim(item)" v-if="['business', 'thread',
|
|
|
+ 'customer'].includes(queryParameters?.key)">
|
|
|
<img src="/src/assets/image/claimAndClaim.png" class="w-full h-full">
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-if="item.inchargerName || item.ownerName">
|
|
|
- <div class="buttonCircle rounded-full" @click="transfer(item)" v-if="['business', 'thread',
|
|
|
- 'customer', 'contacts'].includes(queryParameters?.key)">
|
|
|
+ <div class="buttonCircle rounded-full" @click="transfer(item)" v-if="['business', 'thread',
|
|
|
+ 'customer', 'contacts'].includes(queryParameters?.key)">
|
|
|
<img src="/src/assets/image/transfer.png" class="w-full h-full">
|
|
|
</div>
|
|
|
</template>
|
|
@@ -65,12 +176,16 @@
|
|
|
<img src="/src/assets/image/noTopMounted.png" class="w-full h-full">
|
|
|
</div>
|
|
|
</template>
|
|
|
- <div class="buttonCircle rounded-full" @click="edit(item)">
|
|
|
- <img src="/src/assets/image/edit.png" class="w-full h-full">
|
|
|
- </div>
|
|
|
- <div class="buttonCircle rounded-full" @click="deleteRow(item)">
|
|
|
- <img src="/src/assets/image/delete.png" class="w-full h-full">
|
|
|
- </div>
|
|
|
+ <template v-permission="[queryParameters?.jurisdiction?.edit]">
|
|
|
+ <div class="buttonCircle rounded-full" @click="edit(item)" >
|
|
|
+ <img src="/src/assets/image/edit.png" class="w-full h-full">
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-permission="[queryParameters?.jurisdiction?.delete]">
|
|
|
+ <div class="buttonCircle rounded-full" @click="deleteRow(item)" >
|
|
|
+ <img src="/src/assets/image/delete.png" class="w-full h-full">
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</template>
|
|
|
</van-swipe-cell>
|
|
@@ -86,7 +201,7 @@
|
|
|
|
|
|
<!-- 可拖拽添加 -->
|
|
|
<DragBox>
|
|
|
- <div class="addButton" @click="toAddEditor()">
|
|
|
+ <div class="addButton" @click="toAddEditor()" v-permission="[queryParameters?.jurisdiction?.newlyAdded]">
|
|
|
<img src="/src/assets/image/add.png" class="w-full h-full" />
|
|
|
</div>
|
|
|
</DragBox>
|
|
@@ -117,6 +232,7 @@ import { useLifecycle } from '@hooks/useCommon.js';
|
|
|
import { resetListData, getListFieldKey } from '@components/common/formForm/formCorrespondenceProcessing'
|
|
|
import useShowToast from '@hooks/useToast'
|
|
|
import { GET_CUSTOM_FORM_JSON } from '@hooks/useApi'
|
|
|
+import { fixedFieldPaymentStatus, fixedFieldPriority, fixedFieldTaskStatus, fixedFieldStatusArray } from "@utility/defaultData"
|
|
|
import requests from "@common/requests";
|
|
|
import useRouterStore from "@store/useRouterStore.js";
|
|
|
import useFixedData from "@store/useFixedData.js"
|
|
@@ -257,7 +373,7 @@ function noTopMounted(row) {
|
|
|
}
|
|
|
|
|
|
function toDetail(item) {
|
|
|
- if(queryParameters.value?.key == 'tasks') {
|
|
|
+ if (queryParameters.value?.key == 'tasks') {
|
|
|
return
|
|
|
}
|
|
|
router.navigateTo({
|