Browse Source

修改部门查询

dev
caoyizhong 2 years ago
parent
commit
3c1ac70e42
  1. 2
      src/views/activiti/applyHome.vue
  2. 7
      src/views/activiti/form/ProcessUdgetPlan.vue
  3. 112
      src/views/activiti/form/ProcessUdgetPlanForm.vue
  4. 25
      src/views/activiti/todoManage.vue
  5. 27
      src/views/system/DepartUserList.vue
  6. 4
      src/views/system/modules/DeptBaseInfo.vue
  7. 4
      src/views/system/modules/DeptRoleInfo.vue
  8. 6
      src/views/system/modules/DeptUserInfo.vue
  9. 15
      src/views/system/modules/UserModal.vue

2
src/views/activiti/applyHome.vue

@ -387,7 +387,7 @@
},
async chooseProcess(v) {
// console.log("===",v);
console.log("人员信息===",v);
let userInfo = sessionStorage.getItem('USER_INFORMATION');
let res = JSON.parse(userInfo);
// console.log("",res);

7
src/views/activiti/form/ProcessUdgetPlan.vue

@ -3,8 +3,9 @@
<a-tabs style="text-align: center;" >
<a-tab-pane tab="流程正文" key="1" forceRender >
<process-udget-plan-form :isNew="isNew" :processData="processData" :disabled="disabled" @afterSubmit="afterSub" @close="close" :task="task" @passTask="passTask" @backTask="backTask" :hieg="hieg" @loadData="loadData" :isPlanType="isPlanType"
:isSourceCapital="isSourceCapital" :routePlanName="routePlanName" :itemId="itemId"/>
<process-udget-plan-form :isNew="isNew" :processData="processData" :disabled="disabled" @afterSubmit="afterSub" @close="close" :task="task"
@passTask="passTask" @backTask="backTask" :hieg="hieg" @loadData="loadData" :isPlanType="isPlanType" :lead="lead"
:isSourceCapital="isSourceCapital" :routePlanName="routePlanName" :itemId="itemId" :is-buyer-name="isBuyerName"/>
</a-tab-pane>
<a-tab-pane tab="流程节点图" key="2" forceRender>
@ -61,6 +62,8 @@
isSourceCapital:{type: Boolean, default: false, required: false},
routePlanName:{type:String,default:'',required: false},
itemId:{type:String,default:'',required: false},
isBuyerName:{type:Boolean,default:false,required: false},
lead:{type:Boolean,default:false,required: false},
processData:{
type:Object,
default:()=>{return {}},

112
src/views/activiti/form/ProcessUdgetPlanForm.vue

@ -1,7 +1,7 @@
<template>
<a-spin :spinning="confirmLoading" style="height: 680px;padding-top: 10px">
<j-form-container :disabled="formDisabled" style="background-color: #efefef;padding-top: 10px" >
<j-form-container style="background-color: #efefef;padding-top: 10px" >
<!-- 主表单区域 -->
<a-form :form="form" slot="detail">
<a-row>
@ -37,22 +37,22 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['materialType',validatorRules.materialType]"
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol" >
<j-dict-select-tag type="list" v-decorator="['materialType',validatorRules.materialType]" :disabled="formDisabled"
:trigger-change="true" dictCode="material_type"
placeholder="请选择物资类型" @change="elect"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="流程计划" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['processPlan',validatorRules.processPlan]"
<a-form-item label="流程计划" :labelCol="labelCol" :wrapperCol="wrapperCol" >
<j-dict-select-tag type="list" v-decorator="['processPlan',validatorRules.processPlan]" :disabled="formDisabled"
:trigger-change="true" dictCode="process_plan"
placeholder="请选择流程计划"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="需求时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择需求时间" v-decorator="['needTime',validatorRules.needTime]" :trigger-change="true"
<a-form-item label="需求时间" :labelCol="labelCol" :wrapperCol="wrapperCol" >
<j-date placeholder="请选择需求时间" v-decorator="['needTime',validatorRules.needTime]" :trigger-change="true" :disabled="formDisabled"
:show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"/>
</a-form-item>
</a-col>
@ -90,10 +90,22 @@
placeholder="请选择是否需要送检"/>
</a-form-item>
</a-col>
<a-col :span="8" v-if="isBuyerName">
<a-form-item label="采购项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['buyerName',validatorRules.buyerName]" placeholder="请输入采购项目名称"
style="width: 100%"/>
</a-form-item>
</a-col>
<a-col :span="8" v-if="lead">
<a-form-item label="部门签收人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-input v-decorator="['signer',validatorRules.signer]" placeholder="请选择部门签收人" style="width: 100%"/>-->
<j-select-user-by-dep v-decorator="['signer',validatorRules.signer]"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="文件" :labelCol="labelCol3" :wrapperCol="wrapperCol3">
<j-upload v-decorator="['fileId']" :trigger-change="true" style="z-index: 999"></j-upload>
<a-col :span="8" >
<a-form-item label="文件" :labelCol="labelCol3" :wrapperCol="wrapperCol3" >
<j-upload v-decorator="['fileId']" :trigger-change="true" style="z-index: 999" :disabled="formDisabled"></j-upload>
</a-form-item>
</a-col>
@ -200,7 +212,7 @@
const VALIDATE_NO_PASSED = Symbol()
import pick from 'lodash.pick'
import { getAction, httpAction, getCurrentTime, getStringArry, getRecord, downFile } from '@/api/manage'
import { getAction, httpAction, getCurrentTime, getStringArry, getRecord, downFile,putAction } from '@/api/manage'
import { FormTypes, getRefPromise, validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import JFormContainer from '@/components/jeecg/JFormContainer'
@ -215,41 +227,6 @@
import { queryDepartTreeList } from '@api/api'
import { accMul } from '../../../../common/common'
// const columns = [
// {
// title: 'name',
// dataIndex: 'name',
// width: '25%',
// scopedSlots: { customRender: 'name' },
// },
// {
// title: 'age',
// dataIndex: 'age',
// width: '15%',
// scopedSlots: { customRender: 'age' },
// },
// {
// title: 'address',
// dataIndex: 'address',
// width: '40%',
// scopedSlots: { customRender: 'address' },
// },
// {
// title: 'operation',
// dataIndex: 'operation',
// scopedSlots: { customRender: 'operation' },
// },
// ];
// const data = [];
// for (let i = 0; i < 100; i++) {
// data.push({
// key: i.toString(),
// name: `Edrward ${i}`,
// age: 32,
// address: `London Park no. ${i}`,
// });
// }
export default {
name: 'ProcessUdgetPlanForm',
mixins: [JEditableTableMixin],
@ -295,6 +272,8 @@
historyPrice: {},
isHistoryBigId: false,
isIfInspection: false,
isBuyerNames: false,
leads: false,
bigIdMerchandiseNews: [],
bigIdMerchandiseNewsList: [],
labelCol: {
@ -569,6 +548,7 @@
url: {
add: '/hy/processUdgetPlan/add',
edit: '/hy/processUdgetPlan/edit',
queryByIdUpdate: '/hy/processUdgetPlan/queryByIdUpdate',
getSortOrder: '/hy/processUdgetPlan/querySortOrder',
addFromTableApply: '/hy/processUdgetPlan/addFromTableApply',
editFromTableApply: '/hy/processUdgetPlan/editFromTableApply',
@ -600,6 +580,8 @@
sourceCapital: { rules: [{ required: true, message: '请选择资金来源!' }] },
planType: { rules: [{ required: true, message: '请选择采购类型!' }] },
ifInspection: { rules: [{ required: true, message: '请选择是否送检!' }] },
buyerName: { rules: [{ required: true, message: '请输入采购项目名称!' }] },
signer: { rules: [{ required: true, message: '请选择部门签收人!' }] },
processPlan: { rules: [{ required: true, message: '请选择流程计划!' }] },
sort: {
rules: [{ required: true, type: 'number', max: 999999999999, message: '请输入序号!(0 ~ 12个数字)' }
@ -625,6 +607,8 @@
isNew: { type: Boolean, default: false, required: false },
/*是否处理流程*/
task: { type: Boolean, default: false, required: false },
isBuyerName: { type: Boolean, default: false, required: false },
lead: { type: Boolean, default: false, required: false },
/*采购类型*/
isPlanType: { type: Boolean, default: false, required: false },
/*资金来源*/
@ -1293,6 +1277,7 @@
id: r.tableId
}).then((res) => {
if (res.success) {
console.log("??????????????",res.result);
// this.planType = res.result.planType
let formData = res.result
formData.tableName = r.tableName
@ -1319,7 +1304,7 @@
}
}
console.log("qwerqwe..........",this.lead,this.isBuyerName);
this.editAfter()
this.btndisabled = false
} else {
@ -1333,7 +1318,36 @@
},
/*通过审批*/
passTask() {
this.$emit('passTask')
if(this.isBuyerName || this.lead){
this.getAllTable().then(tables => {
return validateFormAndTables(this.form, tables)
}).then( allValues => {
if (typeof this.classifyIntoFormData !== 'function') {
throw this.throwNotFunction('classifyIntoFormData')
}
let formData = this.classifyIntoFormData(allValues)
console.log("1321231313112",formData);
let pre = {
id : formData.id,
}
if(this.isBuyerName){
pre.buyerName= formData.buyerName;
}
if(this.lead){
pre.signer= formData.signer;
}
putAction(this.url.queryByIdUpdate,pre).then(res =>{
if(res.success){
// console.log("");
this.$emit('passTask');
}
})
})
}else{
this.$emit('passTask')
}
},
/*导出world*/
ewrold() {
@ -1569,7 +1583,7 @@
}
console.log(this.data, '数据回显')
let fieldval = pick(this.data, 'id','putUnder', 'planType', 'company', 'createTime', 'departId', 'createBy', 'materialType', 'processPlan', 'needTime', 'sort', 'orderNumber', 'fileId', 'opinion', 'sourceCapital', 'ifDirect', 'ifInspection')
let fieldval = pick(this.data, 'id','putUnder', 'planType', 'company', 'createTime','buyerName','signer', 'departId', 'createBy', 'materialType', 'processPlan', 'needTime', 'sort', 'orderNumber', 'fileId', 'opinion', 'sourceCapital', 'ifDirect', 'ifInspection')
this.$nextTick(() => {
this.assigneesText = this.data.materialType
this.form.setFieldsValue(fieldval)

25
src/views/activiti/todoManage.vue

@ -159,6 +159,8 @@
:actualNumber = "lcModa.actualNumber"
:allotShuNumber = "lcModa.allotShuNumber"
:allotBaoNumber = "lcModa.allotBaoNumber"
:isBuyerName = "lcModa.isBuyerName"
:lead = "lcModa.lead"
@afterSubmit="afterSub"
@passTask="()=>passTask(lcModa.processData)"
@backTask="()=>backTask(lcModa.processData)" :procInstId="lcModa.procInstId"
@ -296,6 +298,8 @@
actualNumber: true,
allotShuNumber: true,
allotBaoNumber: true,
isBuyerName: false,
lead: false,
visible: false,
formComponent: null,
isNew: false,
@ -362,12 +366,9 @@
},
getDataList() {
this.loading = true
console.log('this.searchForm')
console.log(this.searchForm)
this.getAction(this.url.todoList, this.searchForm).then(res => {
this.loading = false
if (res.success) {
console.log(res)
this.data = res.result || []
this.total = this.data.leading
}
@ -531,6 +532,16 @@
if (r.processName === '预算计划采购流程') {
let userInfo = sessionStorage.getItem('USER_INFORMATION')
let res = JSON.parse(userInfo)
if(r.name === '计划经营科'){
// if(r.name === ''){
console.log('-==========执行;11',r);
this.lcModa.isBuyerName = true;
}
if(r.name === '主管领导'){
console.log('-==========执行;11',r);
this.lcModa.lead = true;
}
let param = {}
// param.id = r.procDefId
param.id = r.procInstId
@ -576,6 +587,7 @@
}
}
}
if (r.processName === '物资入库流程') {
let userInfo = sessionStorage.getItem('USER_INFORMATION')
let res = JSON.parse(userInfo)
@ -611,14 +623,17 @@
this.lcModa.isTable=true;
},
passTask(v) {
console.log(v.procInstId, '33333333333333333')
// console.log(v.procInstId, '33333333333333333')
this.lcModa.isBuyerName = false;
this.lcModa.lead = false;
this.modalTaskTitle = '审批通过'
this.form.id = v.id
this.form.procInstId = v.procInstId
this.form.priority = v.priority
this.form.type = 0
this.modalTaskVisible = true
this.userLoading = true
this.userLoading = true;
// this.getAction(this.url.getNextNode, { procDefId: v.procDefId, currActId: v.key ,procInstId:v.procInstId}).then(res => {
// this.userLoading = false
// if (res.success) {

27
src/views/system/DepartUserList.vue

@ -6,7 +6,8 @@
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入部门名称"/>
<!-- -->
<template v-if="userIdentity === '2' && departTree.length>0">
<template v-if=" departTree.length>0">
<!-- <template v-if="userIdentity === '2' && departTree.length>0">-->
<!--组织机构-->
<a-tree
@ -22,7 +23,7 @@
/>
</template>
<div style="margin-top: 24px;" v-else-if="userIdentity === '2' && departTree.length==0">
<div style="margin-top: 24px;" v-else-if="departTree.length==0">
<h3><span>您的部门下暂无有效部门信息</span></h3>
</div>
<div style="margin-top: 24px;" v-else><h3>普通员工暂此权限</h3></div>
@ -33,13 +34,13 @@
<a-card :bordered="false">
<a-tabs defaultActiveKey="2" @change="callback">
<a-tab-pane tab="基本信息" key="1" forceRender>
<Dept-Base-Info ref="DeptBaseInfo"></Dept-Base-Info>
<DeptBaseInfo ref="DeptBaseInfo"></DeptBaseInfo>
</a-tab-pane>
<a-tab-pane tab="用户信息" key="2">
<Dept-User-Info ref="DeptUserInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"></Dept-User-Info>
<DeptUserInfo ref="DeptUserInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"></DeptUserInfo>
</a-tab-pane>
<a-tab-pane tab="部门角色" key="3" forceRender>
<dept-role-info ref="DeptRoleInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"/>
<a-tab-pane tab="部门角色" key="3" forceRender v-if="userIdentity !== '1'">
<DeptRoleInfo ref="DeptRoleInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys" />
</a-tab-pane>
</a-tabs>
</a-card>
@ -119,6 +120,7 @@
that.departTree = []
queryMyDepartTreeList().then((res) => {
if (res.success && res.result ) {
// console.log("",res.result)
for (let i = 0; i < res.result.length; i++) {
let temp = res.result[i]
that.treeData.push(temp)
@ -128,6 +130,7 @@
}
this.loading = false
}
console.log("biaoshiii",res.message);
that.userIdentity = res.message
})
},
@ -200,13 +203,19 @@
if (this.selectedKeys[0] !== selectedKeys[0]) {
this.selectedKeys = [selectedKeys[0]];
}
console.log("12312")
let record = e.node.dataRef;
this.checkedKeys.push(record.id);
this.$refs.DeptBaseInfo.open(record);
this.$refs.DeptUserInfo.onClearSelected();
this.$refs.DeptUserInfo.open(record);
this.$refs.DeptRoleInfo.onClearSelected();
this.$refs.DeptRoleInfo.open(record);
console.log("" +
"123123",this.userIdentity)
if(this.userIdentity !== '1'){
this.$refs.DeptRoleInfo.onClearSelected();
this.$refs.DeptRoleInfo.open(record);
}
},
},
created() {
@ -217,5 +226,5 @@
}
</script>
<style scoped>
@import '~@assets/less/common.less'
@import '~@assets/less/common.less';
</style>

4
src/views/system/modules/DeptBaseInfo.vue

@ -121,6 +121,10 @@
this.form.resetFields();
this.treeData = [];
},
onClearSelected() {
this.selectedRowKeys = [];
this.selectionRows = [];
}
}
}
</script>

4
src/views/system/modules/DeptRoleInfo.vue

@ -183,6 +183,10 @@
handlePerssion: function(record){
this.$refs.modalDeptRole.show(record.id,record.departId);
},
onClearSelected() {
this.selectedRowKeys = [];
this.selectionRows = [];
},
}
}
</script>

6
src/views/system/modules/DeptUserInfo.vue

@ -186,6 +186,7 @@
let params = this.getQueryParams();//
params.depId = this.currentDeptId;
getAction(this.url.list, params).then((res) => {
console.log("不么,",params.depId, this.currentDeptId);
if (res.success && res.result) {
this.dataSource = res.result.records;
this.ipagination.total = res.result.total;
@ -293,6 +294,7 @@
} else {
this.$refs.modalForm.departDisabled = true;
this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId]; //id
this.$refs.modalForm.confirmNum = 1; //
this.$refs.modalForm.add();
this.$refs.modalForm.title = "新增";
}
@ -321,6 +323,10 @@
}else{
this.$message.warning("请先选择一个部门!");
}
},
onClearSelected() {
this.selectedRowKeys = [];
this.selectionRows = [];
}
}
}

15
src/views/system/modules/UserModal.vue

@ -279,6 +279,7 @@
},
props:{
editMeans:{ type: Boolean, default: false, required: false },
checkedDepartName:{ type: String, default: '', required: false },
},
data () {
return {
@ -288,6 +289,7 @@
drawerWidth:1100,
modaltoggleFlag:true,
confirmDirty: false,
confirmNum: '',
selectedDepartKeys:[], //id
checkedDepartKeys:[],
checkedDepartNames:[], // =>title
@ -612,10 +614,15 @@
//
this.form.validateFields((err, values) => {
if (!err) {
if (this.checkedDepartNameString ===''||this.checkedDepartNameString===null||this.checkedDepartNameString === undefined){
this.$message.error("部门分配不能为空")
return;
}
if(!!this.confirmNum){
this.checkedDepartNameString =this.userDepartModel.departIdList;
}else{
if (!!this.checkedDepartNameString){
this.$message.error("部门分配不能为空")
return;
}
}
that.confirmLoading = true;
values.password = signMd5Utils.md5password(values.password);
let formData = Object.assign(this.model, values);

Loading…
Cancel
Save