Browse Source

fix:页面优化及新增菜单必填项

刘恒 2 years ago
parent
commit
69ed22cb3d

+ 1 - 1
.env.development

@@ -1,4 +1,4 @@
-VUE_APP_API_BASE_URL='https://test.baoxianzhanggui.com/web-api'
+VUE_APP_API_BASE_URL='http://192.168.0.42:8080'
 # VUE_APP_API_BASE_URL='"https://test.baoxianzhanggui.com/web-api"'  #//测试服务器
 # VUE_APP_API_BASE_URL='"https://sxzgkj.baoxianzhanggui.com/web-api"'  #//正式服务器
 # VUE_APP_API_BASE_URL= '"http://192.168.0.115:8080/"'                 #//凯森

BIN
src/assets/img/man.png


BIN
src/assets/img/woman.png


+ 41 - 4
src/pages/business/index.vue

@@ -17,9 +17,36 @@
             button-style="solid"
             v-model="formState.days"
           >
-            <a-radio-button :value="1"> 当天 </a-radio-button>
-            <a-radio-button :value="7"> 近7天 </a-radio-button>
-            <a-radio-button :value="30"> 近30天 </a-radio-button>
+            <a-radio-button
+              :value="1"
+              @click="
+                (formState.time = []),
+                  (formState.createtimeStart = ''),
+                  (formState.createtimeEnd = '')
+              "
+            >
+              当天
+            </a-radio-button>
+            <a-radio-button
+              :value="7"
+              @click="
+                (formState.time = []),
+                  (formState.createtimeStart = ''),
+                  (formState.createtimeEnd = '')
+              "
+            >
+              近7天
+            </a-radio-button>
+            <a-radio-button
+              :value="30"
+              @click="
+                (formState.time = []),
+                  (formState.createtimeStart = ''),
+                  (formState.createtimeEnd = '')
+              "
+            >
+              近30天
+            </a-radio-button>
           </a-radio-group>
         </div>
       </div>
@@ -163,6 +190,13 @@ export default {
       listLoading: false,
     };
   },
