Commit e87263d7ce50aa542b183aaaed21d0961a9e6d87

Authored by wuxw
1 parent 9c311762

工作办理 待办功能测试完成

src/api/oa/visitUndoApi.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +/**
  4 + * 查询待办访客列表
  5 + * @param {Object} params 查询参数
  6 + * @returns {Promise} 返回Promise对象
  7 + */
  8 +export function queryUndoVisit(params) {
  9 + return new Promise((resolve, reject) => {
  10 + request({
  11 + url: '/visit.queryUndoVisit',
  12 + method: 'get',
  13 + params
  14 + }).then(response => {
  15 + const res = response.data
  16 + resolve(res)
  17 + }).catch(error => {
  18 + reject(error)
  19 + })
  20 + })
  21 +}
0 22 \ No newline at end of file
... ...
src/api/resource/itemReleaseUndoApi.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +import { getCommunityId } from '@/api/community/communityApi'
  3 +
  4 +// 查询待办放行单列表
  5 +export function queryUndoItemRelease(params) {
  6 + return new Promise((resolve, reject) => {
  7 + request({
  8 + url: '/itemRelease.queryUndoItemRelease',
  9 + method: 'get',
  10 + params: {
  11 + ...params,
  12 + communityId: getCommunityId()
  13 + }
  14 + }).then(response => {
  15 + const res = response.data
  16 + resolve(res)
  17 + }).catch(error => {
  18 + reject(error)
  19 + })
  20 + })
  21 +}
  22 +
  23 +// 查询放行物品列表
  24 +export function listItemReleaseRes(params) {
  25 + return new Promise((resolve, reject) => {
  26 + request({
  27 + url: '/itemRelease.listItemReleaseRes',
  28 + method: 'get',
  29 + params: {
  30 + ...params,
  31 + communityId: getCommunityId()
  32 + }
  33 + }).then(response => {
  34 + const res = response.data
  35 + resolve(res)
  36 + }).catch(error => {
  37 + reject(error)
  38 + })
  39 + })
  40 +}
0 41 \ No newline at end of file
... ...
src/i18n/oaI18n.js
... ... @@ -52,6 +52,7 @@ import { messages as newOaWorkflowFormEditMessages } from '../views/oa/newOaWork
52 52 import { messages as simplifyNotepadManageMessages } from '../views/oa/simplifyNotepadManageLang'
53 53 import { messages as uodoComplaintsMessages } from '../views/oa/uodoComplaintsLang'
54 54 import { messages as complaintDetailMessages } from '../views/oa/complaintDetailLang'
  55 +import { messages as visitUndoMessages } from '../views/oa/visitUndoLang'
