lihongxiao 2 лет назад
Родитель
Сommit
e68fe1d307

+ 2 - 2
config/dev.env.js

@@ -5,7 +5,7 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
-  // BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',//测试服务器
+  BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',//测试服务器
   // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
@@ -13,7 +13,7 @@ module.exports = merge(prodEnv, {
   // BASE_URL: '"http:///192.168.0.253:8080/"',//田智
   // BASE_URL: '"http:///192.168.0.42:8080/"',//武鸿鹏
   // BASE_URL: '"http://192.168.1.101:8080/"',
-  BASE_URL: '"http:///192.168.0.22:8080/"',//郝宇
+  // BASE_URL: '"http:///192.168.0.22:8080/"',//郝宇
   // BASE_URL: '"http:///192.168.0.103:8080/"',//
 })
 

+ 16 - 1
src/http/moudules/task.js

@@ -1084,4 +1084,19 @@ export const plyFeeUploadId = (id) => {
     url: "/fnc/plyFee/getById/"+id,
     method: "get",
   })
-}
+}
+// 后线人员协议配置人员列表
+export const findAllUserList = (data) => {
+  return axios({
+    url: "/sysUserLinkPtlAgreement/findAllUserList",
+    method: "post",
+    data
+  })
+}
+// 机构接口
+export const findAllTree = () => {
+  return axios({
+    url: "/dept/findAllTree ",
+    method: "get",
+  })
+}

+ 238 - 41
src/views/AgreementManage/CarInsurance/BacklineAllocation.vue

@@ -3,35 +3,157 @@
     <el-main ref="elMain" style="padding: 0px;">
       <Split :gutterSize="2" style="height: calc(100vh - 120px)">
         <!-- 左侧树Start -->
-        <SplitArea :size="leftSplitWidth" :minSize="240">
+        <SplitArea  :minSize="240">
           <div>
-            <div>
-              <kt-button icon="fa fa-plus" label="添加" type="primary" @click="handleAddProduct" />
-              <kt-button icon="fa fa-edit" label="编辑" type="primary" @click="handleTableEdit" />
-            </div>
-            <el-divider></el-divider>
+            <!-- <el-divider></el-divider>
             <el-input size="small" style="width:90%" placeholder="请输入工号" v-model="personnelValue" clearable >
               <el-button type="primary" slot="append" icon="el-icon-search" @click="personnelFun()"></el-button>
-            </el-input>
-            <!-- 左侧树形结构 -->
-            <el-tree
-              :data="nonCarInsuranceCodeoptions"
-              :props="{ children: 'children', label: 'name' }"
-              node-key="id"
-              :default-expanded-keys="['9']"
-              @node-click="onZTreeClick"
-            ></el-tree>
+            </el-input> -->
+            <el-form ref="queryFormRef" :model="personnePageRequest" label-width="60px">
+              <el-row>
+                <el-col :span="7">
+                  <el-form-item label="工号">
+                    <el-input
+                      clearable
+                      :size="overSize"
+                      placeholder="工号"
+                      v-model="personnePageRequest.userId"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="7">
+                  <el-form-item label="名称">
+                    <el-input
+                      clearable
+                      :size="overSize"
+                      placeholder="名称"
+                      v-model="personnePageRequest.name"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="7">
+                  <el-form-item label="机构">
+                    <el-cascader v-model="personnePageRequest.deptId"  :size="overSize" :show-all-levels="false"
+                    :options="deptList" :props="optionProps"  clearable filterable></el-cascader>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="2">
+                  <el-form-item label label-width="10px">
+                    <el-button
+                      :size="overSize"
+                      type="primary"
+                      @click="personnelFindQuery()"
+                      >查询</el-button
+                    >
+                  </el-form-item>
+                </el-col>
+                <!-- <el-col :span="4">
+                  <el-form-item label label-width="10px">
+                    <kt-button icon="fa fa-plus" label="添加" type="primary" @click="handleAddProduct" />
+                  </el-form-item>
+                </el-col> -->
+              </el-row>
+            </el-form>
+            <el-table
+            :data="personnePageReData"
+            border
+            ref="personneTable"
+            width="100%"
+            size="small"
+            align="center" :header-cell-style="{
+            background: '#F2F7FC',
+            fontWeight: '900',
+            color: '#606266',
+            }"
+            @selection-change="personneSelectionChange"
+            :row-class-name="tableRowClassName">
+            <el-table-column
+              type="selection"
+              width="55">
+            </el-table-column>
+            <el-table-column
+              prop="userId"
+              label="工号">
+            </el-table-column>
+            <el-table-column
+              prop="name"
+              label="名称">
+            </el-table-column>
+            <el-table-column
+              prop="deptName"
+              label="机构名称">
+            </el-table-column>
+            <el-table-column
+            width="100"
+              label="操作">
+              <template slot-scope="scope">
+                <el-button type="text" @click="handleTableEdit(scope.row)"  size="small">编辑</el-button>
+              </template>
+            </el-table-column>
+            <!-- 表格列 -->
+          </el-table>
+       
+          <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="refreshPageRequest"
+      :current-page="personnePageRequest.pageNum"
+      :page-sizes="[10, 20, 50, 100, 200, 300, 400, 500]" 
+      :page-size="personnePageRequest.pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="personnePageRequest.total">
+    </el-pagination>
           </div>
         </SplitArea>
         <!-- 工具区域Start -->
