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

+ 2 - 2
config/dev.env.js

@@ -17,8 +17,8 @@ module.exports = merge(prodEnv, {
   // BASE_URL: '"http://192.168.1.101:8080/"',
   // BASE_URL: '"http://192.168.0.250:8080/"',//
   // BASE_URL: '"http:///192.168.0.103:8080/"',//霍续亮
-  BASE_URL: '"http://192.168.0.52:8080/"',//贺礼霄
-  // BASE_URL: '"http:///192.168.0.55:8080/"',// 董鑫
+  // BASE_URL: '"http://192.168.0.52:8080/"',//贺礼霄
+  BASE_URL: '"http:///192.168.0.55:8080/"',// 董鑫
   CONSOLE_BASE_URL: '"http://localhost:8080/"', //控制台测试服务器
   // CONSOLE_BASE_URL: '"https://test.baoxianzhanggui.com/console-api"' //控制台正式服务器
   APP_BASE_URL: '"https://pre.baoxianzhanggui.com/web-api"',    // app打包上传地址

+ 61 - 0
src/components/Dialog/index.vue

@@ -0,0 +1,61 @@
+<template>
+    <el-dialog :title="title" :width="width" :visible.sync="dialogVisible" :close-on-click-modal="false"
+      :before-close="handleDialogBefore" @close="closeDialog" v-dialogDrag>
+        <slot name="content"></slot>
+       
+        <span slot="footer" class="dialog-footer">
+            <slot name="footer">
+        </slot>
+        </span>
+
+     
+
+      </el-dialog>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            dialogVisible:false
+        }
+    },
+    props:{
+        title:{
+            type:String,
+            default:''
+        },
+        width:{
+            type:String,
+            default:'40%'
+        },
+    },
+    methods:{
+        open(){
+            this.dialogVisible=true
+        },
+        handleDialogBefore(done){
+            this.$emit('handleDialogBefore',done)
+        },
+        close(){
+            this.dialogVisible=false
+        },
+        closeDialog(){
+            this.$emit('close')
+
+        }   
+    }
+}
+</script>
+<style scoped lang="scss">
+/deep/{
+
+.el-dialog__header{
+    border: 1px solid #eee;
+    text-align: center;
+    font-weight: 600;
+font-size: 18px;
+color: #333333;
+}
+}
+
+</style>

+ 8 - 0
src/http/moudules/dept.js

@@ -369,3 +369,11 @@ export const sysUserLinkDeptInternalAgentFindAllUserList = (data) => {
         data
     })
 }
+// 只有五级、六级的机构树
+export const queryTreeList = (data) => {
+    return axios({
+        url: '/dept/queryTreeList',
+        method: 'post',
+        data
+    })
+}

+ 14 - 11
src/views/AgreementManage/ChannelCost.vue