55 56  
56 57  
57 58 export const messages ={
... ... @@ -109,6 +110,7 @@ export const messages ={
109 110 ...simplifyNotepadManageMessages.en,
110 111 ...uodoComplaintsMessages.en,
111 112 ...complaintDetailMessages.en,
  113 + ...visitUndoMessages.en,
112 114 },
113 115 zh:{
114 116 ...activitiesTypeManageMessages.zh,
... ... @@ -164,5 +166,6 @@ export const messages ={
164 166 ...simplifyNotepadManageMessages.zh,
165 167 ...uodoComplaintsMessages.zh,
166 168 ...complaintDetailMessages.zh,
  169 + ...visitUndoMessages.zh,
167 170 }
168 171 }
169 172 \ No newline at end of file
... ...
src/i18n/resourceI18n.js
... ... @@ -39,6 +39,7 @@ import { messages as resourceOutManageMessages } from '../views/resource/resourc
39 39 import { messages as allocationStorehouseAuditOrdersMessages } from '../views/resource/allocationStorehouseAuditOrdersLang'
40 40 import { messages as editAllocationStorehouseApplyMessages } from '../views/resource/editAllocationStorehouseApplyLang'
41 41 import { messages as allocationStorehouseEnterMessages } from '../views/resource/allocationStorehouseEnterLang'
  42 +import { messages as itemReleaseUndoMessages } from '../views/resource/itemReleaseUndoLang'
42 43  
43 44 export const messages = {
44 45 en: {
... ... @@ -81,6 +82,7 @@ export const messages = {
81 82 ...allocationStorehouseAuditOrdersMessages.en,
82 83 ...editAllocationStorehouseApplyMessages.en,
83 84 ...allocationStorehouseEnterMessages.en,
  85 + ...itemReleaseUndoMessages.en,
84 86 },
85 87 zh: {
86 88 ...resourceAuditFlowMessages.zh,
... ... @@ -122,5 +124,6 @@ export const messages = {
122 124 ...allocationStorehouseAuditOrdersMessages.zh,
123 125 ...editAllocationStorehouseApplyMessages.zh,
124 126 ...allocationStorehouseEnterMessages.zh,
  127 + ...itemReleaseUndoMessages.zh,
125 128 }
126 129 }
127 130 \ No newline at end of file
... ...
src/router/oaRouter.js
... ... @@ -249,4 +249,9 @@ export default [
249 249 name: '/pages/complaint/complaintDetail',
250 250 component: () => import('@/views/oa/complaintDetailList.vue')
251 251 },
  252 + {
  253 + path: '/pages/property/visitUndo',
  254 + name: '/pages/property/visitUndo',
  255 + component: () => import('@/views/oa/visitUndoList.vue')
  256 + },
252 257 ]
253 258 \ No newline at end of file
... ...
src/router/resourceRouter.js
... ... @@ -181,9 +181,14 @@ export default [
181 181 component: () => import('@/views/resource/editAllocationStorehouseApplyList.vue')
182 182 },
183 183 {
184   - path:'/pages/resource/allocationStorehouseEnter',
185   - name:'/pages/resource/allocationStorehouseEnter',
  184 + path: '/pages/resource/allocationStorehouseEnter',
  185 + name: '/pages/resource/allocationStorehouseEnter',
186 186 component: () => import('@/views/resource/allocationStorehouseEnterList.vue')
187   - },
  187 + },
  188 + {
  189 + path: '/pages/property/itemReleaseUndo',
  190 + name: '/pages/property/itemReleaseUndo',
  191 + component: () => import('@/views/resource/itemReleaseUndoList.vue')
  192 + },
188 193  
189 194 ]
190 195 \ No newline at end of file
... ...
src/views/oa/visitUndoLang.js 0 → 100644
  1 +export const messages = {
  2 + en: {
  3 + visitUndo: {
  4 + title: 'Visitor To-do List',
  5 + back: 'Back',
  6 + refresh: 'Refresh',
  7 + visitorId: 'Visitor ID',
  8 + visitor: 'Visitor',
  9 + male: 'Male',
  10 + female: 'Female',
  11 + ownerName: 'Owner Name',
  12 + visitReason: 'Visit Reason/Type',
  13 + carNumber: 'Car Number',
  14 + entourageCount: 'Entourage Count',
  15 + createTime: 'Create Time',
  16 + visitTime: 'Visit/Departure Time',
  17 + status: 'Status',
  18 + operation: 'Operation',
  19 + process: 'Process',
  20 + detail: 'Detail'
  21 + }
  22 + },
  23 + zh: {
  24 + visitUndo: {
  25 + title: '访客待办单',
  26 + back: '返回',
  27 + refresh: '刷新',
  28 + visitorId: '访客ID',
  29 + visitor: '访客',
  30 + male: '男',
  31 + female: '女',
  32 + ownerName: '业主姓名',
  33 + visitReason: '来访事由/类型',
  34 + carNumber: '车牌号',
  35 + entourageCount: '随行人数',
  36 + createTime: '创建时间',
  37 + visitTime: '来访/离开时间',
  38 + status: '状态',
  39 + operation: '操作',
  40 + process: '办理',
  41 + detail: '详情'
  42 + }
  43 + }
  44 +}
