Quellcode durchsuchen

Merge branch 'test' of http://39.101.143.165:8090/dong_k/operation-Backend into test

祁鹏飞 vor 1 Monat
Ursprung
Commit
77b7ff6683
2 geänderte Dateien mit 125 neuen und 78 gelöschten Zeilen
  1. 3 3
      .env.development
  2. 122 75
      src/views/organizationManagement/functionConfiguration.vue

+ 3 - 3
.env.development

@@ -4,8 +4,8 @@ VITE_APP_SETTING = true
 VITE_APP_TITLE = 掌柜运营平台
 # 接口请求地址,会设置到 axios 的 baseURL 参数上
 # VITE_APP_API_BASEURL = http://192.168.0.55:8001  #董鑫
-# VITE_APP_API_BASEURL = http://192.168.5.249:8001  #田智
-VITE_APP_API_BASEURL = https://platform.baoxianzhanggui.com/api  #屈晨
+VITE_APP_API_BASEURL = http://192.168.5.40:8001  #田智
+# VITE_APP_API_BASEURL = https://platform.baoxianzhanggui.com/api  #屈晨
 # VITE_APP_API_BASEURL = http://192.168.5.14:8001  #徐强
 
 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
@@ -16,5 +16,5 @@ VITE_APP_DISABLE_DEVTOOL = false
 # 是否开启代理
 VITE_OPEN_PROXY = false
 # 是否开启开发者工具
-VITE_OPEN_DEVTOOLS = false
+VITE_OPEN_DEVTOOLS = true
 

+ 122 - 75
src/views/organizationManagement/functionConfiguration.vue

@@ -6,13 +6,14 @@
         <el-col :span="5" class="h-full">
           <el-input v-model="filterText" prefix-icon="search"></el-input>
           <div class="company overflow-auto">
-            <div class="companyItem" :class="{'active': filterIndex === index}" v-for="(item, index) in filterChange" @click="handleClick(item, index)">
+            <div class="companyItem" :class="{ 'active': filterIndex === index }" v-for="(item, index) in filterChange"
+              @click="handleClick(item, index)">
               {{ item?.sysName }}
             </div>
           </div>
         </el-col>
         <el-divider direction="vertical" class="h-full"></el-divider>
-        <el-col :span="18" class="h-full overflow-auto" >
+        <el-col :span="18" class="h-full overflow-auto">
           <el-row :gutter="20">
             <el-col :span="20">
               <h4>租户功能配置</h4>
@@ -25,7 +26,8 @@
           <el-divider style="width: 100%;"></el-divider>
           <el-descriptions title="系统信息配置">
             <el-descriptions-item>
-              <el-form :model="functionForm" :rules="functionRules" ref="functionRef" label-width="200" label-position="left">
+              <el-form :model="functionForm" :rules="functionRules" ref="functionRef" label-width="200"
+                label-position="left">
                 <el-form-item label="支持报价的保司" prop="quoteCompany">
                   <el-radio-group style="width: 100%;" v-model="functionForm.quoteCompany">
                     <el-row :gutter="20">
@@ -34,14 +36,21 @@
                       </el-col>
                       <el-col :span="24" style="display: flex; align-items: center;">
                         <el-radio :value="2">部分保险公司</el-radio>
-                        <el-button v-if="functionForm.quoteCompany == 2" link type="primary" @click="select" icon="CirclePlus">选择保险公司</el-button>
+                        <el-button v-if="functionForm.quoteCompany == 2" link type="primary" @click="select"
+                          icon="CirclePlus">选择保险公司</el-button>
                       </el-col>
                     </el-row>
                   </el-radio-group>
-                  <div v-if="functionForm.quoteCompany == 2" style="display: flex; flex-wrap: wrap; justify-content: flex-start;">
-                    <div style="display: flex; align-items: center; width: 240px; padding: 3px 16px; margin-top: 10px; margin-right: 10px; color: #0083ff; background: #e9f4ff; border-radius: 3px;" v-for="(item, index) in companySelected">
+                  <div v-if="functionForm.quoteCompany == 2"
+                    style="display: flex; flex-wrap: wrap; justify-content: flex-start;">
+                    <div
+                      style="display: flex; align-items: center; width: 240px; padding: 3px 16px; margin-top: 10px; margin-right: 10px; color: #0083ff; background: #e9f4ff; border-radius: 3px;"
+                      v-for="(item, index) in companySelected">
                       <span>{{ item?.nameSimple }}</span>
-                    <el-icon style=" margin-left: 20px;cursor: pointer;" @click="handleDelete(item, index)"><Close /></el-icon></div>
+                      <el-icon style=" margin-left: 20px;cursor: pointer;" @click="handleDelete(item, index)">
+                        <Close />
+                      </el-icon>
+                    </div>
                   </div>
                 </el-form-item>
                 <el-form-item label="报价/出单方式" prop="orderMode">
