Browse Source

更新 代理公司列表

王智慧 3 years ago
parent
commit
589cd466bb
1 changed files with 90 additions and 18 deletions
  1. 90 18
      src/views/agencyManage/agencyCompanyList.vue

+ 90 - 18
src/views/agencyManage/agencyCompanyList.vue

@@ -2,6 +2,36 @@
   <div class="full-container-p24">
     <div style="display: flex; justify-content: space-between">
       <div style="display: flex">
+        <div class="df aic">
+          <div
+            @click="changeListType(1)"
+            :class="
+              type == 1
+                ? 'currentbtn radio-btns left-radius'
+                : 'radio-btns left-radius'
+            "
+          >
+            已绑定
+          </div>
+          <div
+            style="border-left: none"
+            @click="changeListType(2)"
+            :class="type == 2 ? 'currentbtn radio-btns' : 'radio-btns'"
+          >
+            待审核
+          </div>
+          <div
+            @click="changeListType(3)"
+            :class="
+              type == 3
+                ? 'currentbtn radio-btns right-radius'
+                : 'radio-btns right-radius '
+            "
+            style="margin-right: 40px; border-left: none"
+          >
+            已驳回
+          </div>
+        </div>
         <el-input
           placeholder="请输入名称/联系人/手机号"
           prefix-icon="el-icon-search"
@@ -13,11 +43,15 @@
         <div class="seach-btn" @click="getAgencyList">查询</div>
       </div>
       <el-button v-auth="'ADDPROXY'" type="primary" @click="visable = true">
-        添加代理
+        {{ isWuchan ? "申请" : "" }}添加代理
       </el-button>
     </div>
 
-    <el-dialog v-model="visable" title="添加代理" width="550px">
+    <el-dialog
+      v-model="visable"
+      :title="(isWuchan ? '申请' : '') + '添加代理'"
+      width="550px"
+    >
       <template v-slot:default>
         <div class="df jcc">
           <el-form
@@ -89,27 +123,29 @@
           label="入驻时间"
           min-width="160"
           align="center"
+          v-if="type == 1"
         >
           <template v-slot="scope">
             {{ subTimeStr(scope.row.createTime) }}
           </template>
         </el-table-column>
-        <el-table-column label="操作" min-width="120" align="center">
-          <!-- <template v-slot="scope">
-            <div class="df aic jcsa">
-              <el-switch
-                v-model="scope.row.accountStatus"
-                active-color="#13ce66"
-                inactive-color="#ff4949"
-                active-text="启用"
-                inactive-text="禁用"
-                :active-value="1"
-                :inactive-value="0"
-              />
-              <el-button disabled size="small" type="danger">删除</el-button>
-            </div>
-          </template> -->
+        <el-table-column
+          v-if="type == 3"
+          label="驳回时间"
+          min-width="160"
+          align="center"
+        >
+          <template v-slot="scope">
+            {{ subTimeStr(scope.row.auditTime) }}
+          </template>
         </el-table-column>
+        <el-table-column
+          v-if="type == 3"
+          label="驳回原因"
+          min-width="160"
+          prop="auditReason"
+          align="center"
+        ></el-table-column>
       </el-table>
       <div style="width: 100%; text-align: right; margin-top: 43px">
         <el-pagination
@@ -169,6 +205,7 @@ async function getAgencyList() {
     currentPage: currentPage.value,
     size: 10,
     loginAccountId: loginAccountId.value,
+    type: type.value,
   });
   if (res.data.status == 0) {
     tableData.value = res.data.result;
@@ -186,7 +223,6 @@ function pageChange(e) {
 let visable = ref(false);
 let form = ref(null);
 async function addAgency() {
-  console.log(ruleForm.value);
   let res = await api.addAgency({
     ...ruleForm.value,
     loginAccountId: loginAccountId.value,
@@ -213,6 +249,13 @@ function closeModal() {
   contactName.value = "";
 }
 
+let isWuchan = ref(localStorage.userId == 7);
+let type = ref(1);
+function changeListType(t) {
+  type.value = t;
+  getAgencyList();
+}
+
 onMounted(() => {
   loginAccountId.value = localStorage.loginAccountId;
   getAgencyList();
@@ -235,4 +278,33 @@ onMounted(() => {
   margin-left: 10px;
   cursor: pointer;
 }
+
+.radio-btns {
+  height: 38px;
+  width: 70px;
+  border: 1px solid #1486f9;
+  line-height: 38px;
+  text-align: center;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #0094fe;
+  cursor: pointer;
+}
+
+.left-radius {
+  border-top-left-radius: 19px;
+  border-bottom-left-radius: 19px;
+  width: 80px;
+}
+
+.right-radius {
+  border-top-right-radius: 19px;
+  border-bottom-right-radius: 19px;
+  width: 80px;
+}
+.currentbtn {
+  background: #1486f9;
+  color: #fff;
+}
 </style>