-        <SplitArea :size="rightSplitWidth">
+        <SplitArea >
+          <el-form ref="queryFormRef" :model="pageRequest" label-width="60px">
+              <el-row>
+                <el-col :span="7">
+                  <el-form-item label="工号">
+                    <el-input
+                      clearable
+                      :size="overSize"
+                      placeholder="工号"
+                      v-model="pageRequest.userId"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="7">
+                  <el-form-item label="姓名">
+                    <el-input
+                      clearable
+                      :size="overSize"
+                      placeholder="姓名"
+                      v-model="pageRequest.sysUserName"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="7">
+                  <el-form-item label="保险公司" label-width="80px">
+                    <el-cascader v-model="pageRequest.insuranceCompany"  :size="overSize" :show-all-levels="false"
+                    :options="ztreeNodes" :props="optionProps"  clearable filterable></el-cascader>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                    <el-button
+                      size="small"
+                      type="primary"
+                      @click="findQuery()"
+                      >查询</el-button
+                    >
+                    <kt-button  label="添加" type="primary" @click="handleAddProduct" />
+                </el-col>
+              </el-row>
+            </el-form>
           <kt-common-table
-            permsEdit="sys:productEntry:edit"
+          style="margin-top:10px"
             permsDelete="sys:productEntry:delete"
             :data="pageResult"
             :columns="columns"
+            :showBatchDelete="true"
             deleteButtonName="删除"
-            :showBatchDelete="false"
+            deleteName="批量删除"
+            @handleDelete="handleDelete"
             @findPage="findPage"
             @handleDeleteFlag="handleTableDeleteFlag"
           ></kt-common-table>