@@ -82,9 +91,10 @@
                       </el-col>
                     </el-row>
                   </el-radio-group>
-<!--                  <el-cascader v-if="functionForm.orderAuditDept == 3" v-model="functionForm.orderAuditDeptList" :props="optionProps"></el-cascader>-->
+                  <!--                  <el-cascader v-if="functionForm.orderAuditDept == 3" v-model="functionForm.orderAuditDeptList" :props="optionProps"></el-cascader>-->
                   <div>
-                    <el-select style="width: 200px;" v-if="functionForm.orderAuditDept == 3" v-model="functionForm.orderAuditDeptList">
+                    <el-select style="width: 200px;" v-if="functionForm.orderAuditDept == 3"
+                      v-model="functionForm.orderAuditDeptList">
                       <el-option v-for="item in institutionList" :value="item.id" :label="item.name"></el-option>
                     </el-select>
                   </div>
@@ -100,8 +110,9 @@
                       </el-col>
                     </el-row>
                   </el-radio-group>
-<!--                  <el-cascader v-if="functionForm.salesmanAuditDept == 2" v-model="functionForm.salesmanAuditDeptList" :props="optionProps"></el-cascader>-->
-                  <el-select style="width: 200px;" v-if="functionForm.salesmanAuditDept == 2" v-model="functionForm.salesmanAuditDeptList">
+                  <!--                  <el-cascader v-if="functionForm.salesmanAuditDept == 2" v-model="functionForm.salesmanAuditDeptList" :props="optionProps"></el-cascader>-->
+                  <el-select style="width: 200px;" v-if="functionForm.salesmanAuditDept == 2"
+                    v-model="functionForm.salesmanAuditDeptList">
                     <el-option v-for="item in institutionList" :value="item.id" :label="item.name"></el-option>
                   </el-select>
                 </el-form-item>
@@ -116,8 +127,9 @@
                       </el-col>
                     </el-row>
                   </el-radio-group>
-<!--                  <el-cascader v-if="functionForm.salesmanWithdrawAccountAuditDept == 2" v-model="functionForm.salesmanWithdrawAccountAuditDeptList" :props="optionProps"></el-cascader>-->
-                  <el-select style="width: 200px;" v-if="functionForm.salesmanWithdrawAccountAuditDept == 2" v-model="functionForm.salesmanWithdrawAccountAuditDeptList">
+                  <!--                  <el-cascader v-if="functionForm.salesmanWithdrawAccountAuditDept == 2" v-model="functionForm.salesmanWithdrawAccountAuditDeptList" :props="optionProps"></el-cascader>-->
+                  <el-select style="width: 200px;" v-if="functionForm.salesmanWithdrawAccountAuditDept == 2"
+                    v-model="functionForm.salesmanWithdrawAccountAuditDeptList">
                     <el-option v-for="item in institutionList" :value="item.id" :label="item.name"></el-option>
                   </el-select>
                 </el-form-item>
@@ -132,8 +144,9 @@
                       </el-col>
                     </el-row>
                   </el-radio-group>
-<!--                  <el-cascader v-if="functionForm.salesmanWithdrawPaymentAuditDept == 2" v-model="functionForm.salesmanWithdrawPaymentAuditDeptList" :props="optionProps"></el-cascader>-->
-                  <el-select style="width: 200px;" v-if="functionForm.salesmanWithdrawPaymentAuditDept == 2" v-model="functionForm.salesmanWithdrawPaymentAuditDeptList">
+                  <!--                  <el-cascader v-if="functionForm.salesmanWithdrawPaymentAuditDept == 2" v-model="functionForm.salesmanWithdrawPaymentAuditDeptList" :props="optionProps"></el-cascader>-->
+                  <el-select style="width: 200px;" v-if="functionForm.salesmanWithdrawPaymentAuditDept == 2"
+                    v-model="functionForm.salesmanWithdrawPaymentAuditDeptList">
                     <el-option v-for="item in institutionList" :value="item.id" :label="item.name"></el-option>
                   </el-select>
                 </el-form-item>
@@ -143,11 +156,37 @@
                       <el-col :span="24">
                         <el-radio :value="1">开启</el-radio>
                       </el-col>
-                       <el-col :span="24">
+                      <el-col :span="24">
+                        <el-radio :value="0">关闭</el-radio>
+                      </el-col>
+                    </el-row>
+                  </el-radio-group>
+                </el-form-item>
+                <el-form-item label="车主权益" prop="ownerRights">
+                  <el-radio-group style="width: 100%;" v-model="functionForm.ownerRights">
+                    <el-row :gutter="20">
+                      <el-col :span="24">
                         <el-radio :value="0">关闭</el-radio>
                       </el-col>
