diff --git a/src/api/clue/extraFee.js b/src/api/clue/extraFee.js new file mode 100644 index 0000000..a66319b --- /dev/null +++ b/src/api/clue/extraFee.js @@ -0,0 +1,30 @@ +import request from '@/config/axios' + +// 获得列表 +export const getExtraFeePage = (params) => { + return request.get({ url: '/admin-api/crm/extra-pay/page', params }) +} + +// 创建 +export const createExtraFee = (data) => { + return request.post({ url: '/admin-api/crm/extra-pay/create', data, isSubmitForm: true }) +} + +// 更新 +export const updateExtraFee = (data) => { + return request.put({ url: '/admin-api/crm/extra-pay/update', data }) +} + +// 删除 +export const deleteExtraFee = (id) => { + return request.delete({ url: `/admin-api/crm/extra-pay/delete?id=${id}` }) +} + +// 获得 +export const getExtraFee = (id) => { + return request.get({ url: `/admin-api/crm/extra-pay/get?id=${id}` }) +} + +export const getExtraFeeSimpleList = async () => { + return await request.get({ url: '/admin-api/crm/extra-pay/simple-list' }) +} diff --git a/src/api/clue/index.js b/src/api/clue/index.js index 774909e..b5cf780 100644 --- a/src/api/clue/index.js +++ b/src/api/clue/index.js @@ -58,3 +58,7 @@ export const getPublicClue = async (data) => { export const getFollowUserList = async (params) => { return await request.get({ url: '/admin-api/crm/sch-clue/get-follow-user', params }) } + +export const batchUpdateFollowUser = async (data) => { + return await request.put({ url: '/admin-api/crm/sch-clue/batchUpdateFollowUser', data }) +} diff --git a/src/components/SSTable/index.vue b/src/components/SSTable/index.vue index 5440bf7..209638c 100644 --- a/src/components/SSTable/index.vue +++ b/src/components/SSTable/index.vue @@ -1,7 +1,12 @@ diff --git a/src/views/Clue/Pool/Comp/ClueMap.vue b/src/views/Clue/Pool/Comp/ClueMap.vue index e3afcc6..202f727 100644 --- a/src/views/Clue/Pool/Comp/ClueMap.vue +++ b/src/views/Clue/Pool/Comp/ClueMap.vue @@ -39,6 +39,7 @@ + + diff --git a/src/views/Clue/Pool/Comp/DialogClue.vue b/src/views/Clue/Pool/Comp/DialogClue.vue index 7132df4..95e2f81 100644 --- a/src/views/Clue/Pool/Comp/DialogClue.vue +++ b/src/views/Clue/Pool/Comp/DialogClue.vue @@ -133,6 +133,7 @@ import { useAppStore } from '@/store/modules/app' import { useUserStore } from '@/store/modules/user' import { getPlaceList } from '@/api/school/place' +import { getConfigByConfigKey } from '@/api/system/set' import * as ClueApi from '@/api/clue' import { getDiyFieldList } from '@/api/clue/clueField' import { formatDate } from '@/utils/formatTime' @@ -226,6 +227,7 @@ const defaultLatLng = ref({ lat: 31.86119, lng: 117.283042 }) +const defaultCity = ref('合肥') const info = ref({}) const diyFieldArr = ref([]) @@ -265,9 +267,14 @@ const open = async (type, id) => { } ] address.value = '' - defaultLatLng.value = { - lat: 31.86119, - lng: 117.283042 + if (appStore.getAppInfo?.instanceType == 1) { + const data = await getConfigByConfigKey({ configKey: 'defaultLocation' }) + const cityInfo = JSON.parse(data.configValue) + defaultLatLng.value = { + lat: cityInfo.lat, + lng: cityInfo.lng + } + defaultCity.value = cityInfo.locationName } nextTick(() => { formRef.value.setValues(info.value, true) @@ -396,7 +403,7 @@ function initMap(data) { }) addmark(defaultLatLng.value.lng, defaultLatLng.value.lat, AMap) AutoComplete.value = new AMap.AutoComplete({ - city: '合肥' + city: defaultCity.value }) geoCoder.value = new AMap.Geocoder() dialogMap.value.on('click', (e) => { diff --git a/src/views/Clue/Pool/Comp/DialogSuccess.vue b/src/views/Clue/Pool/Comp/DialogSuccess.vue index 80487bf..ec6c301 100644 --- a/src/views/Clue/Pool/Comp/DialogSuccess.vue +++ b/src/views/Clue/Pool/Comp/DialogSuccess.vue @@ -328,6 +328,7 @@ import { getDiyFieldList } from '@/api/clue/orderField' import { getPlaceList } from '@/api/school/place' import { getClassTypeList } from '@/api/school/class' import { getSimpleProductList } from '@/api/mall/product' +import { getConfigByConfigKey } from '@/api/system/set' // import { getSimpleWarehouseList } from '@/api/mall/warehouse' import { formatDate } from '@/utils/formatTime' @@ -415,7 +416,8 @@ async function open(id) { } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 -function resetForm(id) { +async function resetForm(id) { + const data = await getConfigByConfigKey({ configKey: 'companyCollectionConfig' }) form.value = { clueId: id, dealDate: formatDate(new Date()), @@ -423,7 +425,7 @@ function resetForm(id) { signPrice: 0, payAmount: 0, remark: undefined, - isCompanyReceipts: appStore.getAppInfo?.instanceType == 2, + isCompanyReceipts: data.configValue == 'true', receiver: undefined, extraPay: [], signProducts: [] diff --git a/src/views/Clue/Pool/index.vue b/src/views/Clue/Pool/index.vue index daa0c20..c15172c 100644 --- a/src/views/Clue/Pool/index.vue +++ b/src/views/Clue/Pool/index.vue @@ -53,6 +53,12 @@ @@ -63,7 +69,9 @@ :tableColumns="allSchemas.tableColumns" @get-list="getTableList" @get-checked-columns="getCheckedColumns" + @selection-change="handleSelectionChange" > + + @@ -189,6 +202,7 @@ import DrawerClue from './Comp/DrawerClue.vue' import DialogSuccess from './Comp/DialogSuccess.vue' import DialogFollow from './Comp/DialogFollow.vue' import ClueMap from './Comp/ClueMap.vue' +import DialogBatchChangeFollow from './Comp/DialogBatchChangeFollow.vue' import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user' import { removeNullField } from '@/utils' @@ -216,7 +230,7 @@ async function getCurdSchemas() { try { const data = await getSimpleFieldList() data.forEach((elem) => { - if (elem.field == 'followUser' || elem.field == 'convertPeople') { + if (['followUser', 'convertPeople', 'firstFollowUser'].includes(elem.field)) { elem.search.options = userOptions.value } }) @@ -295,6 +309,20 @@ function getSearchCount() { }) } +const batchIds = ref([]) +function handleSelectionChange(val) { + batchIds.value = val.map((it) => it.clueId) +} + +const batchChangeFollowDialog = ref() +function handleBatchChangeFollow() { + if (batchIds.value.length) { + batchChangeFollowDialog.value.open(batchIds.value) + } else { + message.info('请选择表格中的数据!') + } +} + // 新增 function handleInsert() { formRef.value.open('create', null) diff --git a/src/views/Clue/Set/Comp/DialogExtraFee.vue b/src/views/Clue/Set/Comp/DialogExtraFee.vue index 5f12aa6..ceccec9 100644 --- a/src/views/Clue/Set/Comp/DialogExtraFee.vue +++ b/src/views/Clue/Set/Comp/DialogExtraFee.vue @@ -5,10 +5,16 @@ v-loading="formLoading" :model="formData" :rules="formRules" - label-width="80px" + label-width="auto" > - - + + + + + + + + @@ -29,7 +35,8 @@