Commit 0bcd26da by wangchunyang

根据现场需求,各功能查询调整为区县使用范围,包括对应横向部门,使用sys_office中的area_id来确认范围

parent 063936ff
...@@ -631,7 +631,7 @@ export default { ...@@ -631,7 +631,7 @@ export default {
supply_view: false, // 用品查询(统计) supply_view: false, // 用品查询(统计)
inventory_manager: false // 库存管理 inventory_manager: false // 库存管理
}, },
userRound: '1' userRound: '2'
} }
}, },
created () { created () {
...@@ -858,7 +858,7 @@ export default { ...@@ -858,7 +858,7 @@ export default {
console.log('this.userConfigModal', this.userConfigModal) console.log('this.userConfigModal', this.userConfigModal)
}, },
addUsers () { addUsers () {
this.userRound = '1' this.userRound = '2'
this.userSelectorVisible = true this.userSelectorVisible = true
}, },
handleUserSelectorOk (selectedUsers) { handleUserSelectorOk (selectedUsers) {
......
...@@ -127,6 +127,7 @@ export default { ...@@ -127,6 +127,7 @@ export default {
{ title: '人员', key: 'user_name', align: 'center' }, { title: '人员', key: 'user_name', align: 'center' },
{ title: '用品', key: 'material_name', align: 'center' }, { title: '用品', key: 'material_name', align: 'center' },
{ title: '申请数量', key: 'apply_quantity', align: 'center' }, { title: '申请数量', key: 'apply_quantity', align: 'center' },
{ title: '申请时间', key: 'apply_time', align: 'center' },
{ title: '已归还数量', key: 'returned_quantity', align: 'center' } { title: '已归还数量', key: 'returned_quantity', align: 'center' }
] ]
this.detailModal.visible = true this.detailModal.visible = true
......
<template> <template>
<Modal v-model="visible" title="选择人员" width="900" :mask-closable="false"> <Modal v-model="visible" title="选择人员" width="1100" :mask-closable="false">
<div class="search-div"> <div class="search-div">
<Row type="flex" :gutter="16" align="middle"> <Row type="flex" :gutter="16" align="middle">
<Col :span="18"> <Col :span="20">
<span>姓名:</span> <span>姓名:</span>
<Input v-model="filters.name" placeholder="请输入姓名" style="width: 160px" class="mr10" /> <Input v-model="filters.name" placeholder="请输入姓名" style="width: 160px" class="mr10" />
<span v-if="curGrad === '3'">选择区:</span> <span v-if="curGrad === '3'">选择区:</span>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<Option v-for="(item, index) in communityList" :key="index" :value="item.parent_id">{{ item.name }}</Option> <Option v-for="(item, index) in communityList" :key="index" :value="item.parent_id">{{ item.name }}</Option>
</Select> </Select>
</Col> </Col>
<Col :span="6" class="text-right"> <Col :span="4" class="text-right">
<Button type="primary" class="mr10" @click="handleSearch">搜索</Button> <Button type="primary" class="mr10" @click="handleSearch">搜索</Button>
<Button type="primary" @click="handleReset">重置</Button> <Button type="primary" @click="handleReset">重置</Button>
</Col> </Col>
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
// v-model: value 控制显示 // v-model: value 控制显示
value: { type: Boolean, default: false }, value: { type: Boolean, default: false },
// 范围参数1父,本级,下级2本级 // 范围参数1父,本级,下级2本级
round: { type: String, default: '1' } round: { type: String, default: '2' }
}, },
data () { data () {
return { return {
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
this.filters.areaId = '' this.filters.areaId = ''
this.filters.streetId = '' this.filters.streetId = ''
this.filters.communityId = '' this.filters.communityId = ''
this.getOtherUserInfo() // this.getOtherUserInfo()
this.fetchList() this.fetchList()
} }
} }
...@@ -108,18 +108,21 @@ export default { ...@@ -108,18 +108,21 @@ export default {
getOtherUserInfo () { getOtherUserInfo () {
this.otherUserInfo = this.$store.state.user.otherUserInfo || {} this.otherUserInfo = this.$store.state.user.otherUserInfo || {}
this.curGrad = '' this.curGrad = ''
console.log('otherUserInfo', this.otherUserInfo)
if (this.otherUserInfo.area_id && this.otherUserInfo.area_id.startsWith('2201') && this.round === '1') { // 长春 if (this.otherUserInfo.area_id && this.otherUserInfo.area_id.startsWith('2201') && this.round === '1') { // 长春
this.curGrad = this.otherUserInfo.company_grade this.curGrad = this.otherUserInfo.company_grade
if (this.otherUserInfo.company_grade === '3') { // 市 if (this.otherUserInfo.company_grade === '3') { // 市
this.curPids = this.otherUserInfo.parent_ids this.curPids = this.otherUserInfo.parent_ids
this.filters.cityId = this.otherUserInfo.area_id this.filters.cityId = this.otherUserInfo.area_id
this.changeCity() this.changeCity()
this.fetchList()
} else if (this.otherUserInfo.company_grade === '4') { // 区 } else if (this.otherUserInfo.company_grade === '4') { // 区
this.curPids = this.otherUserInfo.parent_ids this.curPids = this.otherUserInfo.parent_ids
let pids = this.curPids.split(',') let pids = this.curPids.split(',')
this.filters.cityId = pids[2] this.filters.cityId = pids[2]
this.filters.areaId = this.otherUserInfo.area_id this.filters.areaId = this.otherUserInfo.area_id
this.changeArea() this.changeArea()
this.fetchList()
} else if (this.otherUserInfo.company_grade === '5') { // 街道 } else if (this.otherUserInfo.company_grade === '5') { // 街道
this.curPids = this.otherUserInfo.parent_ids this.curPids = this.otherUserInfo.parent_ids
let pids = this.curPids.split(',') let pids = this.curPids.split(',')
...@@ -127,7 +130,12 @@ export default { ...@@ -127,7 +130,12 @@ export default {
this.filters.areaId = pids[3] this.filters.areaId = pids[3]
this.filters.streetId = this.otherUserInfo.area_id this.filters.streetId = this.otherUserInfo.area_id
this.changeStreet() this.changeStreet()
this.fetchList()
} else {
this.fetchList()
} }
} else {
this.fetchList()
} }
}, },
fetchList () { fetchList () {
...@@ -233,7 +241,7 @@ export default { ...@@ -233,7 +241,7 @@ export default {
this.filters.communityId = '' this.filters.communityId = ''
return return
} }
selectCityList({ parent_id: this.params.cityId }).then((res) => { selectCityList({ parent_id: this.filters.cityId }).then((res) => {
this.areaList = res.data.data this.areaList = res.data.data
}) })
// 清空下面的数组 // 清空下面的数组
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论