linweizeng 3 лет назад
Родитель
Сommit
16286241ba

+ 17 - 0
src/business/platform/org/employee/dialog.vue

@@ -13,6 +13,9 @@
       <ibps-selector-panel
         ref="panel"
         v-bind="scope"
+        :orgAddId="orgAddId"
+        :orgAddIndex="orgAddIndex"
+        :orgAddList="orgAddList"
         :party-type-id="partyTypeId"
         :seeting-search-party-type="seetingSearchPartyType"
         :current-org-id="currentOrgId"
@@ -37,6 +40,20 @@ export default {
     IbpsSelectorPanel
   },
   props: {
+    orgAddIndex: {
+      type: String,
+      default: '',
+    },
+    orgAddId:{
+        type: String,
+      default: '',
+    },
+    orgAddList:{
+        type: Array,
+        default: ()=>{
+            return []
+        }
+    },
     className: String,
     filter: {
       type: Array,

+ 5 - 1
src/business/platform/org/employee/mixins/panelTree.js

@@ -183,7 +183,11 @@ export default {
       }
       getOrgTreeData(params).then(res => {
         this.loadingTree = false
-        const arr = JSON.parse(JSON.stringify(res.data))
+        let arr = JSON.parse(JSON.stringify(res.data))
+        //筛选客户 不要了
+        if(arr[0].id != '0' && this.orgAddIndex == 'qita'){
+            arr = arr.filter(item => item.id !== '1041786072788369408')
+        }
         let treeData
         if (this.$utils.isNotEmpty(this.isSuperInitTree)) {
           if (!this.isSuperInitTree.initNode && node.level !== 0) {

+ 20 - 2
src/business/platform/org/employee/panel.vue

@@ -124,7 +124,21 @@ export default {
     isSuperInitTree: { // 是否为超管初始化树类型数据
       type: Object,
       default: () => {}
-    }
+    },
+    orgAddIndex: {
+      type: String,
+      default: '',
+    },
+    orgAddId:{
+        type: String,
+      default: '',
+    },
+    orgAddList:{
+        type: Array,
+        default: ()=>{
+            return []
+        }
+    },
   },
   data() {
     return {
@@ -132,7 +146,7 @@ export default {
       dialogFormVisible: false, // 弹窗
       editId: '',
       title: '更多查询条件',
-      partyTypeOptions: this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions : partyTypeOptions,
+      partyTypeOptions: this.orgAddIndex === 'qita'? this.orgAddList : this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions : partyTypeOptions,
       statusOptions: statusOptions,
       genderOptions: genderOptions,
       partyType: this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions[0].value : 'org',
@@ -341,6 +355,10 @@ export default {
       // if (this.$utils.isNotEmpty(this.currentOrgId)) {
       //   params['orgId'] = this.partyId || this.currentOrgId
       // }
+      //筛选客户不要了
+      if(this.orgAddIndex=='qita' && this.partyId=='' && this.partyType == 'org'){
+        params['orgId'] = this.orgAddId
+      }
       return ActionUtils.formatParams(
         params,
         this.pagination,

+ 17 - 0
src/business/platform/org/employee/selector.vue

@@ -8,6 +8,9 @@
     />
     <!-- 选择器 -->
     <ibps-employee-selector-dialog
+      :orgAddId="orgAddId"
+      :orgAddIndex="orgAddIndex"
+      :orgAddList="orgAddList"
       :visible="selectorVisible"
       :value="selectorValue"
       :multiple="multiple"
@@ -43,6 +46,20 @@ export default {
   },
   mixins: [emitter],
   props: {
+    orgAddIndex: {
+      type: String,
+      default: '',
+    },
+    orgAddId:{
+        type: String,
+      default: '',
+    },
+    orgAddList:{
+        type: Array,
+        default: ()=>{
+            return []
+        }
+    },
     className: String,
     partyTypeId: [String, Number],
     currentOrgId: [String, Number],

+ 19 - 11
src/views/platform/bpmn/bpmAgent/edit.vue

@@ -1,7 +1,7 @@
 <template>
     <el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body class="bpmn-agent-dialog" width="80%" top="10vh" @open="getFormData" @close="closeDialog">
         <el-form ref="agentForm" v-loading="dialogLoading" :element-loading-text="$t('common.loading')" :model="bpmAgent" :rules="rules" :label-width="formLabelWidth" @submit.native.prevent>
-            <el-image style="width: 400px; height: 500px;margin-left: 100px" :src="url" :preview-src-list="srcList"> </el-image>
+            <el-image style="width: 400px; height: 500px; margin-left: 100px" :src="url" :preview-src-list="srcList"> </el-image>
             <el-form-item label="标题:" prop="title">
                 <el-input v-if="!readonly" v-model="bpmAgent.title" />
                 <span v-else>{{ bpmAgent.title }}</span>
@@ -23,7 +23,7 @@
                 </el-col>
             </el-row>
             <el-form-item label="委托人:" prop="delegatorId">
-                <ibps-employee-selector v-if="!readonly" v-model="bpmAgent.delegatorId" @callback="callbackDelegatorrInfo" />
+                <ibps-employee-selector v-if="!readonly" v-model="bpmAgent.delegatorId" :orgAddId="orgAddId" :orgAddIndex="orgAddIndex" :orgAddList="orgAddList" @callback="callbackDelegatorrInfo" />
                 <span v-else>{{ bpmAgent.delegatorName }}</span>
             </el-form-item>
             <el-row>
@@ -43,7 +43,7 @@
 
             <!-- 全部代理 || 部分代理 -->
             <el-form-item v-if="bpmAgent.agentType === 'all' || bpmAgent.agentType === 'part'" label="代理人:" prop="agenterId">
-                <ibps-employee-selector v-if="!readonly" v-model="bpmAgent.agenterId" @callback="callbackAgenterInfo" />
+                <ibps-employee-selector v-if="!readonly" v-model="bpmAgent.agenterId" :orgAddId="orgAddId" :orgAddIndex="orgAddIndex" :orgAddList="orgAddList" @callback="callbackAgenterInfo" />
                 <span v-else>{{ bpmAgent.agenterName }}</span>
             </el-form-item>
 
@@ -182,7 +182,15 @@ export default {
                 { key: 'cancel' }
             ],
             url: '',
-            srcList: []
+            srcList: [],
+            orgAddIndex: 'qita',
+            orgAddId: '1040706288339648512,1055070808143036416,1040707811132047360,1040707841519779840',
+            orgAddList: [
+                {
+                    value: 'org',
+                    label: '机构'
+                }
+            ]
         }
     },
     computed: {
@@ -392,10 +400,10 @@ export default {
             this.conditionDialogVisible = true
         },
 
-        getImage(){
+        getImage() {
             let sql = `select * from t_dlpz order by create_time_ desc LIMIT 1`
-            curdPost('sql', sql).then(res => {
-                if(res.state == 200){
+            curdPost('sql', sql).then((res) => {
+                if (res.state == 200) {
                     let datas = res.variables.data
                     let image = JSON.parse(datas[0].tu_pian_)
                     let id = image[0].id
@@ -403,11 +411,11 @@ export default {
                 }
             })
         },
-        getUrl(id){
+        getUrl(id) {
             let sql1 = `select nei_rong_ from t_ipcc where id_ = '1'`
             let sql2 = `select FILE_PATH_ from ibps_file_attachment where ID_ = '${id}'`
-            Promise.all([curdPost('sql', sql1), curdPost('sql', sql2)]).then(([res1,res2]) => {
-                if(res1.state == 200 && res2.state == 200){
+            Promise.all([curdPost('sql', sql1), curdPost('sql', sql2)]).then(([res1, res2]) => {
+                if (res1.state == 200 && res2.state == 200) {
                     let datas1 = res1.variables.data
                     let datas2 = res2.variables.data
                     let ip = datas1[0].nei_rong_
@@ -436,7 +444,7 @@ export default {
 </style>
 
 <style scoped>
-.imageListClass{
+.imageListClass {
     display: flex;
     justify-content: center;
 }

+ 219 - 232
src/views/platform/bpmn/bpmAgent/list.vue

@@ -1,38 +1,12 @@
 <template>
-  <div class="main-container">
-    <ibps-crud
-      ref="crud"
-      :height="height"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :pagination="pagination"
-      :loading="loading"
-      :index-row="false"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @pagination-change="handlePaginationChange"
-    >
-      <template slot="delegatorId">
-        <ibps-employee-selector
-          :value="searchDelegatorId"
-          style="width:200px;"
-          @input="getDelegatorId"
-        />
-      </template>
-    </ibps-crud>
-    <edit
-      :id="editId"
-      :title="title"
-      :visible="dialogFormVisible"
-      :readonly="readonly"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-  </div>
+    <div class="main-container">
+        <ibps-crud ref="crud" :height="height" :data="listData" :toolbars="listConfig.toolbars" :search-form="listConfig.searchForm" :pk-key="pkKey" :columns="listConfig.columns" :row-handle="listConfig.rowHandle" :pagination="pagination" :loading="loading" :index-row="false" :displayField="title" @action-event="handleAction" @sort-change="handleSortChange" @pagination-change="handlePaginationChange">
+            <template slot="delegatorId">
+                <ibps-employee-selector :value="searchDelegatorId" style="width: 200px" @input="getDelegatorId" />
+            </template>
+        </ibps-crud>
+        <edit :id="editId" :title="title" :visible="dialogFormVisible" :readonly="readonly" @callback="search" @close="(visible) => (dialogFormVisible = visible)" />
+    </div>
 </template>
 
 <script>
@@ -44,210 +18,223 @@ import { statusOptions, agentTypeOptions } from './constants'
 import Edit from './edit'
 
 export default {
-  components: {
-    IbpsEmployeeSelector,
-    Edit
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      dialogFormVisible: false, // 弹窗
-      editId: '', // 编辑dialog需要使用
-      readonly: false, // 是否只读
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
+    components: {
+        IbpsEmployeeSelector,
+        Edit
+    },
+    mixins: [FixHeight],
+    data() {
+        return {
+            dialogFormVisible: false, // 弹窗
+            editId: '', // 编辑dialog需要使用
+            readonly: false, // 是否只读
+            pkKey: 'id', // 主键  如果主键不是pk需要传主键
 
-      searchDelegatorId: '',
-      title: '',
-      loading: true,
-      height: document.clientHeight,
+            searchDelegatorId: '',
+            title: '事务代理记录列表',
+            loading: true,
+            height: document.clientHeight,
 
-      listData: [],
-      pagination: {},
-      sorts: {},
-      listConfig: {
-        toolbars: [
-          {
-            key: 'search'
-          },
-          {
-            key: 'add'
-          },
-          {
-            key: 'edit'
-          },
-          {
-            key: 'remove'
-          }
-        ],
-        searchForm: {
-          forms: [
-            { prop: 'Q^TITLE_^SL', label: '标题' },
-            {
-              prop: 'Q^DELEGATOR_ID_^S',
-              label: '委托人',
-              fieldType: 'slot',
-              slotName: 'delegatorId'
-            }, {
-              prop: 'Q^IS_ENABLED_^S',
-              label: '是否启用',
-              fieldType: 'select',
-              options: statusOptions
-            }, {
-              prop: 'Q^AGENT_TYPE_^S',
-              label: '代理类型',
-              fieldType: 'select',
-              options: agentTypeOptions
-            }
-          ]
-        },
-        // 表格字段配置
-        columns: [
-          { prop: 'title', label: '标题' },
-          { prop: 'delegatorName', label: '委托人' },
-          { prop: 'agenterName', label: '代理人' },
-          { prop: 'isEnabled', label: '是否启动', tags: statusOptions },
-          { prop: 'effectiveTime', label: '生效时间', sortable: 'custom' },
-          { prop: 'expiryTime', label: '失效时间', sortable: 'custom' },
-          { prop: 'agentType', label: '代理类型', tags: agentTypeOptions }
-        ],
-        rowHandle: {
-          actions: [{
-            key: 'edit'
-          }, {
-            key: 'enabled',
-            label: '启用',
-            icon: 'ibps-icon-toggle-on',
-            hidden: (rowData, index) => {
-              return rowData.isEnabled === 'enabled'
+            listData: [],
+            pagination: {},
+            sorts: {},
+            listConfig: {
+                toolbars: [
+                    {
+                        key: 'search'
+                    },
+                    {
+                        key: 'add'
+                    },
+                    {
+                        key: 'edit'
+                    },
+                    {
+                        key: 'remove'
+                    }
+                ],
+                searchForm: {
+                    forms: [
+                        // { prop: 'Q^TITLE_^SL', label: '标题' },
+                        {
+                            //agenterId
+                            // prop: 'Q^DELEGATOR_ID_^S',
+                            prop: 'Q^AGENTER_ID_^S',
+                            label: '代理人',
+                            fieldType: 'slot',
+                            slotName: 'delegatorId'
+                        },
+                        {
+                            prop: 'Q^IS_ENABLED_^S',
+                            label: '是否启用',
+                            fieldType: 'select',
+                            options: statusOptions
+                        },
+                        // {
+                        //     prop: 'Q^AGENT_TYPE_^S',
+                        //     label: '代理类型',
+                        //     fieldType: 'select',
+                        //     options: agentTypeOptions
+                        // }
+                    ]
+                },
+                // 表格字段配置
+                columns: [
+                    { prop: 'title', label: '标题' },
+                    { prop: 'delegatorName', label: '委托人' },
+                    { prop: 'agenterName', label: '代理人' },
+                    { prop: 'isEnabled', label: '是否启用', tags: statusOptions },
+                    { prop: 'effectiveTime', label: '生效时间', sortable: 'custom' },
+                    { prop: 'expiryTime', label: '失效时间', sortable: 'custom' },
+                    { prop: 'agentType', label: '代理类型', tags: agentTypeOptions }
+                ]
+                // rowHandle: {
+                //   actions: [{
+                //     key: 'edit'
+                //   }, {
+                //     key: 'enabled',
+                //     label: '启用',
+                //     icon: 'ibps-icon-toggle-on',
+                //     hidden: (rowData, index) => {
+                //       return rowData.isEnabled === 'enabled'
+                //     }
+                //   }, {
+                //     key: 'disabled',
+                //     label: '禁用',
+                //     icon: 'ibps-icon-toggle-off',
+                //     hidden: (rowData, index) => {
+                //       return rowData.isEnabled === 'disabled'
+                //     }
+                //   }, {
+                //     key: 'remove'
+                //   }, {
+                //     key: 'detail'
+                //   }]
+                // }
             }
-          }, {
-            key: 'disabled',
-            label: '禁用',
-            icon: 'ibps-icon-toggle-off',
-            hidden: (rowData, index) => {
-              return rowData.isEnabled === 'disabled'
-            }
-          }, {
-            key: 'remove'
-          }, {
-            key: 'detail'
-          }]
         }
-      }
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    getDelegatorId(value) {
-      this.searchDelegatorId = value
-    },
-    // 加载数据
-    loadData() {
-      this.loading = true
-      queryPageList(this.getSearcFormData()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      params['Q^DELEGATOR_ID_^S'] = this.searchDelegatorId
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
-    },
-    /**
-     * 查询
-     */
-    search() {
-      this.loadData()
-    },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'add':// 添加
-          this.handleEdit()
-          this.title = '添加流程代理'
-          break
-        case 'edit':// 编辑
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.handleEdit(id)
-            this.title = '编辑流程代理'
-          }).catch(() => { })
-          break
-        case 'detail':// 明细
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.handleEdit(id, true)
-            this.title = '流程代理明细'
-          }).catch(() => { })
-          break
-        case 'remove':// 删除
-          ActionUtils.removeRecord(selection).then((ids) => {
-            this.handleRemove(ids)
-          }).catch(() => { })
-          break
-        case 'enabled':// 启用
-          this.handleSetEnable(data.id, 'enabled')
-          break
-        case 'disabled':// 禁用
-          this.handleSetEnable(data.id, 'disabled')
-          break
-        default:
-          break
-      }
-    },
-    /**
-     * 处理编辑。
-     */
-    handleEdit(id = '', readonly = false) {
-      this.editId = id
-      this.readonly = readonly
-      this.dialogFormVisible = true
     },
-    /**
-     * 处理删除
-     */
-    handleRemove(ids) {
-      remove({ ids: ids }).then(response => {
-        ActionUtils.removeSuccessMessage()
-        this.search()
-      }).catch(() => {})
+    created() {
+        this.loadData()
     },
-    handleSetEnable(id, status) {
-      const params = { 'id': id, 'isEnabled': status }
-      setEnable(params).then(response => {
-        ActionUtils.removeSuccessMessage(response.message)
-        this.search()
-      }).catch(() => {})
+    methods: {
+        getDelegatorId(value) {
+            this.searchDelegatorId = value
+        },
+        // 加载数据
+        loadData() {
+            this.loading = true
+            queryPageList(this.getSearcFormData())
+                .then((response) => {
+                    ActionUtils.handleListData(this, response.data)
+                    this.loading = false
+                })
+                .catch(() => {
+                    this.loading = false
+                })
+        },
+        /**
+         * 获取格式化参数
+         */
+        getSearcFormData() {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            params['Q^DELEGATOR_ID_^S'] = this.searchDelegatorId
+            return ActionUtils.formatParams(params, this.pagination, this.sorts)
+        },
+        /**
+         * 处理分页事件
+         */
+        handlePaginationChange(page) {
+            ActionUtils.setPagination(this.pagination, page)
+            this.loadData()
+        },
+        /**
+         * 处理排序
+         */
+        handleSortChange(sort) {
+            ActionUtils.setSorts(this.sorts, sort)
+            this.loadData()
+        },
+        /**
+         * 查询
+         */
+        search() {
+            this.loadData()
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction(command, position, selection, data) {
+            switch (command) {
+                case 'search': // 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'add': // 添加
+                    this.handleEdit()
+                    this.title = '事务代理设置'
+                    break
+                case 'edit': // 编辑
+                    ActionUtils.selectedRecord(selection)
+                        .then((id) => {
+                            this.handleEdit(id)
+                            this.title = '编辑流程代理'
+                        })
+                        .catch(() => {})
+                    break
+                case 'detail': // 明细
+                    ActionUtils.selectedRecord(selection)
+                        .then((id) => {
+                            this.handleEdit(id, true)
+                            this.title = '流程代理明细'
+                        })
+                        .catch(() => {})
+                    break
+                case 'remove': // 删除
+                    ActionUtils.removeRecord(selection)
+                        .then((ids) => {
+                            this.handleRemove(ids)
+                        })
+                        .catch(() => {})
+                    break
+                case 'enabled': // 启用
+                    this.handleSetEnable(data.id, 'enabled')
+                    break
+                case 'disabled': // 禁用
+                    this.handleSetEnable(data.id, 'disabled')
+                    break
+                default:
+                    break
+            }
+        },
+        /**
+         * 处理编辑。
+         */
+        handleEdit(id = '', readonly = false) {
+            this.editId = id
+            this.readonly = readonly
+            this.dialogFormVisible = true
+        },
+        /**
+         * 处理删除
+         */
+        handleRemove(ids) {
+            remove({ ids: ids })
+                .then((response) => {
+                    ActionUtils.removeSuccessMessage()
+                    this.search()
+                })
+                .catch(() => {})
+        },
+        handleSetEnable(id, status) {
+            const params = { id: id, isEnabled: status }
+            setEnable(params)
+                .then((response) => {
+                    ActionUtils.removeSuccessMessage(response.message)
+                    this.search()
+                })
+                .catch(() => {})
+        }
     }
-  }
 }
 </script>