+  watch: {
+    "formState.days"() {
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
+      this.getList();
+    },
+  },
   mounted() {
     this.getList();
     // setTimeout(() => {
@@ -192,9 +226,12 @@ export default {
         });
     },
     timeChange(val) {
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
       this.formState.createtimeStart = val[0];
       this.formState.createtimeEnd = val[1];
-      // this.getList();
+      this.formState.days = 0;
+      this.getList();
     },
     getList() {
       this.loading = true;

+ 16 - 2
src/pages/financial/receivablesMessage.vue

@@ -3,9 +3,18 @@
     <div class="back-line-header">
       <div class="back-line-header-title">
         <h2>财务应收</h2>
+        <div>
+          月份筛选
+          <a-month-picker
+            placeholder="请选择月份"
+            @change="monthChange"
+            v-model="formState.month"
+            valueFormat="YYYY-MM"
+          />
+        </div>
       </div>
       <div class="year">
-        <h1>{{ titleMessage.yearAndMonth }}</h1>
+        <h1>{{ formState.month }}</h1>
         <div class="ys">
           <img src="@/assets/img/ys.png" alt="" />
           <i>应收</i> {{ titleMessage.ysSumAmount }}
@@ -173,6 +182,8 @@ export default {
     },
   },
   mounted() {
+    this.formState.month = this.$route.query.yearMonth;
+
     this.getVerification();
     // setTimeout(() => {
     // }, 1000);
@@ -181,6 +192,9 @@ export default {
     handleFinish() {
       //
     },
+    monthChange() {
+      this.getVerification();
+    },
 
     // 弹出日历和关闭日历的回调
     openChangeOne(status) {
@@ -214,7 +228,7 @@ export default {
       this.$API.financial
         .getMonthReceivablesList({
           type: this.$route.query.type,
-          yearAndMonth: this.$route.query.yearMonth,
+          yearAndMonth: this.formState.month,
           isNoCar: this.$route.query.isNoCar
             ? this.$route.query.isNoCar
             : undefined,

+ 24 - 10
src/pages/personnelManage/channel.vue

@@ -96,12 +96,15 @@
         <div
           v-for="(item, index) in list"
           :key="item.userId"
-          :class="
-            index < 4 ? 'list-1' : index > 3 && index < 8 ? 'list-2' : 'list-3'
-          "
+          :class="index % 2 != 0 ? 'list-2' : 'list-1'"
         >
           <p>姓名:{{ item.name }}</p>
+
+          <p>员工工号:{{ item.userId }}</p>
+          <p>联系方式:{{ item.mobile }}</p>
           <p>机构归属:{{ item.deptName }}</p>
+          <p>管理人名称:{{ item.leaderName }}</p>
+
           <!-- <p>
             <span>总人力:{{ item.totalManpower || 0 }}</span>
             <span> {{ item.orderManpower || 0 }}</span>
@@ -110,6 +113,7 @@
             <span>总保费:{{ item.totalPremium || 0 }}</span>
             <span>单均保费:{{ item.averagePremium || 0 }}</span>
           </p>
+
           <div class="user-icon">
             <img v-show="item.filePath" :src="process + item.filePath" alt="" />
             <img
@@ -124,7 +128,7 @@
             />
             <img
               v-if="!item.filePath && !item.sex"
-              src="../../assets/img/normal.png"
+              src="../../assets/img/man.png"
               alt=""
             />
           </div>
@@ -368,16 +372,26 @@ export default {
     // margin-right: 2%;
   }
   > div.list-1 {
-    background: rgba(135, 229, 42, 0.1);
-    box-shadow: 0px 2px 8px 0px rgba(135, 229, 42, 0.15);
+    background: #fff8f6;
+    box-shadow: 0px 2px 8px 0px rgba(255, 173, 76, 0.15);
     border-radius: 8px 8px 8px 8px;
-    border: 1px solid rgba(135, 229, 42, 0.5);
+    border: 1px solid rgba(248, 127, 44, 0.5);
+    button {
+      background: #f87f2c;
+      color: #fff;
+      border: none;
+    }
   }
   > div.list-2 {
-    background: #fff7ee;
-    box-shadow: 0px 2px 8px 0px rgba(255, 173, 76, 0.15);
+    background: #f7fef4;
+    box-shadow: 0px 2px 8px 0px rgba(135, 229, 42, 0.15);
     border-radius: 8px 8px 8px 8px;
-    border: 1px solid rgba(255, 173, 76, 0.5);
+    border: 1px solid rgba(128, 190, 56, 0.5);
+    button {
+      background: #80be38;
+      color: #fff;
+      border: none;
+    }
   }
   > div.list-3 {
     background: #f9faff;

+ 1 - 1
src/pages/personnelManage/channel/message.vue

@@ -111,7 +111,7 @@
             />
             <img
               v-if="!item.filePath && !item.sex"
-              src="../../../assets/img/normal.png"
+              src="../../../assets/img/man.png"
               alt=""
             />
             {{ item.userName }}

+ 28 - 2
src/pages/personnelManage/front/personnel.vue

@@ -1,7 +1,20 @@
 <template>
   <div class="back-line-main">
     <div class="back-line-hearder">
-      <h1>人员查询</h1>
+      <div>
+        <h2>人员查询</h2>
+        <div>
+          <span>时间筛选</span>
+          <a-range-picker
+            v-model="formState.time"
+            @change="timeChange"
+            valueFormat="YYYY-MM-DD"
+            :defaultValue="defaultTime"
+          >
+            <a-icon slot="suffixIcon" type="calendar" />
+          </a-range-picker>
+        </div>
+      </div>
       <fromRow
         :formState="formState"
         @getList="query"
@@ -63,7 +76,7 @@
             />
             <img
               v-if="!item.filePath && !item.sex"
-              src="../../../assets/img/normal.png"
+              src="../../../assets/img/man.png"
               alt=""
             />
           </div>
@@ -383,6 +396,19 @@ export default {
     flex: 1;
     padding: 15px;
     box-sizing: border-box;
+    > div:first-child {
+      display: flex;
+      align-items: center;
+      > div {
+        flex: 1;
+        display: flex;
+        justify-content: flex-end;
+        align-items: center;
+        span {
+          margin-right: 10px;
+        }
+      }
+    }
     h1 {
       margin: 0;
     }

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

@@ -115,7 +115,7 @@
             />
             <img
               v-if="!item.filePath && !item.sex"
-              src="../../../assets/img/normal.png"
+              src="../../../assets/img/man.png"
               alt=""
             />
           </div>

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

@@ -95,7 +95,7 @@
             />
             <img
               v-if="!item.filePath && !item.sex"
-              src="../../../assets/img/normal.png"
+              src="../../../assets/img/man.png"
               alt=""
             />
             {{ item.userName }}

+ 53 - 10
src/pages/quote/smallorders/agent.vue

@@ -80,6 +80,46 @@
           <div slot="rate" slot-scope="{ text }">
             {{ text ? (text * 100).toFixed(2) + "%" : 0 }}
           </div>
+          <span slot="title_slot">
+            报价成功率
+            <a-tooltip
+              placement="topLeft"
+              title="报价成功 / 总报价"
+              arrow-point-at-center
+            >
+              <a-icon type="question-circle" />
+            </a-tooltip>
+          </span>
+          <span slot="title_slot2">
+            核保通过率
+            <a-tooltip
+              placement="topLeft"
+              title="核保数 / 报价数"
+              arrow-point-at-center
+            >
+              <a-icon type="question-circle" />
+            </a-tooltip>
+          </span>
+          <span slot="title_slot3">
+            成交率
+            <a-tooltip
+              placement="topLeft"
+              title="承保数 / 核保数 + 承保数"
+              arrow-point-at-center
+            >
+              <a-icon type="question-circle" />
+            </a-tooltip>
+          </span>
+          <span slot="title_slot4">
+            承保率
+            <a-tooltip
+              placement="topLeft"
+              title="承保数 / 报价数"
+              arrow-point-at-center
+            >
+              <a-icon type="question-circle" />
+            </a-tooltip>
+          </span>
         </standard-table>
       </div>
     </div>
@@ -142,28 +182,28 @@ const columns = [
     scopedSlots: { customRender: "count" },
   },
   {
-    title: "报价成功率",
+    // title: "报价成功率",
     dataIndex: "orderSuccessNumberRate",
-    scopedSlots: { customRender: "rate" },
+
+    scopedSlots: { title: "title_slot", customRender: "rate" },
   },
   {
-    title: "核保通过率",
+    // title: "核保通过率",
     dataIndex: "passRate",
-    scopedSlots: { customRender: "rate" },
+
+    scopedSlots: { title: "title_slot2", customRender: "rate" },
   },
   {
-    title: "成交率",
+    // title: "成交率",
     dataIndex: "closeRate",
-    scopedSlots: { customRender: "rate" },
 
-    // scopedSlots: { customRender: "qutationCount" },
+    scopedSlots: { title: "title_slot3", customRender: "rate" },
   },
   {
-    title: "承保率",
+    // title: "承保率",
     dataIndex: "contributionRate",
-    scopedSlots: { customRender: "rate" },
 
-    // scopedSlots: { customRender: "qutationCount" },
+    scopedSlots: { title: "title_slot4", customRender: "rate" },
   },
 ];
 
@@ -348,6 +388,9 @@ export default {
   > div {
     // height: 152px;
     background: #fff;
+    .standard-table {
+      width: 100%;
+    }
     .ant-form {
       display: flex;
       > .ant-form-item {

+ 70 - 42
src/pages/sys/menu.vue

@@ -38,7 +38,7 @@
       width="50%"
       :confirm-loading="confirmLoading"
     >
-      <a-form :layout="formLayout">
+      <a-form :layout="formLayout" :form="form">
         <a-form-item
           label="菜单类型"
           v-bind="formItemLayout"
@@ -60,8 +60,18 @@
           v-show="!authType"
         >
           <a-input
-            v-model="dataForm.name"
             :placeholder="menuTypeList[dataForm.type] + '名称'"
+            v-decorator="[
+              'name',
+              {
+                rules: [
+                  {
+                    required: true,
+                    message: '请输入' + menuTypeList[dataForm.type] + '名称',
+                  },
+                ],
+              },
+            ]"
           />
         </a-form-item>
         <a-form-item
@@ -102,7 +112,20 @@
           v-bind="formItemLayout"
           v-show="dataForm.type != 2 && !authType"
         >
-          <a-input placeholder="请输入菜单路由" v-model="dataForm.url" />
+          <a-input
+            placeholder="请输入菜单路由"
+            v-decorator="[
+              'url',
+              {
+                rules: [
+                  {
+                    required: true,
+                    message: '请输入菜单名称',
+                  },
+                ],
+              },
+            ]"
+          />
         </a-form-item>
         <a-form-item
           label="排序编号"
@@ -230,6 +253,7 @@ export default {
         title: "name",
         key: "id",
       },
+      form: this.$form.createForm(this, { name: "dynamic_rule" }),
       dataForm: {
         id: 0,
         type: 1,
@@ -410,45 +434,49 @@ export default {
       this.dataForm = { ...this.resetForm };
     },
     handleOk() {
-      //   this.visible = false;
-      // this.confirmLoading = true;
-      if (this.authType) {
-        // console.log(this.authPermissions);
-        this.$API.sysManage
-          .setMenuAuth({
-            customScriptFlag: this.authPermissions.customScriptFlag ? 1 : 0,
-            dataPermissionId:
-              this.authPermissions.customScriptFlag == 0
-                ? this.authPermissions.dataPermissionId
-                : undefined,
-            id: this.authPermissions.id,
-            menuId: this.authPermissions.menuId,
-            scriptContent: this.authPermissions.customScriptFlag
-              ? this.authPermissions.scriptContent
-              : undefined,
-            url: this.authPermissions.url,
-          })
-          .then((res) => {
-            if (res.data.code === 200) {
-              this.$message.success("操作成功");
-              this.confirmLoading = false;
-              this.visible = false;
-              this.getList();
-            }
-          });
-      } else
-        this.$API.sysManage
-          .setMenuItem({
-            ...this.dataForm,
-          })
-          .then((res) => {
-            if (res.data.code === 200) {
-              this.$message.success("操作成功");
-              this.confirmLoading = false;
-              this.visible = false;
-              this.getList();
-            }
-          });
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          // console.log(values, this.dataForm);
+          if (this.authType) {
+            this.$API.sysManage
+              .setMenuAuth({
+                customScriptFlag: this.authPermissions.customScriptFlag ? 1 : 0,
+                dataPermissionId:
+                  this.authPermissions.customScriptFlag == 0
+                    ? this.authPermissions.dataPermissionId
+                    : undefined,
+                id: this.authPermissions.id,
+                menuId: this.authPermissions.menuId,
+                scriptContent: this.authPermissions.customScriptFlag
+                  ? this.authPermissions.scriptContent
+                  : undefined,
+                url: this.authPermissions.url,
+              })
+              .then((res) => {
+                if (res.data.code === 200) {
+                  this.$message.success("操作成功");
+                  this.confirmLoading = false;
+                  this.visible = false;
+                  this.getList();
+                }
+              });
+          } else
+            this.$API.sysManage
+              .setMenuItem({
+                ...this.dataForm,
+                name: values.name,
+                url: values.url,
+              })
+              .then((res) => {
+                if (res.data.code === 200) {
+                  this.$message.success("操作成功");
+                  this.confirmLoading = false;
+                  this.visible = false;
+                  this.getList();
+                }
+              });
+        }
+      });
     },
   },
 };

+ 50 - 8
src/pages/task/agent.vue

@@ -68,6 +68,36 @@
       <div slot="quotationRate" slot-scope="{ text }">
         {{ (text * 100).toFixed(2) + "%" }}
       </div>
+      <span slot="title_slot">
+        报价率
+        <a-tooltip
+          placement="topLeft"
+          title="报价中 / 报价数"
+          arrow-point-at-center
+        >
+          <a-icon type="question-circle" />
+        </a-tooltip>
+      </span>
+      <span slot="title_slot2">
+        承保率
+        <a-tooltip
+          placement="topLeft"
+          title="承保数 / 报价数"
+          arrow-point-at-center
+        >
+          <a-icon type="question-circle" />
+        </a-tooltip>
+      </span>
+      <span slot="title_slot3">
+        核保通过率
+        <a-tooltip
+          placement="topLeft"
+          title="(承保数+ 核保数) / 报价数"
+          arrow-point-at-center
+        >
+          <a-icon type="question-circle" />
+        </a-tooltip>
+      </span>
     </standard-table>
   </div>
 </template>
@@ -76,6 +106,18 @@
 import StandardTable from "@/components/table/StandardTable";
 import mixin from "../../minins/mixin";
 const columns = [
+  {
+    title: "二级机构",
+    dataIndex: "provinceName",
+  },
+  {
+    title: "三级机构",
+    dataIndex: "cityName",
+  },
+  {
+    title: "四级机构",
+    dataIndex: "districtName",
+  },
   {
     title: "归属机构",
     dataIndex: "deptName",
@@ -121,19 +163,19 @@ const columns = [
     scopedSlots: { customRender: "qutationCount" },
   },
   {
-    title: "报价率",
+    // title: "报价率",
     dataIndex: "quotationRate",
-    scopedSlots: { customRender: "quotationRate" },
+    scopedSlots: { title: "title_slot", customRender: "quotationRate" },
   },
   {
-    title: "承保率",
-    dataIndex: "contributionRate",
-    scopedSlots: { customRender: "quotationRate" },
+    // title: "承保率",
+    dataIndex: "closeRate",
+    scopedSlots: { title: "title_slot2", customRender: "quotationRate" },
   },
   {
-    title: "核保通过率",
-    dataIndex: "passingRate",
-    scopedSlots: { customRender: "quotationRate" },
+    // title: "核保通过率",
+    dataIndex: "contributionRate",
+    scopedSlots: { title: "title_slot3", customRender: "quotationRate" },
   },
 ];
 import fromRow from "@/components/form/FormRow";

+ 48 - 9
src/pages/task/channel.vue

@@ -67,6 +67,36 @@
       <div slot="quotationRate" slot-scope="{ text }">
         {{ (text * 100).toFixed(2) + "%" }}
       </div>
+      <span slot="title_slot">
+        报价率
+        <a-tooltip
+          placement="topLeft"
+          title="报价中 / 报价数"
+          arrow-point-at-center
+        >
+          <a-icon type="question-circle" />
+        </a-tooltip>
+      </span>
+      <span slot="title_slot2">
+        承保率
+        <a-tooltip
+          placement="topLeft"
+          title="承保数 / 报价数"
+          arrow-point-at-center
+        >
+          <a-icon type="question-circle" />
+        </a-tooltip>
+      </span>
+      <span slot="title_slot3">
+        核保通过率
+        <a-tooltip
+          placement="topLeft"
+          title="(承保数+ 核保数) / 报价数"
+          arrow-point-at-center
+        >
+          <a-icon type="question-circle" />
+        </a-tooltip>
+      </span>
     </standard-table>
   </div>
 </template>
@@ -76,20 +106,29 @@ import StandardTable from "@/components/table/StandardTable";
 import fromRow from "@/components/form/FormRow";
 import mixin from "../../minins/mixin";
 const columns = [
+  {
+    title: "二级机构",
+    dataIndex: "provinceName",
+  },
+  {
+    title: "三级机构",
+    dataIndex: "cityName",
+  },
+  {
+    title: "四级机构",
+    dataIndex: "districtName",
+  },
   {
     title: "归属机构",
     dataIndex: "deptName",
-    // scopedSlots: { customRender: "qutationCount" },
   },
   {
     title: "业务员姓名",
     dataIndex: "userName",
-    // scopedSlots: { customRender: "qutationCount" },
   },
   {
     title: "业务员工号",
     dataIndex: "userId",
-    // scopedSlots: { customRender: "qutationCount" },
   },
   {
     title: "报价中",
@@ -121,19 +160,19 @@ const columns = [
     scopedSlots: { customRender: "qutationCount" },
   },
   {
-    title: "报价率",
+    // title: "报价率",
     dataIndex: "quotationRate",
-    scopedSlots: { customRender: "quotationRate" },
+    scopedSlots: { title: "title_slot", customRender: "quotationRate" },
   },
   {
-    title: "承保率",
+    // title: "承保率",
     dataIndex: "closeRate",
-    scopedSlots: { customRender: "quotationRate" },
+    scopedSlots: { title: "title_slot2", customRender: "quotationRate" },
   },
   {
-    title: "核保通过率",
+    // title: "核保通过率",
     dataIndex: "contributionRate",
-    scopedSlots: { customRender: "quotationRate" },
+    scopedSlots: { title: "title_slot3", customRender: "quotationRate" },
   },
 ];
 import moment from "moment";

+ 2 - 2
src/pages/wallet/agent.vue

@@ -69,7 +69,7 @@
           <a-form-item label="姓名" :labelCol="{ span: 5 }" :colon="false">
             <a-input
               placeholder="请输入姓名"
-              v-model="formState.userName"
+              v-model="formState.name"
               allowClear
             ></a-input>
           </a-form-item>
@@ -228,7 +228,7 @@ export default {
       formState: {
         days: undefined,
         time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
-        userName: undefined,
+        name: undefined,
         userCode: undefined,
         phoneNumber: undefined,
         endDate: moment().format("YYYY-MM-DD"),