Explorar el Código

网点管理修改

master
yangpeilai hace 3 semanas
padre
commit
f4f9831689
Se han modificado 2 ficheros con 53 adiciones y 31 borrados
  1. 36
    15
      src/utils/baseService.ts
  2. 17
    16
      src/views/system/branch/index.vue

+ 36
- 15
src/utils/baseService.ts Ver fichero

@@ -124,22 +124,43 @@ export default {
urls = '/ndev'
}
//hasPathInArray(paths, url) ? : url /newDev
return httpN({
url: urls + url,
method: 'post',
timeout: 60000,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
...headers,
},
data: encryptionN(
{
...body,
// 连本地用的
// if(url.startsWith('/userw')){
// console.log('===>userw本地')
// return httpN({
// url: 'http://localhost:9083' + url,
// method: 'post',
// timeout: 60000,
// headers: {
// 'Content-Type': 'application/json;charset=UTF-8',
// ...headers,
// },
// data: encryptionN(
// {
// ...body,
// },
// 2,
// hasPathInArray(paths, url)
// ),
// })
// }else{
return httpN({
url: urls + url,
method: 'post',
timeout: 60000,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
...headers,
},
2,
hasPathInArray(paths, url)
),
})
data: encryptionN(
{
...body,
},
2,
hasPathInArray(paths, url)
),
})
// }
},
get(
url: string | number,

+ 17
- 16
src/views/system/branch/index.vue Ver fichero

@@ -10,8 +10,6 @@
placeholder="请输入网点编号" />
<el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px"
placeholder="请输入渠道编号" />
<el-input maxlength="60" v-trim clearable v-model="searchForm.agencyName" style="width: 200px"
placeholder="请输入机构" />
</template>
<template #CustomButton>
<!-- <el-button v-if="IsPermission(route, 'ADD_FIRST_DOT')" type="primary" @click="handleFirstDot" icon="Plus">
@@ -39,8 +37,8 @@
<el-button v-if="IsPermission(route, 'EDIT_LIST')" type="primary" @click="handleFileName()" size="small">
下载模板
</el-button>
<el-button v-if="IsPermission(route, 'DEL_LIST')" type="danger" @click="handleDetele(scope.row)" size="small">
删除
<el-button v-if="IsPermission(route, 'DEL_LIST')" :type="scope.row.state==='ENABLE'?'danger':'success'" @click="handleDetele(scope.row)" size="small">
{{ scope.row.state === 'ENABLE' ? '禁用' : '启用' }}
</el-button>
</template>
<template #dialog>
@@ -72,7 +70,7 @@
<div style="width: 100%">
<el-select clearable filterable v-model="addForm.mapChannelId" style="width: 100%"
@change="centerServiceHallIdChange" placeholder="请选择中心网点编号">
<el-option v-for="item in centerServiceHallIdList" :key="item.value" :label="item.centerServicehallName"
<el-option v-for="item in centerServiceHallIdList" :key="item.centerServiceHallId" :label="item.centerServicehallName"
:value="item.centerServiceHallId" />
</el-select>
</div>
@@ -133,7 +131,7 @@
</el-button>
<div style="padding: 20px 50px;text-align: left;font-weight: 700;" v-if="addForm.locationModels.length > 0">
办理点信息</div>
<el-form v-for="(item, index) in addForm.locationModels" :key="index" label-width="150" :rules="rules">
<el-form v-for="(item, index) in addForm.locationModels" :key="index" label-width="150" :rules="rules" :model="item">
<el-form-item label="名称:" prop="name">
<div style="width: 100%">
<el-input maxlength="60" v-trim clearable v-model="item.name" placeholder="请输入办理点名称" />
@@ -398,7 +396,7 @@ function handleAvatarSuccess(response: any, row) {
if (errUrl) {
ElMessage.error("导入失败,请查看下载到本地文件的具体错误信息");
BaseService.getDownload(
import.meta.env.VITE_APP_UPLOAD_URL + errUrl,
import.meta.env.VITE_APP_EXPORT_URL_NEW + errUrl,
'错误信息文件'
)
} else {
@@ -497,8 +495,8 @@ let field = ref({
isTemplate: true,

templateUrl:
import.meta.env.VITE_APP_UPLOAD_URL +
'zhywpt-issuer/template/门户管理-网点管理/网点信息导入模板.xlsx',
import.meta.env.VITE_APP_EXPORT_URL_NEW +
'zhywpt-issuer/template/userw/网点信息导入模板.xlsx',
templateFileName: '网点信息导入模板',
},
tableSize: -1,
@@ -593,7 +591,10 @@ function handleFirstDot() {
}
//添加一级网点切换所属渠道
const agencyIdChange = (value) => {
console.log(value, 'eeee');
if(value===''||value===null||value===undefined){
ElMessage.error("渠道不能为空!")
return;
}
agencyIdC.value = value
addForm.value.agencyId = value
getServiceHallId(value)
@@ -630,7 +631,7 @@ function importData(url) {
if (errUrl) {
ElMessage.error("导入失败,请查看下载到本地文件的具体错误信息");
BaseService.getDownload(
import.meta.env.VITE_APP_UPLOAD_URL + errUrl,
import.meta.env.VITE_APP_EXPORT_URL_NEW + errUrl,
'错误信息文件'
)
} else {
@@ -792,7 +793,7 @@ function handleImport(row) {
//模板下载
function handleFileName() {
BaseService.getDownload(
import.meta.env.VITE_APP_UPLOAD_URL + 'zhywpt-issuer/template/门户管理-网点管理/办理地址信息导入模板.xlsx',
import.meta.env.VITE_APP_EXPORT_URL_NEW + 'zhywpt-issuer/template/userw/办理地址信息导入模板.xlsx',
'办理地址信息导入模板'
)
}
@@ -830,27 +831,27 @@ function handleEdit(row: IObject) {
crudRef.value.dialogFormVisible = true
}
// 删除
function handleDetele(row: IObject) {
function handleDetele(row: IObject) {
if (row.superServiceHallId) {
isFirstDot.value = false
} else {
isFirstDot.value = true
}
ElMessageBox.confirm('确定要删除么?', '', {
ElMessageBox.confirm('确定要操作么?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
})
.then(() => {
BaseService.postN('/userw/serviceHall/serviceHallDelete', {
superServiceHallId: row.superServiceHallId,
status: row.state==='ENABLE'?'DISABLE':'ENABLE',
serviceHallId: row.serviceHallId,
orderSource: 'WEB',
id: row.id,
}).then((res: any) => {
if (res && res.code === 0) {
getList()
ElMessage.success('删除成功')
ElMessage.success(row.state==='ENABLE'?'禁用成功':'启用成功')
} else {
ElMessage.error(res.message)
}

Cargando…
Cancelar
Guardar