@@ -239,7 +239,7 @@ export default {
                 optBtns: [
                     {
                         type: "primary",
-                        label: "设置费",
+                        label: "设置费",
                         click: (row, index) => {
                             return this.setFees(row)
                         },
@@ -458,16 +458,7 @@ export default {
         this.$api.dept.findDeptTree("9", "").then((res) => {
             this.treedata = res.data;
         });
-        this.$api.sys.sysChannelGradeList().then((res) => {
-            if (res.code == 200) {
-                res.data.forEach(val => {
-                    val.gradeId = val.id
-                    val.gradeName = val.name
-                    val.id = null
-                })
-                this.channelFeesData = res.data;
-            }
-        });
+      
 
     },
     methods: {
@@ -556,6 +547,17 @@ export default {
             this.getList(data);
         },
         add() {
+            this.queryForm={}
+            this.$api.sys.sysChannelGradeList().then((res) => {
+            if (res.code == 200) {
+                res.data.forEach(val => {
+                    val.gradeId = val.id
+                    val.gradeName = val.name
+                    val.id = null
+                })
+                this.channelFeesData = res.data;
+            }
+        });
             this.dialogVisibleadd = true
             this.dialogTitle = '新增'
         },
@@ -648,6 +650,7 @@ export default {
                         this.channelFeesData = res.data.sysChannelGroupInfos
                         this.dialogTitle = '编辑'
                         this.dialogVisibleadd = true
+                        res.data.enabled+=''
                         this.queryForm = res.data
 
                     } else {

+ 20 - 0
src/views/FinancialManagement/AddInvestment.vue

@@ -35,6 +35,16 @@ export default {
     name: "policyImport",
     components: { templateTable, templateForm },
     data() {
+        var validecimalRegex = (rule, value, callback) => {
+            let reg = /[^0-1]?\d*/;
+            if (!value) {
+                callback(new Error("请输入比例"));
+            } else if (reg.test(value)) {
+                callback(new Error("只能输入数字且不能大于1!!!"));
+            } else {
+                // callback(new Error("只能输入数字且不能大于1!!!"));
+            }
+      };
         return {
             imageUrl: '',
             dialogVisibleradio: false,
@@ -44,6 +54,9 @@ export default {
             dialogVisibleadd: false,
             labelWidth: '150px',
             rules: {
+                // jqCostsProportion: [
+                //     { required: true,  validator: validecimalRegex,trigger: 'blur' },
+                // ],
                 jqCostsProportion: [
                     { required: true, message: '请输入加投比例(交强)', trigger: 'blur' },
                 ],
@@ -408,6 +421,13 @@ export default {
 
     },
     methods: {
+        validateDecimal(event) {
+      // 使用正则表达式来判断输入内容是否为小数
+            const regex = /^[\d]*\.?[\d]*$/;
+            if (!regex.test(event.target.value)) {
+                this.decimalValue = event.target.value.replace(/[^0-9.]/g, '');
+            }
+        },
         selectionChange(val, ref) {
             if (val.length!==0) {
                 if (val.find(e=>e.settleStatus == 0) ) {

+ 28 - 19
src/views/PeopleManage/Institutional.vue

@@ -31,10 +31,14 @@
       </Split>
     </el-main>
     <!-- 新增修改界面 -->
-    <el-dialog :title="dialogTitle" width="40%" :visible.sync="dialogVisible" :close-on-click-modal="false"
-      :before-close="handleDialogBefore" @close="closeDialog" v-dialogDrag>
-      <el-form :model="formData" :rules="rules" ref="formData" :inline="true" label-width="110px" size="small">
-      <div class="info-title" style="padding-top: 0">机构信息</div>
+    <!-- <el-dialog :title="dialogTitle" width="40%" :visible.sync="dialogVisible" :close-on-click-modal="false"
+      :before-close="handleDialogBefore" @close="closeDialog" v-dialogDrag> -->
+
+      <Dialog ref="Dialog" :title="dialogTitle" @handleDialogBefore="handleDialogBefore">
+        <template slot="content">
+
+      <el-form  :model="formData" :rules="rules" ref="formData" :inline="true" label-width="110px" size="small">
+      <div class="info-title" >机构信息</div>
         <el-row>
           <el-col :span="12">
             <el-form-item label="机构编码" prop="deptId">
@@ -113,21 +117,28 @@
           </el-col>
         </el-row>
       </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+    </template>
+
+      <template slot="footer" >
+        <el-button size="small" @click="$refs.Dialog.close()">取 消</el-button>
         <el-button type="primary" size="small" @click="submitForm">提交</el-button>
-      </span>
-    </el-dialog>
+      </template>
+
+    <!-- </el-dialog> -->
+  </Dialog>
+
   </div>
 </template>
 
 <script>
 import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
 import templateTable from "../../components/TemplateTable/index.vue";
+import Dialog from "../../components/Dialog/index.vue";
 export default {
   components: {
     KtButton,
     templateTable,
+    Dialog
   },
   data() {
     return {
@@ -310,14 +321,15 @@ export default {
         this.sysPartnerOption = res.data
       })
 
-      this.dialogTitle = "新增";
+      this.dialogTitle = "新增工作室信息";
       this.formData = {
         deptName: this.currentTreeNode.name,
         deptId: this.currentTreeNode.id,
         comlevel: this.currentTreeNode.comlevel,
         source: this.currentTreeNode.managementSource,
       }
-      this.dialogVisible = true;
+      // this.dialogVisible = true;
+      this.$refs.Dialog.open()
       if (this.$refs["formData"]) {
         this.$refs["formData"].resetFields();
       }
@@ -403,8 +415,10 @@ export default {
         .then((res) => {
           if (res.code == 200) {
             this.isdisabled = res.data.suggestId ? true : false
-            this.dialogTitle = "编辑";
-            this.dialogVisible = true
+            this.dialogTitle = "编辑工作室信息";
+            // this.dialogVisible = true
+      this.$refs.Dialog.open()
+
             this.formData = res.data
           }
         });
@@ -435,11 +449,6 @@ export default {
         })
         .catch((_) => { });
     },
-    closeDialog() {
-      // 清空数据
-      this.deptInfo = {};
-      this.dialogVisible = false;
-    },
     // 提交
     submitForm() {
       this.$refs.formData.validate((valid) => {
@@ -454,7 +463,7 @@ export default {
                       message: "保存成功",
                       type: "success",
                     });
-                    this.dialogVisible = false;
+                    this.$refs.Dialog.close()
                     this.$refs["formData"].resetFields();
                     this.findPage();
                   } else {
@@ -473,7 +482,7 @@ export default {
                       message: "编辑成功",
                       type: "success",
                     });
-                    this.dialogVisible = false;
+                    this.$refs.Dialog.close()
                     this.$refs["formData"].resetFields();
                     this.findPage();
                   } else {

+ 2 - 0
src/views/PeopleManage/PcLoginRecord.vue

@@ -289,6 +289,8 @@ export default {
   methods: {
     historicRecords(row) {
       this.rowId = row.userId
+      this.isCollapse=false
+      this.infoWindowVisible=true
       this.detail()
     },
     handHistory(tab, event) {

+ 2 - 0
src/views/PeopleManage/UserMap.vue

@@ -285,6 +285,8 @@ export default {
   methods: {
     historicRecords(row) {
       this.rowId = this.positionType==1? row.id:row.userId
+      this.isCollapse=false
+      this.infoWindowVisible=true
       this.detail()
     },
     handHistory(tab, event) {

+ 139 - 69
src/views/Sys/ChannelGrouping.vue

@@ -13,11 +13,33 @@
                 <el-button type="primary" size="small" @click="sumbit">确 定</el-button>
             </span>
         </el-dialog>
-        <el-dialog title="授权机构" width="25%" :visible.sync="dialogVisible">
-                <el-tree ref="tree" :data="treedata" accordion :props="defaultProps" show-checkbox node-key="id" 
-              :default-checked-keys="treekeys"   @check-change="treechange"  
-              :default-expand-all="expandshow" class="stafftree">
-            </el-tree>
+        <el-dialog title="授权机构" width="45%" :visible.sync="dialogVisible">
+            <el-row :gutter="20">
+                <el-col :span="12">
+                    <div >
+                       <span>工号:</span> <el-input clearable style="width: 220px;" placeholder="请输入工号" size="small" v-model="treeSeachId">
+                        </el-input>
+                    </div>
+                    <div style="margin: 10px 0;">
+                        <span>名称:</span><el-input clearable style="width: 220px;" size="small" placeholder="请输入六级机构名称" v-model="treeSeachname">
+                        </el-input>
+                        <el-button type="primary" size="small" @click="seachTree">搜索</el-button>
+                    </div>
+                    <div  style="height: 480px;overflow-y: auto;">
+                    <el-tree ref="tree" :data="treedata" accordion :props="defaultProps" show-checkbox node-key="id"
+                        :default-checked-keys="treekeys" @check-change="treechange" :default-expand-all="expandshow"
+                        class="stafftree">
+                    </el-tree>
+                </div>
+
+                </el-col>
+                <el-col :span="11" :offset="1" style="height: 500px;overflow-y: auto;">
+                    <h4>已选中机构名称</h4>
+                    <div v-for="val in treedatatransfer" :key="val.id">
+                        <p>{{ val }}</p>
+                    </div>
+                </el-col>
+            </el-row>
             <span slot="footer" class="dialog-footer">
                 <el-button size="small" @click="dialogVisible = false">取 消</el-button>
                 <el-button type="primary" size="small" @click="sumbitInstitution">确 定</el-button>
@@ -32,8 +54,14 @@ import templateForm from "@/components/TemplateForm/index.vue";
 export default {
     name: "policyImport",
     components: { templateTable, templateForm },
+    watch: {
+        filterText(val) {
+            this.$refs.tree.filter(val);
+        }
+    },
     data() {
         return {
+            treedatatransfer: [],
             dept: [],
             name: '',
             dialogTitle: '新增',
@@ -75,7 +103,7 @@ export default {
                         type: "text"
                     },
                     {
-                        prop: "updateBy",
+                        prop: "createBy",
                         label: "操作人",
                         type: "text"
                     },
@@ -87,7 +115,7 @@ export default {
                         type: "primary",
                         label: "授权机构",
                         click: (row, index) => {
-                            return this.uthorizedAgency(row) 
+                            return this.uthorizedAgency(row)
                         },
                     },
                     {
@@ -109,71 +137,113 @@ export default {
             },
             treedata: [], //授权结构树
             defaultProps: {
-        //自定义参数
-        children: "children",
-        label: "name",
-      },
-      treekeys: [],
-      expandshow: false,
+                //自定义参数
+                children: "children",
+                label: "name",
+            },
+            treekeys: [],
+            expandshow: false,
+            treeSeachId: '',
+            treeSeachname: '',
         };
     },
     created() {
         this.getList();
-        this.$api.dept.findDeptTree("9", "").then((res) => {
+      
+    },
+    methods: {
+        treeListFun(data){
+            this.$api.dept.queryTreeList(data).then((res) => {
             this.treedata = res.data;
             this.setDisabled(this.treedata)
         });
-    },
-    methods: {
-        uthorizedAgency(row){
-             this.rowId=row.id
+        },
+        seachTree(){
+            let data={
+                id:this.treeSeachId,
+                name:this.treeSeachname
+            }
+            this.treeListFun(data)
+        },
+        getNodeLabelById(id) {
+            let label = null;
+            const findNode = (nodes) => {
+                nodes.forEach(node => {
+                    if (node.id === id) {
+                        label = node.name;
+                        return;
+                    }
+                    if (node.children && node.children.length > 0) {
+                        findNode(node.children);
+                    }
+                });
+            };
+            findNode(this.treedata);
+            return label;
+        },
+        uthorizedAgency(row) {
+            this.treeListFun({
+                "id": "",
+                "name": "",
+            })
+            this.rowId = row.id
+            this.treedatatransfer = []
+            this.treeSeachId=""
+            this.treeSeachname=""
             this.$api.sys
-                        .queryRelationList(row.id)
-                        .then(res => {
-                            if (res.code == 200) {
-                                this.dialogVisible=true
-                                setTimeout(()=>{
-                                    this.dept=res.data
-                                    this.$refs.tree.setCheckedKeys(res.data);
-                                },500)
-                               
-                            } else {
-                                this.$message.error(res.msg);
-                            }
-                        });
+                .queryRelationList(row.id)
+                .then(res => {
+                    if (res.code == 200) {
+                        this.dialogVisible = true
+                        setTimeout(() => {
+                            this.dept = res.data
+                            this.$refs.tree.setCheckedKeys(res.data);
+                            res.data.forEach(e => {
+                                    this.treedatatransfer.push(this.getNodeLabelById(e))
+                            })
+                        }, 500)
+
+                    } else {
+                        this.$message.error(res.msg);
+                    }
+                });
         },
-         //获取选中节点
-    treechange(item, node, self) {
-        if(item.children.length==0){
-            if (node === true) {
-        this.dept.push(item.id)
 
-      } else {
-        let index = this.dept.indexOf(this.dept.filter(e=>e==item.id)[0]);
-        if (index !== -1) {
-            this.dept.splice(index, 1);
-        }
-      }
-        }
-    
-    },
-    //  向有children的节点上增加disabled属性
-    setDisabled(treeData) {
+        //获取选中节点
+        treechange(item, node, self) {
+            if (item.children.length == 0) {
+                if (node === true) {
+                    this.dept.push(item.id)
+                    this.treedatatransfer.push(item.name)
+                } else {
+                    let index = this.dept.indexOf(this.dept.filter(e => e == item.id)[0]);
+                    let name = this.treedatatransfer.indexOf(this.treedatatransfer.filter(e => e == item.name)[0]);
+                    if (index !== -1) {
+                        this.dept.splice(index, 1);
+                        this.treedatatransfer.splice(name, 1);
+                    }
+                }
+            }
+
+        },
+        //  向有children的节点上增加disabled属性
+        setDisabled(treeData) {
             if (treeData) {
                 treeData.forEach(item => {
-                    if (!item.deptType || item.deptType!=='D') {
+                    if (!item.deptType || item.deptType !== 'D' || !item.id.includes('M')) {
                         item.disabled = true
                         this.setDisabled(item.children)
                     }
                 })
             }
- 
+
         },
         // 查询
         handleSearchList(data) {
             this.getList(data);
         },
         add() {
+            this.name=''
             this.dialogVisibleadd = true
             this.dialogTitle = '新增'
         },
@@ -249,18 +319,18 @@ export default {
                     }
                 });
         },
-        sumbitInstitution(){
+        sumbitInstitution() {
             this.$api.sys
-                        .sysChannelauthorized({ areaIdList: this.dept,id:this.rowId })
-                        .then(res => {
-                            if (res.code == 200) {
-                                this.getList();
-                                this.dialogVisible = false
+                .sysChannelauthorized({ areaIdList: this.dept, id: this.rowId })
+                .then(res => {
+                    if (res.code == 200) {
+                        this.getList();
+                        this.dialogVisible = false
 
-                            } else {
-                                this.$message.error(res.msg);
-                            }
-                        });
+                    } else {
+                        this.$message.error(res.msg);
+                    }
+                });
 
         },
         handleTableUpload(row) {
@@ -273,16 +343,16 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-/deep/{
+/deep/ {
     .stafftree {
- 
- // 不可全选样式
- .el-tree-node {
-     .el-checkbox__input.is-disabled {
-         display: none;
-     }
- }
- 
+
+        // 不可全选样式
+        .el-tree-node {
+            .el-checkbox__input.is-disabled {
+                display: none;
+            }
+        }
+
+    }
 }
-} 
 </style>