+                      <el-col :span="24">
+                        <el-radio :value="1" style="color: #333;">开启
+                          <span style="color: #666;">(开启后出单时,可将佣金部分选择为车主权益赠送)</span>
+                        </el-radio>
+                      </el-col>
                     </el-row>
                   </el-radio-group>
+                  <div v-if="functionForm.ownerRights == 1">
+                    <el-checkbox-group v-model="functionForm.clientTypeList" direction="vertical">
+                      <el-row :gutter="20">
+                        <el-col :span="24">
+                          <el-checkbox label="PC端可用" value="1" />
+                        </el-col>
+                        <el-col :span="24">
+                          <el-checkbox label="APP端可用" value="2" />
+                        </el-col>
+                      </el-row>
+                    </el-checkbox-group>
+                  </div>
                 </el-form-item>
               </el-form>
             </el-descriptions-item>
@@ -159,11 +198,7 @@
       <el-button plain type="primary" @click="handleCancel">取消</el-button>
       <el-button type="primary" @click="handleComfirm">保存</el-button>
     </div>
-    <el-dialog
-      v-model="companyShow"
-      title="选择保险公司"
-      width="600"
-    >
+    <el-dialog v-model="companyShow" title="选择保险公司" width="600">
       <companys ref="companyRef" @close="handleClose"></companys>
     </el-dialog>
   </div>
@@ -187,9 +222,9 @@ let filterIndex = ref(0)
 let companyId = ref('')
 let sysCode = ref('')
 const filterChange = computed(() => {
-  return company.value.filter((a:any) => a.sysCode.includes(filterText.value))
+  return company.value.filter((a: any) => a.sysCode.includes(filterText.value))
 })