0 45 \ No newline at end of file
... ...
src/views/oa/visitUndoList.vue 0 → 100644
  1 +<template>
  2 + <div class="animated fadeInRight visit-undo-container">
  3 + <el-row>
  4 + <el-col :span="24">
  5 + <el-card>
  6 + <div slot="header" class="flex justify-between">
  7 + <span>{{ $t('visitUndo.title') }}</span>
  8 + <div class="card-header-actions">
  9 + <el-button size="small" @click="goBack">{{ $t('visitUndo.back') }}</el-button>
  10 + <el-button type="primary" size="small" @click="queryUndoOrders">{{ $t('visitUndo.refresh') }}</el-button>
  11 + </div>
  12 + </div>
  13 +
  14 + <el-table
  15 + v-loading="loading"
  16 + :data="visitUndoInfo.undos"
  17 + border
  18 + style="width: 100%"
  19 + >
  20 + <el-table-column prop="vId" :label="$t('visitUndo.visitorId')" align="center" />
  21 + <el-table-column :label="$t('visitUndo.visitor')" align="center">
  22 + <template slot-scope="scope">
  23 + {{ scope.row.vName }}({{ scope.row.phoneNumber }})/{{ scope.row.visitGender === '0' ? $t('visitUndo.male') : $t('visitUndo.female') }}
  24 + </template>
  25 + </el-table-column>
  26 + <el-table-column prop="ownerName" :label="$t('visitUndo.ownerName')" align="center" />
  27 + <el-table-column :label="$t('visitUndo.visitReason')" align="center">
  28 + <template slot-scope="scope">
  29 + {{ scope.row.visitCase }}({{ scope.row.reasonTypeName }})
  30 + </template>
  31 + </el-table-column>
  32 + <el-table-column prop="carNum" :label="$t('visitUndo.carNumber')" align="center" />
  33 + <el-table-column prop="entourage" :label="$t('visitUndo.entourageCount')" align="center" />
  34 + <el-table-column prop="createTime" :label="$t('visitUndo.createTime')" align="center" />
  35 + <el-table-column :label="$t('visitUndo.visitTime')" align="center">
  36 + <template slot-scope="scope">
  37 + {{ scope.row.visitTime }}<br>{{ scope.row.departureTime }}
  38 + </template>
  39 + </el-table-column>
  40 + <el-table-column prop="stateName" :label="$t('visitUndo.status')" align="center" />
  41 + <el-table-column :label="$t('visitUndo.operation')" align="center" width="200">
  42 + <template slot-scope="scope">
  43 + <el-button-group>
  44 + <el-button size="mini" @click="openAuditUndoDetail(scope.row)">{{ $t('visitUndo.process') }}</el-button>
  45 + <el-button size="mini" @click="openDetail(scope.row)">{{ $t('visitUndo.detail') }}</el-button>
  46 + </el-button-group>
  47 + </template>
  48 + </el-table-column>
  49 + </el-table>
  50 +
  51 + <el-pagination
  52 + :current-page.sync="page.current"
  53 + :page-sizes="[10, 20, 30, 50]"
  54 + :page-size="page.size"
  55 + :total="page.total"
  56 + layout="total, sizes, prev, pager, next, jumper"
  57 + @size-change="handleSizeChange"
  58 + @current-change="handleCurrentChange"
  59 + />
  60 + </el-card>
  61 + </el-col>
  62 + </el-row>
  63 + </div>
  64 +</template>
  65 +
  66 +<script>
  67 +import { queryUndoVisit } from '@/api/oa/visitUndoApi'
  68 +import { getCommunityId } from '@/api/community/communityApi'
  69 +
  70 +export default {
  71 + name: 'VisitUndoList',
  72 + data() {
  73 + return {
  74 + loading: false,
  75 + communityId: '',
  76 + visitUndoInfo: {
  77 + undos: [],
  78 + conditions: {
  79 + vId: '',
  80 + userName: '',
  81 + auditLink: ''
  82 + }
  83 + },
  84 + page: {
  85 + current: 1,
  86 + size: 10,
  87 + total: 0
  88 + }
  89 + }
  90 + },
  91 + created() {
  92 + this.communityId = getCommunityId()
  93 + this.listUndoOrders()
  94 + },
  95 + methods: {
  96 + async listUndoOrders() {
  97 + try {
  98 + this.loading = true
  99 + const params = {
  100 + page: this.page.current,
  101 + row: this.page.size,
  102 + ...this.visitUndoInfo.conditions,
  103 + communityId: this.communityId,
  104 + audit: '1'
  105 + }
  106 + const { data, total } = await queryUndoVisit(params)
  107 + this.visitUndoInfo.undos = data
  108 + this.page.total = total
  109 + } catch (error) {
  110 + console.error('Failed to fetch undo orders:', error)
  111 + } finally {
  112 + this.loading = false
  113 + }
  114 + },
  115 + queryUndoOrders() {
  116 + this.page.current = 1
  117 + this.listUndoOrders()
  118 + },
  119 + openDetail(item) {
  120 + this.$router.push({
  121 + path: '/views/property/visitDetail',
  122 + query: {
  123 + vId: item.vId,
  124 + flowId: item.flowId
  125 + }
  126 + })
  127 + },
  128 + openAuditUndoDetail(undo) {
  129 + this.$router.push({
  130 + path: '/views/property/visitDetail',
  131 + query: {
  132 + vId: undo.vId,
  133 + flowId: undo.flowId,
  134 + action: 'Audit',
  135 + taskId: undo.taskId
  136 + }
  137 + })
  138 + },
  139 + goBack() {
  140 + this.$router.go(-1)
  141 + },
  142 + handleSizeChange(val) {
  143 + this.page.size = val
  144 + this.listUndoOrders()
  145 + },
  146 + handleCurrentChange(val) {
  147 + this.page.current = val
  148 + this.listUndoOrders()
  149 + }
  150 + }
  151 +}
  152 +</script>
  153 +
  154 +<style lang="scss" scoped>
  155 +.visit-undo-container {
  156 + padding: 20px;
  157 +
  158 + .el-card {
  159 + margin-bottom: 20px;
  160 + }
  161 +
  162 + .card-header-actions {
  163 + float: right;
  164 + }
  165 +
  166 + .el-pagination {
  167 + margin-top: 20px;
  168 + text-align: right;
  169 + }
  170 +}
  171 +</style>
