Przeglądaj źródła

fix:页面bug修复

刘恒 2 lat temu
rodzic
commit
4d3d5fccaf

+ 32 - 8
src/components/form/FormRow.vue

@@ -172,20 +172,44 @@ export default {
     exportExcel: {
       default: false,
     },
-  },
-  methods: {
-    wholeHandleChange() {
-      this.getProvinceList(this.formState.whole);
+    showStore: {
+      default: true,
     },
-    provinceHandleChange() {
-      this.getCityList(this.formState.provinceId);
+  },
+  watch: {
+    "formState.provinceId"(val) {
+      this.getCityList(val);
     },
-    cityHandleChange() {
+    "formState.cityId"() {
       this.getAreaList(this.formState.cityId);
     },
-    countyHandleChange() {
+    "formState.countyId"() {
       this.getStoreList(this.formState.countyId);
     },
+  },
+  methods: {
+    wholeHandleChange(val) {
+      if (val) {
+        this.getProvinceList(this.formState.whole);
+      }
+
+      if (val == undefined || val == "" || val == null) {
+        this.formState.provinceId = undefined;
+        this.formState.cityId = undefined;
+        this.formState.countyId = undefined;
+        this.formState.houseId = undefined;
+        this.getProvinceList(this.formState.whole);
+      }
+    },
+    // provinceHandleChange() {
+    //   this.getCityList(this.formState.provinceId);
+    // },
+    // cityHandleChange() {
+    //   this.getAreaList(this.formState.cityId);
+    // },
+    // countyHandleChange() {
+    //   this.getStoreList(this.formState.countyId);
+    // },
     getList() {
       this.$emit("getList", this.formState);
     },

+ 1 - 1
src/pages/agreement/index.vue

@@ -29,7 +29,7 @@
       </a-button>
     </a-row>
     <div class="main">
-      <fromRow :formState="formState" @getList="search"></fromRow>
+      <fromRow :formState="formState" @getList="search" :showTab="3"></fromRow>
       <standard-table
         bordered
         :columns="columns"

+ 20 - 5
src/pages/personnelManage/channel.vue

@@ -115,13 +115,21 @@
 
               <p>员工工号:{{ item.userId }}</p>
               <p>联系方式:{{ item.mobile }}</p>
-              <p>机构归属:{{ item.deptName }}</p>
+              <p class="mechanism">
+                <a-tooltip>
+                  <template slot="title">
+                    <span>
+                      {{ item.deptName }}
+                    </span>
+                  </template>
+                  <p>
+                    机构归属:
+                    {{ item.deptName }}
+                  </p>
+                </a-tooltip>
+              </p>
               <p>管理人名称:{{ item.leaderName }}</p>
 
-              <!-- <p>
-            <span>总人力:{{ item.totalManpower || 0 }}</span>
-            <span> {{ item.orderManpower || 0 }}</span>
-          </p> -->
               <p>
                 <span>总保费:{{ item.totalPremium || 0 }}</span>
                 <span>单均保费:{{ item.averagePremium || 0 }}</span>
@@ -450,4 +458,11 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
+.back-line-main .personnel-message .mechanism > p {
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
 </style>

+ 2 - 2
src/pages/personnelManage/channel/order.vue

@@ -455,9 +455,9 @@ export default {
       this.$message.info("您清空了勾选的所有行");
     },
 
-    onChange(pagination, filters, sorter, { currentDataSource }) {
+    onChange(pagination) {
       // this.$message.info('表格状态改变了')
-      console.log(pagination, filters, sorter, { currentDataSource });
+
       this.pagination = {
         current: pagination.current,
         defaultPageSize: pagination.pageSize,

+ 1 - 1
src/pages/personnelManage/front/order.vue

@@ -282,7 +282,7 @@ export default {
           dateType: this.formState.dateType,
           beginDate: this.formState.beginDate,
           endDate: this.formState.endDate,
-          managementSource: 1,
+          managementSource: 2,
           userId: this.$route.query.userId,
           // provinceId: this.formState.provinceId,
           // cityId: this.formState.cityId,

+ 20 - 1
src/pages/personnelManage/front/personnel.vue

@@ -37,7 +37,19 @@
             <div :class="Math.floor((index / 3) % 2) ? 'list-2' : 'list-1'">
               <p>员工工号:{{ item.userId }}</p>
               <p>联系方式:{{ item.mobile }}</p>
-              <p>机构归属:{{ item.deptName }}</p>
+              <p class="mechanism">
+                <a-tooltip>
+                  <template slot="title">
+                    <span>
+                      {{ item.deptName }}
+                    </span>
+                  </template>
+                  <p>
+                    机构归属:
+                    {{ item.deptName }}
+                  </p>
+                </a-tooltip>
+              </p>
               <p>管理人名称:{{ item.leaderName }}</p>
               <p>
                 <span>总人力:{{ item.totalManpower || 0 }}</span>
@@ -556,4 +568,11 @@ export default {
     }
   }
 }
+.back-line-main .personnel-message .mechanism > p {
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
 </style>

+ 2 - 2
src/pages/quote/smallorders/agent.vue

@@ -265,7 +265,7 @@ export default {
       this.$API.quote
         .getAgentTree({
           deptId: id ? id : "",
-          managementSource: 1,
+          managementSource: 2,
           // provinceId: this.formState.provinceId,
           // cityId: this.formState.cityId,
           // countyId: this.formState.countyId,
@@ -298,7 +298,7 @@ export default {
           dateType: this.formState.dateType,
           beginDate: this.formState.beginDate,
           endDate: this.formState.endDate,
-          managementSource: 1,
+          managementSource: 2,
           // provinceId: this.formState.provinceId,
           // cityId: this.formState.cityId,
           // countyId: this.formState.countyId,

+ 2 - 3
src/pages/quote/smallorders/channel.vue

@@ -225,7 +225,7 @@ export default {
       this.$API.quote
         .getAgentTree({
           deptId: id ? id : "",
-          managementSource: 2,
+          managementSource: 1,
           // provinceId: this.formState.provinceId,
           // cityId: this.formState.cityId,
           // countyId: this.formState.countyId,
@@ -233,7 +233,6 @@ export default {
         })
         .then((res) => {
           if (res.data.code === 200) {
-            console.log(res);
             this.treeData = [...res.data.data];
           }
         });
@@ -259,7 +258,7 @@ export default {
           dateType: this.formState.dateType,
           beginDate: this.formState.beginDate,
           endDate: this.formState.endDate,
-          managementSource: 2,
+          managementSource: 1,
           // provinceId: this.formState.provinceId,
           // cityId: this.formState.cityId,
           // countyId: this.formState.countyId,

+ 23 - 3
src/pages/sys/menu.vue

@@ -38,7 +38,7 @@
       width="50%"
       :confirm-loading="confirmLoading"
     >
-      <a-form :layout="formLayout" :form="form">
+      <a-form :layout="formLayout" :form="form" :rules="rules">
         <a-form-item
           label="菜单类型"
           v-bind="formItemLayout"
@@ -254,6 +254,11 @@ export default {
         key: "id",
       },
       form: this.$form.createForm(this, { name: "dynamic_rule" }),
+      rules: {
+        requiredField: [
+          { required: true, message: "请输入必填项", trigger: "blur" },
+        ],
+      },
       dataForm: {
         id: 0,
         type: 1,
@@ -297,6 +302,17 @@ export default {
     this.resetForm = { ...this.dataForm };
     this.getAuthList();
   },
+  // watch: {
+  //   dataForm(val) {
+  //     console.log(val);
+  //     this.form.updateFields({
+  //       name: this.$form.createFormField({
+  //         ...this.username,
+  //         value: this.username.value,
+  //       }),
+  //     });
+  //   },
+  // },
   mounted() {},
   methods: {
     customRow(record, index) {
@@ -396,7 +412,12 @@ export default {
     editMenu(item, type) {
       this.title = "编辑";
       this.visible = true;
-      this.dataForm = { ...item.record };
+      this.$nextTick(() => {
+        this.dataForm = { ...item.record };
+
+        this.form.setFieldsValue({ ["name"]: item.record.name });
+        this.form.setFieldsValue({ ["url"]: item.record.url });
+      });
 
       if (type) {
         this.authType = true;
@@ -414,7 +435,6 @@ export default {
       }
     },
     onSelect(val, { node }) {
-      console.log(val, node);
       this.dataForm.parentId = val[0];
       this.dataForm.parentName = node.title;
     },

+ 5 - 0
src/pages/task/agent.vue

@@ -127,11 +127,16 @@ const columns = [
     title: "五级机构",
     dataIndex: "storeDeptName",
   },
+
   {
     title: "归属机构",
     dataIndex: "deptName",
     // scopedSlots: { customRender: "qutationCount" },
   },
+  {
+    title: "管理人",
+    dataIndex: "leaderName",
+  },
   {
     title: "业务员姓名",
     dataIndex: "userName",

+ 5 - 1
src/pages/task/channel.vue

@@ -66,7 +66,7 @@
         @clear="onClear"
         @change="onChange"
         :loading="loading"
-        :scroll="{ x: 2000 }"
+        :scroll="{ x: 2200 }"
       >
         <div slot="qutationCount" slot-scope="{ text }">
           {{ text + "条" }}
@@ -135,6 +135,10 @@ const columns = [
     title: "归属机构",
     dataIndex: "deptName",
   },
+  {
+    title: "管理人",
+    dataIndex: "leaderName",
+  },
   {
     title: "业务员姓名",
     dataIndex: "userName",

+ 18 - 1
src/pages/task/insurance.vue

@@ -9,6 +9,7 @@
               style="width: 200px"
               @change="getList()"
               v-model="formState.provinceId"
+              allowClear
             >
               <a-select-option
                 v-for="item in areaList"
@@ -26,6 +27,7 @@
               style="width: 200px"
               v-model="formState.cityId"
               @change="getList()"
+              allowClear
             >
               <a-select-option
                 v-for="item in cityList"
@@ -242,12 +244,22 @@ export default {
       },
       companyId: "",
       process: process.env.VUE_APP_API_BASE_URL,
+      city: [],
     };
   },
   watch: {
     "formState.days"() {
       this.getBackLinePersonnel();
     },
+    "formState.provinceId"(val) {
+      console.log(val);
+      if (val != undefined) {
+        this.cityList = [...this.city];
+      } else {
+        this.formState.cityId = undefined;
+        this.cityList = [];
+      }
+    },
   },
   mounted() {
     this.getBackLinePersonnel();
@@ -273,7 +285,8 @@ export default {
             }
           });
           this.areaList = [...arr];
-          this.cityList = [...arr[0].child];
+          // this.cityList = [...arr[0].child];
+          this.city = [...arr[0].child];
         }
       });
     },
@@ -367,6 +380,10 @@ export default {
               defaultPageSize: res.data.data.size,
               total: res.data.data.total,
             };
+          } else {
+            this.loading = false;
+            this.tableList = [];
+            this.$message.error(res.data.msg);
           }
         });
     },