Ver código fonte

办理点

master
wangxyi 1 dia atrás
pai
commit
e8d4ff66d3
1 arquivos alterados com 17 adições e 8 exclusões
  1. 17
    8
      src/views/system/branch/index.vue

+ 17
- 8
src/views/system/branch/index.vue Ver arquivo

@@ -375,6 +375,8 @@ const handlePointEditTitle = ref('新增办理点')
const handlePointTableLoading = ref(false)
const handlePointFormRef = ref()
const currentServiceHallId = ref('') // 当前选中的网点ID
const currentServiceHallName = ref('') // 当前选中的网点名称
const currentAgencyId = ref('') // 当前选中的渠道编号

// 办理点搜索表单
const handlePointSearchForm = ref({
@@ -1230,9 +1232,10 @@ function cancel() {
// 打开办理点管理弹框
function handleManagePoints(row) {
currentServiceHallId.value = row.serviceHallId
currentServiceHallName.value = row.name
currentAgencyId.value = row.agencyId
handlePointDialogVisible.value = true
resetHandlePointSearch()
getHandlePointList()
}

// 获取办理点列表
@@ -1247,12 +1250,12 @@ function getHandlePointList() {
BaseService.postN('/userw/serviceHall/locationPage', params).then((res: any) => {
if (res && res.code === 0) {
let data = res.data || []
let data = res.data?.result || []
data.forEach(item => {
item.type = item.type.toString()
})
handlePointTableData.value = data
handlePointPagination.value.total = res.totalCount || 0
handlePointPagination.value.total = res.data?.totalCount || 0
} else {
ElMessage.error(res.message)
}
@@ -1310,9 +1313,8 @@ function deleteHandlePoint(row, index) {
type: 'warning'
}).then(() => {
// 这里调用删除接口
BaseService.postN('/userw/serviceHall/deleteLocation', {
id: row.id,
serviceHallId: currentServiceHallId.value
BaseService.postN('/userw/serviceHall/locationDelete', {
id: row.id
}).then((res: any) => {
if (res && res.code === 0) {
ElMessage.success('删除成功')
@@ -1333,13 +1335,20 @@ function saveHandlePoint() {
let params = {
...handlePointForm.value,
serviceHallId: currentServiceHallId.value,
servicehallId: currentServiceHallId.value,
servicehallName: currentServiceHallName.value,
agencyId: currentAgencyId.value,
longitude: Number(handlePointForm.value.longitude),
latitude: Number(handlePointForm.value.latitude),
radial: Number(handlePointForm.value.radial)
}
let api = isHandlePointEdit.value ? '/userw/serviceHall/updateLocation' : '/userw/serviceHall/addLocation'
// 编辑时需要添加id参数
if (isHandlePointEdit.value && (handlePointForm.value as any).id) {
(params as any).id = (handlePointForm.value as any).id
}
let api = '/userw/serviceHall/locationAdd'
BaseService.postN(api, params).then((res: any) => {
if (res && res.code === 0) {

Carregando…
Cancelar
Salvar