0 172 \ No newline at end of file
... ...
src/views/resource/itemReleaseUndoLang.js 0 → 100644
  1 +export const messages = {
  2 + en: {
  3 + itemReleaseUndo: {
  4 + title: 'Release Pending Orders',
  5 + back: 'Back',
  6 + refresh: 'Refresh',
  7 + orderNo: 'Order No',
  8 + releaseType: 'Release Type',
  9 + applyUnit: 'Applicant Unit',
  10 + applicant: 'Applicant',
  11 + idCard: 'ID Card',
  12 + phone: 'Phone',
  13 + passTime: 'Pass Time',
  14 + items: 'Items',
  15 + viewItems: 'View Items',
  16 + status: 'Status',
  17 + plateNo: 'Plate No',
  18 + none: 'None',
  19 + operations: 'Operations',
  20 + process: 'Process',
  21 + detail: 'Detail'
  22 + },
  23 +
  24 + },
  25 + zh: {
  26 + itemReleaseUndo: {
  27 + title: '放行待办单',
  28 + back: '返回',
  29 + refresh: '刷新',
  30 + orderNo: '单号',
  31 + releaseType: '放行类型',
  32 + applyUnit: '申请单位',
  33 + applicant: '申请人',
  34 + idCard: '身份证',
  35 + phone: '手机号',
  36 + passTime: '通行时间',
  37 + items: '物品',
  38 + viewItems: '查看物品',
  39 + status: '状态',
  40 + plateNo: '车牌号',
  41 + none: '无',
  42 + operations: '操作',
  43 + process: '办理',
  44 + detail: '详情'
  45 + },
  46 +
  47 + }
  48 +}
