Browse Source

接口修改

@dongkboy 1 year ago
parent
commit
13d0679a9d

+ 6 - 8
src/api/modules/dept.ts

@@ -3,21 +3,19 @@ import { ApiInstance } from '../type'
 
 const dept = (axiosInstance: ApiInstance) => ({
   //机构新增接口
-  deptAdd: (data: any) => axiosInstance.post('dept/add', data),
+  deptAdd: (data: any) => axiosInstance.post('sysDept/add', data),
   //机构删除
-  deptDelete: (data: any) => axiosInstance.post('dept/delete', data),
+  deptDelete: (data: any) => axiosInstance.post('sysDept/delete', data),
   //机构修改
-  deptUpdate: (data: any) => axiosInstance.post('dept/update', data),
-  //批量设置机构负责人
-  deptBatchLeader: (data: any) => axiosInstance.post('dept/batchLeader', data),
+  deptUpdate: (data: any) => axiosInstance.post('sysDept/update', data),
   //机构批量删除
-  deptBatchDeleteDept: (data: any) => axiosInstance.post('dept/batchDeleteDept', data),
+  deptBatchDeleteDept: (data: any) => axiosInstance.post('sysDept/batchDeleteDept', data),
   //机构树形查询
-  getDeptTree: (data?: any) => axiosInstance.post('dept/getDeptTreePlatform', data),
+  getDeptTree: (data?: any) => axiosInstance.post('sysDept/getDeptTree', data),
   //机构区划查询
   queryTree: () => axiosInstance.post('area/queryTree'),
   // 机构信息查询
-  deptGet: (data: any) => axiosInstance.get(`dept/deptGetPlatform?id=${data}`),
+  deptGet: (data: any) => axiosInstance.get(`sysDept/deptGet?id=${data}`),
 
 })
 

+ 5 - 5
src/api/modules/insuranceCompany.ts

@@ -3,15 +3,15 @@ import * as Types from '../types/insuranceCompanyTypes';
 const company = (axiosInstance: ApiInstance) => ({
 
   //获取保险公司数结构
-  findTree: (data: Types.companyTreeRequest) => axiosInstance.post('/esmInsCompany/findTree', data),
+  findTree: (data: Types.companyTreeRequest) => axiosInstance.post('esmInsCompany/findTree', data),
   //添加保险公司
-  saveInsCompany: (data: Types.info) => axiosInstance.post('/esmInsCompany/saveInsCompany', data),
+  saveInsCompany: (data: Types.info) => axiosInstance.post('esmInsCompany/saveInsCompany', data),
   // 修改
-  editInsCompany: (data: Types.info) => axiosInstance.post('/esmInsCompany/editInsCompany', data),
+  editInsCompany: (data: Types.info) => axiosInstance.post('esmInsCompany/editInsCompany', data),
   // 删除
-  CompanyDel: (id: String) => axiosInstance.get(`/esmInsCompany/${id}`),
+  CompanyDel: (id: String) => axiosInstance.get(`esmInsCompany/${id}`),
   //查询一级列表
-  selectLevelList: (data: Types.companyTreeRequest) => axiosInstance.post('/esmInsCompany/selectLevelList', data),
+  selectLevelList: (data: Types.companyTreeRequest) => axiosInstance.post('esmInsCompany/selectLevelList', data),
 
 })
 

+ 8 - 0
src/router/modules/insuranceCompany.ts

@@ -28,6 +28,14 @@ const routes: RouteRecordRaw = {
         title: '支付码配置',
       },
     },
+    {
+      path: 'accountOwnershipConfig',
+      name: 'AccountOwnershipConfigIndex',
+      component: () => import('@/views/insuranceCompanyConfiguration/accountOwnershipConfig.vue'),
+      meta: {
+        title: '账号归属配置',
+      },
+    },
   ],
 }
 

+ 46 - 4
src/views/productConfiguration/drivingInsurance/drivingInsuranceAdd.vue

@@ -9,8 +9,8 @@
           ref="productFormRef" style="max-width: 1000px;" class="flex a-c f-wrap" :size="fromSize">
           <ElCol :md="24" :lg="12">
             <el-form-item label="产品类型" prop="productType">
-              <el-select v-model="productform.productType" :disabled="productType == '2' || type=='edit'" @change="productTypeChange"
-                placeholder="请选择产品类型" clearable filterable>
+              <el-select v-model="productform.productType" :disabled="productType == '2' || type == 'edit'"
+                @change="productTypeChange" placeholder="请选择产品类型" clearable filterable>
                 <el-option label="主险" value="1" />
                 <el-option label="附加险" value="2" />
               </el-select>
@@ -18,7 +18,8 @@
           </ElCol>
           <ElCol :md="24" :lg="12" v-if="productform.productType != '1'">
             <el-form-item label="上级产品" prop="parentId">
-              <el-select v-model="productform.parentId" :disabled="productType == '2' || type=='edit'" placeholder="请选择产品" clearable>
+              <el-select v-model="productform.parentId" :disabled="productType == '2' || type == 'edit'"
+                placeholder="请选择产品" clearable>
                 <el-option v-for="(item, index) in parentList" :key="index" :label="item.productName"
                   :value="item.id" />
               </el-select>
@@ -162,7 +163,7 @@
       <ElButton type="primary" @click="submitForm(productFormRef)">
         保存
       </ElButton>
-      <ElButton type="primary" @click="submitForm(productFormRef)">
+      <ElButton type="primary" @click="submitForm1(productFormRef)">
         保存并继续添加
       </ElButton>
     </FixedActionBar>
@@ -434,6 +435,47 @@ const submitForm = async (formEl: FormInstance | undefined) => {
     }
   })
 }
+const submitForm1 = async (formEl: FormInstance | undefined) => {
+  if (!formEl) return
+  await formEl.validate((valid) => {
+    if (valid) {
+      if (id.value && type.value == 'edit') {
+        api.product.jyxupdateById(productform).then((res: any) => {
+          if (res.code == 200) {
+            ElMessage({
+              type: 'success',
+              message: res.msg,
+              plain: true,
+            })
+            router.push({
+              name: 'reload',
+            })
+          }
+        })
+      } else {
+        api.product.jyxConfigAdd(productform).then((res: any) => {
+          if (res.code == 200) {
+            ElMessage({
+              type: 'success',
+              message: res.msg,
+              plain: true,
+            })
+            router.push({
+              name: 'reload',
+            })
+          }
+        })
+      }
+    } else {
+      ElMessage({
+        type: 'error',
+        message: '信息不完整',
+        plain: true,
+      })
+    }
+  })
+}
+
 const blamesbimit = async (formEl: FormInstance | undefined) => {
   if (!formEl) return
   await formEl.validate((valid) => {