-const handleClick = (item:any, index:any) => {
+const handleClick = (item: any, index: any) => {
   filterIndex.value = index
   companyId.value = item.id
   sysCode.value = item.sysCode
@@ -200,8 +235,8 @@ const handleClick = (item:any, index:any) => {
 const initCompany = () => {
   api.configurate.sysList({
     size: 200
-  }).then((res:any) => {
-    if(res.code == 200) {
+  }).then((res: any) => {
+    if (res.code == 200) {
       company.value = res.data.records
       sysCode.value = res.data.records[0].sysCode
       initInstitution(sysCode.value)
@@ -213,23 +248,23 @@ const initCompany = () => {
 
 let newCompany = ref([])
 const initNewCompany = () => {
-    api.configurate.gainTopList().then((res: any) => {
-        if (res.code == 200) {
-            newCompany.value = res.data
-        } else {
-            ElMessage({
-                message: res.msg,
-                type: 'warning'
-            })
-        }
-    })
+  api.configurate.gainTopList().then((res: any) => {
+    if (res.code == 200) {
+      newCompany.value = res.data
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
 }
 
 // 机构
 let institutionList = ref([])
 const initInstitution = (val) => {
   api.configurate.getDeptListBySystemCode(val).then(res => {
-    if(res.code == 200) {
+    if (res.code == 200) {
       institutionList.value = res.data
     } else {
       ElMessage.error(res.msg)
@@ -245,22 +280,21 @@ const handleEdit = () => {
     // // companyId: companyId.value?companyId.value:filterChange.value[0].id
     // }
   ).then(res => {
-    if(res.code == 200) {
+    if (res.code == 200) {
       functionForm.value = res.data
       functionForm.value.orderAuditDeptList = functionForm.value.orderAuditDeptList[0]
       functionForm.value.salesmanAuditDeptList = functionForm.value.salesmanAuditDeptList[0]
       functionForm.value.salesmanWithdrawAccountAuditDeptList = functionForm.value.salesmanWithdrawAccountAuditDeptList[0]
       functionForm.value.salesmanWithdrawPaymentAuditDeptList = functionForm.value.salesmanWithdrawPaymentAuditDeptList[0]
-      if(functionForm.value.quoteCompanyList.length > 0) {
+      if (functionForm.value.quoteCompanyList.length > 0) {
         companySelected.value = newCompany.value.filter(a => functionForm.value.quoteCompanyList.find(b => b === a.id))
-          console.log(123, companySelected.value)
+        console.log(123, companySelected.value)
       }
     } else {
       ElMessage.error(res.msg)
     }
   })
 }
-
 // form表单
 let functionForm = ref({
   companyId: '',
@@ -268,7 +302,7 @@ let functionForm = ref({
   quoteCompany: null,
   quoteCompanyList: [],
   orderMode: null,
-  wechatCustomerService:null,
+  wechatCustomerService: null,
   orderAuditDept: null,
   orderAuditDeptList: '',
   salesmanAuditDept: null,
@@ -277,11 +311,14 @@ let functionForm = ref({
   salesmanWithdrawAccountAuditDeptList: '',
   salesmanWithdrawPaymentAuditDept: null,
   salesmanWithdrawPaymentAuditDeptList: '',
-  accountLinking: 0
+  accountLinking: 0,
+  ownerRights: null,//是否开启权益
+  clientType: null,
+  clientTypeList: []//客户端类型
 })
 const functionRules = {
   a: [
-    {  }
+    {}
   ]
 }
 const optionProps = {
@@ -304,7 +341,7 @@ const handleDelete = (item, index) => {
 }
 const handleClose = (data) => {
   companyShow.value = false
-  if(data && data.length > 0) {
+  if (data && data.length > 0) {
     companySelected.value = JSON.parse(JSON.stringify(data))
   }
 }
@@ -330,22 +367,32 @@ const handleCancel = () => {
 
 // 保存
 const handleComfirm = () => {
-  let formData = {...functionForm.value}
-  formData.companyId = companyId.value?companyId.value:filterChange.value[0].id
+  let formData = { ...functionForm.value }
+  formData.companyId = companyId.value ? companyId.value : filterChange.value[0].id
   formData.systemCode = sysCode.value
-  if(companySelected.value.length > 0) {
+  if (companySelected.value.length > 0) {
     formData.quoteCompanyList = companySelected.value.map(a => {
       return a.id
     })
   } else {
     formData.quoteCompanyList = []
   }
-  formData.orderAuditDeptList = formData.orderAuditDeptList?[formData.orderAuditDeptList]:[]
-  formData.salesmanAuditDeptList = formData.salesmanAuditDeptList?[formData.salesmanAuditDeptList]:[]
-  formData.salesmanWithdrawAccountAuditDeptList = formData.salesmanWithdrawAccountAuditDeptList?[formData.salesmanWithdrawAccountAuditDeptList]:[]
-  formData.salesmanWithdrawPaymentAuditDeptList = formData.salesmanWithdrawPaymentAuditDeptList?[formData.salesmanWithdrawPaymentAuditDeptList]:[]
-  api.configurate.saveBusPerms({...formData}).then(res => {
-    if(res.code == 200) {
+  formData.orderAuditDeptList = formData.orderAuditDeptList ? [formData.orderAuditDeptList] : []
+  formData.salesmanAuditDeptList = formData.salesmanAuditDeptList ? [formData.salesmanAuditDeptList] : []
+  formData.salesmanWithdrawAccountAuditDeptList = formData.salesmanWithdrawAccountAuditDeptList ? [formData.salesmanWithdrawAccountAuditDeptList] : []
+  formData.salesmanWithdrawPaymentAuditDeptList = formData.salesmanWithdrawPaymentAuditDeptList ? [formData.salesmanWithdrawPaymentAuditDeptList] : []
+  const clientTypeList = formData.clientTypeList || []
+  if (clientTypeList.includes(1) && clientTypeList.includes(2)) {
+    formData.clientType = 3 // PC和APP都选中
+  } else if (clientTypeList.includes(1)) {
+    formData.clientType = 1 // 只选中PC
+  } else if (clientTypeList.includes(2)) {
+    formData.clientType = 2 // 只选中APP
+  } else {
+    formData.clientType = 0 // 都没选中
+  }
+  api.configurate.saveBusPerms({ ...formData }).then(res => {
+    if (res.code == 200) {
       ElMessage.success(res.msg)
     } else {
       ElMessage.error(res.msg)
@@ -361,34 +408,34 @@ onMounted(() => {
 </script>
 <!-- 样式区域 -->
 <style scoped lang="scss">
-  .company {
-    height: calc(100% - 60px);
+.company {
+  height: calc(100% - 60px);
 
-    .companyItem {
-      width: 100%;
-      padding: 10px 15px;
-      margin: 10px 0;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-      cursor: pointer;
+  .companyItem {
+    width: 100%;
+    padding: 10px 15px;
+    margin: 10px 0;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor: pointer;
 
-      &:hover {
-        background: #f4faff;
-        border-radius: 3px 0 0 3px;
-      }
-    }
-
-    .active {
+    &:hover {
       background: #f4faff;
-      border-right: 1px solid #0083ff;
       border-radius: 3px 0 0 3px;
     }
   }
 
-  .footer {
-    display: flex;
-    align-items: center;
-    justify-content: center;
+  .active {
+    background: #f4faff;
+    border-right: 1px solid #0083ff;
+    border-radius: 3px 0 0 3px;
   }
+}
+
+.footer {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 </style>