0 49 \ No newline at end of file
... ...
src/views/resource/itemReleaseUndoList.vue 0 → 100644
  1 +<template>
  2 + <div class="item-release-undo-container animated fadeInRight">
  3 + <el-card class="box-card">
  4 + <div slot="header" class="flex justify-between">
  5 + <span>{{ $t('itemReleaseUndo.title') }}</span>
  6 + <div class="header-actions">
  7 + <el-button size="small" @click="goBack()">
  8 + {{ $t('itemReleaseUndo.back') }}
  9 + </el-button>
  10 + <el-button type="primary" size="small" @click="_queryUndoOrdersMethod()">
  11 + {{ $t('itemReleaseUndo.refresh') }}
  12 + </el-button>
  13 + </div>
  14 + </div>
  15 +
  16 + <el-table :data="itemReleaseUndoInfo.undos" border style="width: 100%" v-loading="loading">
  17 + <el-table-column prop="irId" :label="$t('itemReleaseUndo.orderNo')" align="center" />
  18 + <el-table-column prop="typeName" :label="$t('itemReleaseUndo.releaseType')" align="center" />
  19 + <el-table-column prop="applyCompany" :label="$t('itemReleaseUndo.applyUnit')" align="center" />
  20 + <el-table-column prop="applyPerson" :label="$t('itemReleaseUndo.applicant')" align="center" />
  21 + <el-table-column prop="idCard" :label="$t('itemReleaseUndo.idCard')" align="center" />
  22 + <el-table-column prop="applyTel" :label="$t('itemReleaseUndo.phone')" align="center" />
  23 + <el-table-column prop="passTime" :label="$t('itemReleaseUndo.passTime')" align="center" />
  24 + <el-table-column :label="$t('itemReleaseUndo.items')" align="center">
  25 + <template slot-scope="scope">
  26 + {{ scope.row.amount }}(<el-link type="primary" @click="viewResName(scope.row)">{{
  27 + $t('itemReleaseUndo.viewItems') }}</el-link>)
  28 + </template>
  29 + </el-table-column>
  30 + <el-table-column prop="stateName" :label="$t('itemReleaseUndo.status')" align="center" />
  31 + <el-table-column prop="carNum" :label="$t('itemReleaseUndo.plateNo')" align="center">
  32 + <template slot-scope="scope">
  33 + {{ scope.row.carNum || $t('itemReleaseUndo.none') }}
  34 + </template>
  35 + </el-table-column>
  36 + <el-table-column :label="$t('itemReleaseUndo.operations')" align="center" width="180">
  37 + <template slot-scope="scope">
  38 + <el-button-group>
  39 + <el-button size="mini" @click="_openAuditUndoDetail(scope.row)">
  40 + {{ $t('itemReleaseUndo.process') }}
  41 + </el-button>
  42 + <el-button size="mini" @click="_openDetail(scope.row)">
  43 + {{ $t('itemReleaseUndo.detail') }}
  44 + </el-button>
  45 + </el-button-group>
  46 + </template>
  47 + </el-table-column>
  48 + </el-table>
  49 +
  50 + <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  51 + :current-page="pagination.current" :page-sizes="[10, 20, 30, 50]" :page-size="pagination.size"
  52 + layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" class="pagination" />
  53 +
  54 + <view-item-release-res ref="viewItemReleaseRes" />
  55 + </el-card>
  56 + </div>
  57 +</template>
  58 +
  59 +<script>
  60 +import { queryUndoItemRelease } from '@/api/resource/itemReleaseUndoApi'
  61 +import ViewItemReleaseRes from '@/components/work/viewItemReleaseRes'
  62 +import { getCommunityId } from '@/api/community/communityApi'
  63 +import { getUserId } from '@/api/user/userApi'
  64 +
  65 +export default {
  66 + name: 'ItemReleaseUndoList',
  67 + components: {
  68 + ViewItemReleaseRes
  69 + },
  70 + data() {
  71 + return {
  72 + loading: false,
  73 + itemReleaseUndoInfo: {
  74 + undos: [],
  75 + conditions: {
  76 + irId: '',
  77 + userName: '',
  78 + auditLink: '',
  79 + page: 1,
  80 + row: 10
  81 + },
  82 + currentUserId: ''
  83 + },
  84 + pagination: {
  85 + current: 1,
  86 + size: 10,
  87 + total: 0
  88 + }
  89 + }
  90 + },
  91 + created() {
  92 + this.itemReleaseUndoInfo.currentUserId = getUserId()
  93 + this._listUndoOrders()
  94 + },
  95 + methods: {
  96 + async _listUndoOrders() {
  97 + try {
  98 + this.loading = true
  99 + const params = {
  100 + ...this.itemReleaseUndoInfo.conditions,
  101 + communityId: getCommunityId(),
  102 + audit: '1'
  103 + }
  104 + const { data, total } = await queryUndoItemRelease(params)
  105 + this.itemReleaseUndoInfo.undos = data
  106 + this.pagination.total = total
  107 + } catch (error) {
  108 + console.error('Error fetching undo orders:', error)
  109 + } finally {
  110 + this.loading = false
  111 + }
  112 + },
  113 + _queryUndoOrdersMethod() {
  114 + this.pagination.current = 1
  115 + this._listUndoOrders()
  116 + },
  117 + _openDetail(item) {
  118 + this.$router.push({
  119 + path: '/views/property/itemReleaseDetail',
  120 + query: {
  121 + irId: item.irId,
  122 + flowId: item.flowId
  123 + }
  124 + })
  125 + },
  126 + _openAuditUndoDetail(undo) {
  127 + this.$router.push({
  128 + path: '/views/property/itemReleaseDetail',
  129 + query: {
  130 + irId: undo.irId,
  131 + flowId: undo.flowId,
  132 + action: 'Audit',
  133 + taskId: undo.taskId
  134 + }
  135 + })
  136 + },
  137 + viewResName(item) {
  138 + this.$refs.viewItemReleaseRes.open(item)
  139 + },
  140 + handleSizeChange(val) {
  141 + this.pagination.size = val
  142 + this.itemReleaseUndoInfo.conditions.row = val
  143 + this._listUndoOrders()
  144 + },
  145 + handleCurrentChange(val) {
  146 + this.pagination.current = val
  147 + this.itemReleaseUndoInfo.conditions.page = val
  148 + this._listUndoOrders()
  149 + },
  150 + goBack() {
  151 + this.$router.go(-1)
  152 + }
  153 + }
  154 +}
  155 +</script>
  156 +
  157 +<style lang="scss" scoped>
  158 +.item-release-undo-container {
  159 + padding: 20px;
  160 +
  161 + .box-card {
  162 + margin-bottom: 20px;
  163 +
  164 + .clearfix {
  165 + display: flex;
  166 + justify-content: space-between;
  167 + align-items: center;
  168 + }
  169 +
  170 + .header-actions {
  171 + display: flex;
  172 + gap: 10px;
  173 + }
  174 + }
  175 +
  176 + .pagination {
  177 + margin-top: 20px;
  178 + text-align: right;
  179 + }
  180 +}
  181 +</style>
0 182 \ No newline at end of file
... ...