@@ -76,17 +198,33 @@ export default {
   },
   data() {
     return {
+      ztreeNodes: [],
+      deptList:[],
+      optionProps: {
+        //公司下拉列表配置
+        checkStrictly: true,
+        value: "id",
+        label: "name",
+        children: "children",
+      },
       overSize: "small",
       agreementTypeoptions: [], //协议类型
       leftSplitWidth: 20,
       rightSplitWidth: 80,
       // 右侧列表查询数据Start
       pageResult: {},
+      personnePageReData:[],
       pageRequest: {
         //查询的默认条件
         pageNum: 1,
         pageSize: 20
       },
+      personnePageRequest: {
+        //查询的默认条件
+        pageNum: 1,
+        pageSize: 10,
+        total:0
+      },
       columns: [
         // 数据列
         {
@@ -114,35 +252,78 @@ export default {
           label: "协议类型",
           formatter: this.agreementtypeFormatter,
           sortable: false
+        },
+        {
+          prop: "insuranceCompany",
+          label: "保险公司名称",
+          sortable: false
         }
       ],
       productDialogVisible: false, //控制产品对话框
       dialogTitle: "新增",
-      nonCarInsuranceCodeoptions: [], //险类代码字典
       userId: "",
       tableData: [],
       personnelValue:'', //工号搜索
     };
   },
   created() {
+      this.$api.cost.gainTopList({ type: 1 }).then((res) => {
+        this.ztreeNodes = res.data;
+      });
     this.getDicType("agreementType"); //协议类型
-    this.personnelFun()
+    this.getAllCompany()
+    this.personnelFindPage()
   },
   watch: {},
   methods: {
-    personnelFun(){
-      this.$api.task.findUserList({userId:this.personnelValue}).then(res => {
+    handleDelete(val){
+      this.handleTableDelete(val)
+    },
+    personnelFindQuery(){
+      this.personnePageRequest.pageNum='1',
+      this.personnePageRequest.pageSize=20
+      this.personnelFindPage()
+    },
+    findQuery(){
+      this.pageRequest.pageNum='1',
+      this.pageRequest.pageSize=20
+      this.findPage()
+    },
+    tableRowClassName(row){
+      if (row.row.flag ) {
+        return 'flagRow';
+      } else {
+        return '';
+      }
+    },
+    handleSizeChange(pageSize){
+      this.personnePageRequest.pageSize = pageSize;
+      this.personnelFindPage()
+    },
+    refreshPageRequest: function (pageNum) {
+      this.personnePageRequest.pageNum = pageNum;
+      this.personnelFindPage()
+    },
+    personnelFindPage(){
+      let deptId=''
+      if(this.personnePageRequest.deptId && this.personnePageRequest.deptId.length>0){
+        deptId=this.personnePageRequest.deptId[this.personnePageRequest.deptId.length]
+      }
+      this.$api.task.findAllUserList({...this.personnePageRequest,deptId}).then(res => {
       if (res.code == 200) {
-        this.nonCarInsuranceCodeoptions = res.data;
+        this.personnePageReData = res.data.content;
+        this.personnePageRequest.pageNum= res.data.pageNum;
+        this.personnePageRequest.pageSize= res.data.pageSize;
+        this.personnePageRequest.total= res.data.totalSize;
       } else {
         this.$message.error(res.msg);
       }
     });
     },
     //--tree begin-------
-    handleTableEdit({ row, index }) {
-      if (this.userId) {
-        this.$api.task.findPtlAgreementListByUserId(this.userId).then(res => {
+    handleTableEdit( row ) {
+      this.userId=row.userId
+        this.$api.task.findPtlAgreementListByUserId(row.userId).then(res => {
           if (res.code == 200) {
             this.tableData = res.data;
             this.$nextTick(() => {
@@ -158,12 +339,18 @@ export default {
             this.$message.error(res.msg);
           }
         });
-      } else {
-        this.$message.error("请选择人员!");
-      }
     },
+    // 获取所有机构列表
+    getAllCompany(){
+        this.$api.task.findAllTree().then(res => {
+            this.deptList=res.data
+        });
+      },
     handleTableDeleteFlag(data) {
-      this.$api.task.addOrDelete({ ids: [data.row.id] }).then(res => {
+      this.handleTableDelete([data.row.id])
+    },
+    handleTableDelete(id) {
+      this.$api.task.addOrDelete( {ids:id} ).then(res => {
         if (res.code == "200") {
           this.$message({
             message: "删除成功",
@@ -181,7 +368,8 @@ export default {
     //-- tree end-------
     // 右侧按钮方法Start
     handleAddProduct() {
-      if (this.userId) {
+      if (this.$refs.personneTable.selection && this.$refs.personneTable.selection.length>0) {
+        this.userId=this.$refs.personneTable.selection[0].userId
         this.$api.task.findPtlAgreementList().then(res => {
           if (res.code == 200) {
             this.tableData = res.data;
@@ -203,8 +391,9 @@ export default {
         this.pageRequest.pageNum = data.pageRequest.pageNum;
         this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
+      this.pageRequest.insuranceCompany=this.pageRequest.insuranceCompany?this.pageRequest.insuranceCompany[0]:''
       this.$api.task
-        .sysUserLinkPtlAgreementPage({...this.pageRequest, userId:this.userId})
+        .sysUserLinkPtlAgreementPage({...this.pageRequest})
         .then(res => {
           if (res.code == 200) {
             res.data.content.forEach(val => {
@@ -219,6 +408,9 @@ export default {
               val.agreementType = val.ptlAgreement
                 ? val.ptlAgreement.agreementType
                 : "";
+              val.insuranceCompany = val.ptlAgreement
+                ? val.ptlAgreement.insuranceCompany
+                : "";
             });
             this.pageResult = res.data;
           } else {
@@ -227,11 +419,6 @@ export default {
         })
         .then(data != null ? data.callback : "");
     },
-  
-    onZTreeClick: function(evt, treeId, treeNode) {
-      this.userId = evt.userId;
-      this.findPage()
-    },
     submitForm() {
       this.$api.task
         .addOrUpdate({
@@ -244,7 +431,7 @@ export default {
               message: "操作成功",
               type: "success"
             });
-            this.findPage();
+            this.personnelFindPage();
             this.productDialogVisible = false;
           } else {
             this.$message({
@@ -278,8 +465,13 @@ export default {
         val.forEach(obj => {
           this.ptlAgreementIds.push(obj.id); // 将每个对象的id添加到allIds数组中
         });
-        // this.ptlAgreementIds.push(val.find(e=>e.sysUserId).sysUserId) ;
-    }
+    },
+    personneSelectionChange(selection) {
+      if (selection.length > 1) {
+        this.$refs.personneTable.clearSelection(); // 清空所有选择
+        this.$refs.personneTable.toggleRowSelection(selection.pop()); // 设置选择项
+      }
+    },
   }
 };
 </script>
@@ -289,7 +481,12 @@ export default {
 .queryFrom .el-row {
   margin: 10px 0px;
 }
-
+>>>.el-table .flagRow{
+    background: rgba(212, 36, 38, 0.2)  !important;
+  }
+  >>> .el-table__header-wrapper .el-table__header .el-checkbox {
+ 	 display: none;
+}
 .queryFrom .el-form-item {
   margin-bottom: 0px;
 }

+ 13 - 13
src/views/Core/KtCommonTable.vue

@@ -341,22 +341,22 @@ export default {
   data() {
     return {
       tableHeight: 0,
-      // 分页信息
+      loading: false, // 加载标识
+      selections: [], // 列表选中列
       pageRequest: {
         pageNum: 1,
         pageSize: 20,
-      },
-      loading: false, // 加载标识
-      selections: [], // 列表选中列
-    };
+    }
+  }
   },
   methods: {
-    tableRowClassName({ row, rowIndex }) {
-      if (!!row.fieldName24 && row.fieldName24.indexOf("未") >= 0) {
-        return "warningRow";
-      } else if (!!row.fieldName24 && row.fieldName24.indexOf("已") >= 0) {
-        return "successRow";
-      }
+    tableRowClassName( row, rowIndex ) {
+      // if (!!row.fieldName24 && row.fieldName24.indexOf("未") >= 0) {
+      //   return "warningRow";
+      // } else if (!!row.fieldName24 && row.fieldName24.indexOf("已") >= 0) {
+        // return "successRow";
+      // }
+      this.$emit("tableRowClassName", row);
       // return '';
     },
     getSummaries(param) {
@@ -426,12 +426,12 @@ export default {
     // 换页刷新
     refreshPageRequest: function (pageNum) {
       this.pageRequest.pageNum = pageNum;
-      this.findPage();
+      this.findPage()
     },
     // 每页条数发生改变
     handleSizeChange(pageSize) {
       this.pageRequest.pageSize = pageSize;
-      this.findPage();
+      this.findPage()
     },
     signStateChanged(index, row) {
       this.$emit("signStateChanged", {

+ 10 - 5
src/views/Task/daikeComponents/KtLetter.vue

@@ -5428,11 +5428,16 @@ export default {
       });
     },
     protocolJudge(val){
-      if(val && val.length>0){
-        if(this.jqchecked && !val.includes('0507')){
-          return true
-        }
-      }
+      // let a= this.insureList.find(e=>e.kindName=='机动车损失险').amount
+
+      // if(val && val.length>0){
+      //   if(this.jqchecked && !val.includes('0507')){
+      //     return true
+      //   }
+      //   if(this.sychecked && this.insureList.find(e=>e.kindName=='机动车损失险').amount=='1' && !val.includes('A')){
+      //     return true
+      //   }
+      // }
     },
    async obtainProtocol(data) {
       let res={}