oa初步完成

This commit is contained in:
2024-11-16 20:08:00 +08:00
parent 17ef95ebae
commit 76403c1cf8
35 changed files with 1157 additions and 93 deletions

View File

@@ -7,34 +7,35 @@
<el-col :span="16">
<el-row :gutter="20">
<el-col :span="6">
<div @click="goTarget('work/create')" class="work">
<div @click="goTarget('project/project')" class="work">
<el-badge class="item-ico" type="warning">
<i class="el-icon-s-operation fz cl1"></i>
<div size="small">流程发起</div>
<div size="small">项目管理</div>
</el-badge>
</div>
</el-col>
<el-col :span="6">
<div @click="goTarget('work/own')" class="work">
<el-badge :value="ownCount" class="item-ico" type="warning">
<div @click="goTarget('produce/attendance')" class="work">
<!-- :value="ownCount" -->
<el-badge class="item-ico" type="warning">
<i class="el-icon-date fz cl2"></i>
<div size="small">我的流程</div>
<div size="small">人员考勤</div>
</el-badge>
</div>
</el-col>
<el-col :span="6">
<div @click="goTarget('work/todo')" class="work">
<el-badge :value="todoListCount" class="item-ico" type="warning">
<div @click="goTarget('notice/notice')" class="work">
<el-badge class="item-ico" type="warning">
<i class="el-icon-chat-line-round fz cl3"></i>
<div size="small">待办任务</div>
<div size="small">通知公告</div>
</el-badge>
</div>
</el-col>
<el-col :span="6">
<div @click="goTarget('work/finished')" class="work">
<el-badge :value="finishedCount" class="item-ico" type="warning" v-on:click="goTarget('work/finished')">
<div @click="goTarget('finance/costing')" class="work">
<el-badge class="item-ico" type="warning" v-on:click="goTarget('finance/costing')">
<i class="el-icon-set-up fz cl4"></i>
<div size="small">已办任务</div>
<div size="small">财务管理</div>
</el-badge>
</div>
</el-col>

View File

@@ -7,7 +7,7 @@
<thead>
<tr>
<th width="80"></th>
<th v-for="(item,index) in 31" :class="selectHead===index+1?'selectBox':''" @click="selectMany(index+1)">
<th v-for="(item,index) in dateLength" :class="selectHead===index+1?'selectBox':''" @click="selectMany(index+1)">
{{ index + 1 }}
</th>
</tr>
@@ -15,7 +15,7 @@
<tbody>
<tr v-for="(item,index) in userList">
<td :class="(item.userId===selectUser.userId || selectAll)?'selectBox':''">{{ item.nickName }}</td>
<td v-for="(item2,index2) in 31" @click="selectAttendDay(item,index,index2+1)"
<td v-for="(item2,index2) in dateLength" @click="selectAttendDay(item,index,index2+1)"
:style="{backgroundColor:(item.attendances.length>0 && item.attendances.findIndex(i=>i.attendanceDay === index2+1) >-1) ?item.attendances[item.attendances.findIndex(i=>i.attendanceDay === index2+1)].color:(index2+1===selectIndex&&(item.userId===selectUser.userId || selectAll)?'#f3ff52':'')}"></td>
</tr>
</tbody>
@@ -72,6 +72,152 @@
</el-col>
</el-row>
<el-row :gutter="20" class="mb8">
<el-col :span="2">
<span class="demonstration">计算月份:</span>
</el-col>
<el-col :span="6">
<div class="block">
<el-date-picker
v-model="date"
type="month"
placeholder="选择日期">
</el-date-picker>
</div>
</el-col>
<el-col :span="1.5">
<el-button @click="calcWork">计算</el-button>
</el-col>
</el-row>
<el-row :gutter="20" >
<el-table
:data="userList"
stripe
style="width: 60%">
<el-table-column
type="index"
label="序号"
width="180">
</el-table-column>
<el-table-column
prop="nickName"
label="员工姓名"
width="180">
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope" >
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="calcFlag"
@click="handleCalc(scope.row)"
v-hasPermi="['oa:oaWarehouse:edit']"
>查看考勤结果</el-button>
<el-button
size="mini"
type="text"
v-else
disabled
icon="el-icon-edit"
@click="handleCalc(scope.row)"
v-hasPermi="['oa:oaWarehouse:edit']"
>请选择日期计算</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-dialog
title="计算结果"
:visible.sync="showCalc"
width="70%"
>
<div class="container">
<h1>员工个人财务与签到报告 - {{calcUser.nickName}}</h1>
<!-- 员工基本信息 -->
<div class="employee-info">
<p><strong>员工姓名</strong> {{calcUser.nickName}}</p>
<p><strong>职位</strong> 员工</p>
</div>
<!-- 月度工作情况表格 -->
<h2>{{date.getMonth()}} 月度工作签到情况</h2>
<el-descriptions class="margin-top" title="报告详情" :column="3" :size="size" border>
<template slot="extra">
<div>总工作时长{{calcResultItem.workTimes}}</div>
</template>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>
员工姓名
</template>
{{calcUser.nickName}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-mobile-phone"></i>
人力成本
</template>
{{calcUser.laborCost}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
当月估计()
</template>
{{calcUser.laborCost*calcResultItem.workTimes}}
</el-descriptions-item>
</el-descriptions>
<el-table
:data="calcResultAttendances"
stripe
style="width: 100%">
<el-table-column
prop="projectName"
label="项目名"
width="180">
</el-table-column>
<el-table-column
prop="count"
label="签到(天)"
width="180">
</el-table-column>
<el-table-column
prop="workTimes"
label="工作时长(天)">
</el-table-column>
</el-table>
<div class="footer">
<p>© 2024 财务与签到报告 | 由公司财务部门生成</p>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="showCalc = false">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
@@ -80,7 +226,8 @@
import {listWorker} from "@/api/system/user";
import {listProject, updateProject} from "@/api/oa/project";
import {listOaAttendance} from "@/api/oa/oaAttendance";
import {addBatchOaAttendance, addOaAttendance} from "../../../api/oa/oaAttendance";
import {addBatchOaAttendance, addOaAttendance, getDateLength, workCalc} from "../../../api/oa/oaAttendance";
import item from "../../../layout/components/Sidebar/Item.vue";
export default {
name: "Project",
@@ -91,12 +238,19 @@ export default {
selectIndex: new Date().getDate(),
// 用户列表
userList: [],
// 计算结果
calcFlag:false,
// 项目列表
projectList: [],
loading: true,
selectHead: new Date().getDate(),
// 当前月的天数
dateLength:31,
// 计算提交月份
date:new Date(),
// 提交表单
form: {},
showCalc:false,
// 查询参数
userQueryParams: {
pageNum: 1,
@@ -106,6 +260,8 @@ export default {
status: undefined,
deptId: undefined
},
calcUser:{
},
queryParams:{
pageNum: 1,
pageSize: 50,
@@ -116,6 +272,7 @@ export default {
projectQueryParams: {
pageNum: 1,
pageSize: 10,
projectStatus:0,
projectName: undefined,
projectNum: undefined,
beginTime: undefined,
@@ -125,17 +282,48 @@ export default {
// 日期范围
dateRange: [],
selectAll: true,
calcResult:[],
calcResultItem:{},
calcResultUser:{},
calcResultAttendances:[],
calcResultProject:{},
}
},
mounted() {
const day = new Date().getDate();
},
created() {
this.getDate();
this.getList();
},
methods: {
// 查看计算结果
handleCalc(row){
this.showCalc = true;
this.calcUser = row
this.calcResultItem = this.calcResult.filter(item=>item.sysUser.userId===this.calcUser.userId)[0]
this.calcResultAttendances = this.calcResultItem.attendances
console.log(this.calcResultItem)
},
// 计算
calcWork(){
workCalc(this.date).then(res=>{
this.calcResult = res.data;
this.calcFlag = true;
})
},
getDate(){
getDateLength().then(res => {
this.dateLength = res.data;
})
},
selectAttendDay(item,index, index2) {
this.selectIndex = index2;
this.selectAll = false;
@@ -153,7 +341,6 @@ export default {
getList() {
this.loading = true;
listOaAttendance(this.queryParams).then(res=>{
console.log(res.data)
this.userList = res.data;
this.total = res.total;
});

View File

@@ -0,0 +1,160 @@
<template>
<div class="container">
<h1>项目结项报告</h1>
<p><strong>项目名称</strong> {{ project.projectName }}</p>
<p><strong>项目总成本</strong> ¥{{ project.funds }}</p>
<p><strong>项目用时</strong> {{ (new Date(project.postponeTime)-new Date(project.beginTime))/1000/60/60/24 }}</p>
<div v-for="(item,index) in stepsList" :key="index">
<h2>{{item.dictLabel}}-人员情况</h2>
<div v-for="(task,index) in item.taskList" :key="index">
<h3>负责人-{{task.collaborator}}</h3>
<table>
<tr>
<th>姓名</th>
<th>工作时长 ()</th>
<th>人力成本 (/)</th>
<th>总成本 ()</th>
</tr>
<tr v-for="member in task.workerList" :key="member.name">
<td>{{ member.nickName }}</td>
<td>{{ member.workTime }}</td>
<td>{{ member.laborCost }}</td>
<td>{{ (member.workTime * member.laborCost).toLocaleString() }}</td>
</tr>
<tr class="summary">
<td colspan="3">总计</td>
<td>¥{{ task.projectCostTotal }}</td>
</tr>
</table>
</div>
</div>
<div class="footer">
<p>© 2024 项目结项报告 | 由项目团队生成</p>
</div>
</div>
</template>
<script>
import {getProject} from "@/api/oa/project";
import {getTaskByDictType} from "@/api/oa/task";
export default {
name: "closure",
data() {
return {
// 项目名
projectName: "AI 数据分析系统开发",
// 项目涉及人员
teamMembers: [
{name: '李某某', role: '项目经理', hours: 160, rate: 300, completed: '已完成'},
{name: '王某', role: '前端开发', hours: 150, rate: 250, completed: '已完成'},
{name: '张某', role: '后端开发', hours: 170, rate: 280, completed: '进行中'},
{name: '陈某', role: '测试工程师', hours: 140, rate: 220, completed: '已完成'},
{name: '赵某', role: '产品经理', hours: 130, rate: 350, completed: '已完成'}
],
// 项目花费
projectCost: 990000,
totalHumanCost: 10000,
project:{},
stepsList:[],
active:{}
}
},
created() {
this.projectId = this.$route.params.projectId;
this.getProject()
this.getTaskByDictType(this.projectId);
},
methods:{
getProject(){
getProject(this.projectId).then(response => {
this.project = response.data;
})
},
/**new-工作类型进度**/
getTaskByDictType(pid) {
getTaskByDictType(pid).then(res => {
//排序
this.stepsList = res.data.data.taskList.sort((a, b) => parseInt(a.dictValue) - parseInt(b.dictValue));
this.active = res.data.data.active;
console.log(this.stepsList)
})
},
}
}
</script>
<style scoped lang="scss">
* {
margin: 15px auto;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
padding: 20px;
}
.container {
max-width: 800px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
margin: auto;
}
h1 {
text-align: center;
color: #333;
margin-bottom: 30px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th, td {
padding: 12px;
border: 1px solid #ddd;
text-align: center;
}
th {
background-color: #007bff;
color: #fff;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
.summary {
font-weight: bold;
color: #007bff;
}
.footer {
text-align: center;
margin-top: 30px;
font-size: 14px;
color: #666;
}
</style>

View File

@@ -53,20 +53,35 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="outWareHouseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="项目名" align="center" prop="projectName"/>
<el-table-column label="创建时间" align="center" prop="createtime"/>
<el-table-column label="出库单" align="center" prop="id"/>
<el-table-column label="物料名" align="center" prop="warehouseName"/>
<el-table-column label="出库数量" align="center" prop="amount"/>
<el-table-column label="关联项目" align="center" prop="projectName">
<template slot-scope="scope">
<div v-if="scope.row.projectName!==null">
<el-tooltip class="item" effect="dark" content="点击查看该项目出库情况" placement="bottom">
<el-button
size="mini"
type="text"
@click="handleSearch(scope.row)"
> {{ scope.row.projectName }}
</el-button>
</el-tooltip>
</div>
<div v-else>未关联项目</div>
</template>
</el-table-column>
<el-table-column label="出库时间" align="center" prop="createTime"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-search"
@click="handleSearch(scope.row)"
v-hasPermi="['oa:oaOutWarehouse:remove']"
@click="showDetail(scope.row)"
>查看详情
</el-button>
</template>
@@ -81,10 +96,128 @@
@pagination="getList"
/>
<!-- 详情描述弹窗 -->
<el-dialog title="出库物料详情" :visible.sync="detail" width="800px" append-to-body>
<!-- 物料数据 -->
<el-descriptions class="margin-top" title="物料数据" :column="3" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-s-order"></i>
出库单
</template>
{{outDetail.id}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-postcard"></i>
出库数量{{warehouseDetail.unit}}
</template>
{{ outDetail.amount }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-collection"></i>
物料名
</template>
{{ warehouseDetail.name }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>
操作人
</template>
{{ outDetail.createBy }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-date"></i>
出库时间
</template>
{{ outDetail.createTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-collection"></i>
关联项目
</template>
{{projectDetail==null?'未关联项目':projectDetail.projectName}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
备注
</template>
{{outDetail.remark==null?'空':outDetail.remark}}
</el-descriptions-item>
</el-descriptions>
<!-- 项目数据 如果有的话显示 -->
<el-descriptions v-if="projectDetail!==null" class="margin-top" title="项目数据" :column="3" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-s-order"></i>
项目编号
</template>
{{ projectDetail.projectNum }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-s-flag"></i>
项目名
</template>
{{outDetail.id}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-s-opportunity"></i>
项目状态
</template>
<el-tag> {{projectDetail.projectStatus==0?'未完结':'结项'}} </el-tag>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
备注
</template>
{{projectDetail.remark==null?'空':projectDetail.remark}}
</el-descriptions-item>
</el-descriptions>
<div slot="footer" class="dialog-footer">
<el-button @click="detail = false">关闭</el-button>
</div>
</el-dialog>
<!-- 添加或修改仓库出库对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item
label="绑定项目"
>
<el-radio-group v-model="projectFlag">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="projectFlag"
prop="projectId"
label="项目名"
>
@@ -98,6 +231,19 @@
</el-select>
</el-form-item>
<el-form-item
v-else
prop="remark"
label="备注"
>
<el-input
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
placeholder="请输入内容"
v-model="form.remark">
</el-input>
</el-form-item>
<el-form-item
v-for="(item, index) in form.outWareHouseList"
:label="'出库物料' + index"
@@ -132,7 +278,7 @@
</el-col>
<el-col :span="4">
<el-tag type="info" v-if="item.inventory===undefined">请选择物料</el-tag>
<el-tag type="info" v-else>{{item.inventory}}</el-tag>
<el-tag type="info" v-else>{{ item.inventory }}</el-tag>
</el-col>
<el-col :span="8">
<el-input-number v-model="item.amount" :min="1" :max="item.inventory"></el-input-number>
@@ -187,7 +333,7 @@
<el-table v-loading="loading" :data="oaOutWarehouseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="物料名" align="center" prop="warehouseName"/>
<el-table-column label="出库单" align="center" prop="id"/>
<el-table-column label="出库数量" align="center" prop="amount"/>
<el-table-column label="出库时间" align="center" prop="createTime"/>
<el-table-column label="备注" align="center" prop="remark"/>
@@ -229,7 +375,16 @@ export default {
return {
// 抽屉
drawer: false,
// 查看详情弹窗
outDetail:{},
// 弹窗标志
detail:false,
// 绑定项目详情
projectDetail:{},
// 物料信息详情
warehouseDetail:{},
// 出库列表
outWareHouseList: [],
// 按钮loading
buttonLoading: false,
// 遮罩层
@@ -254,8 +409,11 @@ export default {
title: "",
// 选择对象
searchItem: {},
// 是否显示弹出层
open: false,
// 是否绑定项目
projectFlag: false,
// 库存查询参数
warehouseParams: {
pageSize: 999,
@@ -264,11 +422,12 @@ export default {
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
projectName: undefined,
pageSize: 10
},
// 表单参数
form: {},
form: {
productId: ''
},
// 表单校验
rules: {
amount: [
@@ -287,10 +446,15 @@ export default {
/** 查询仓库出库列表 */
getList() {
this.loading = true;
listOaOutWarehouse(this.queryParams).then(res => {
this.outWareHouseList = res.rows
this.total = res.total
this.loading = false
})
listProject(this.queryParams).then(response => {
this.projectList = response.rows
this.total = response.total;
this.loading = false;
});
},
@@ -400,6 +564,7 @@ export default {
addDomain() {
this.form.outWareHouseList.push({
value: '',
warehouseId: '',
key: Date.now()
});
},
@@ -410,8 +575,8 @@ export default {
}
},
handleGetInventory(e,index){
this.form.outWareHouseList[index].inventory = this.oaWarehouseList[this.oaWarehouseList.findIndex(item=>item.id===e)].inventory
handleGetInventory(e, index) {
this.form.outWareHouseList[index].inventory = this.oaWarehouseList[this.oaWarehouseList.findIndex(item => item.id === e)].inventory
console.log(this.form.outWareHouseList[index])
},
@@ -432,6 +597,12 @@ export default {
};
},
getOaOutWarehouseList(){
listOaWarehouse(this.warehouseParams).then(res => {
this.oaWarehouseList = res.rows
})
},
remoteMethod(query) {
this.warehouseParams.name = query
this.selectLoading = true;
@@ -454,6 +625,19 @@ export default {
this.drawer = true;
this.loading = false;
})
},
// 查看出库单独条目详情
showDetail(row){
getOaOutWarehouse(row.id).then(response => {
console.log(response.data);
this.outDetail = response.data;
this.projectDetail = response.data.project;
this.warehouseDetail = response.data.warehouse;
})
this.detail=true;
}
}
};

View File

@@ -0,0 +1,180 @@
<template>
<div class="app-container">
<el-row :gutter="20" class="mb8">
<el-col >
<el-card class="box-card">
<!-- <div slot="header" class="clearfix">-->
<!-- <span>卡片名称</span>-->
<!-- <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>-->
<!-- </div>-->
<div class="text item">
物料<strong>{{warehouse.name}}</strong>
的出库详情
</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['oa:oaOutWarehouse:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['oa:oaOutWarehouse:remove']"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['oa:oaOutWarehouse:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="outWarehouseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="出库单" align="center" prop="id"/>
<el-table-column :label="'出库数量('+warehouse.unit+')'" align="center" prop="amount"/>
<el-table-column label="出库时间" align="center" prop="createTime"/>
<el-table-column label="关联项目" align="center" prop="projectName"/>
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-search"
@click="handleSearch(scope.row)"
v-hasPermi="['oa:oaOutWarehouse:remove']"
>查看详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-drawer
size="70%"
title="我是标题"
:visible.sync="drawer"
:with-header="false">
<el-button
style="margin: 25px"
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['oa:oaOutWarehouse:add']"
>新增
</el-button>
<el-table v-loading="loading" :data="outWarehouseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="物料名" align="center" prop="warehouseName"/>
<el-table-column label="出库数量" align="center" prop="amount"/>
<el-table-column label="出库时间" align="center" prop="createTime"/>
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['oa:oaOutWarehouse:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-drawer>
</div>
</template>
<script>
import {listOaOutWarehouse} from "@/api/oa/oaOutWarehouse";
import {getOaWarehouse} from "@/api/oa/oaWarehouse";
export default {
name: "data",
data() {
return {
// 出库列表
outWarehouseList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
warehouseId: this.$route.params.warehouseId,
},
// 物料信息
warehouse:{},
// 加载
loading:false
}
},
created() {
this.getWarehouse();
this.getList();
},
methods: {
getWarehouse() {
getOaWarehouse(this.queryParams.warehouseId).then(res => {
this.warehouse = res.data;
})
},
// 获取列表
getList() {
this.loading = true;
listOaOutWarehouse(this.queryParams).then(res => {
this.outWarehouseList = res.rows;
this.total = res.total;
this.loading = false;
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -91,7 +91,16 @@
<el-table v-loading="loading" :data="oaWarehouseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="物料名称" align="center" prop="name" />
<el-table-column label="物料" align="center" prop="name" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/oa/warehouse-data/index/' + scope.row.id" class="link-type">
<span>{{ scope.row.name }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="型号" align="center" prop="model" />
<el-table-column label="库存数量" align="center" prop="inventory" />
<el-table-column label="单位" align="center" prop="unit" />

View File

@@ -166,11 +166,22 @@
<el-button
size="mini"
type="text"
v-if="scope.row.projectStatus === '0'"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['oa:project:edit']"
>实施
</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.projectStatus === '0'"
icon="el-icon-edit"
@click="handleClosure(scope.row)"
v-hasPermi="['oa:project:edit']"
>结项
</el-button>
<el-button
size="mini"
type="text"
@@ -1757,6 +1768,14 @@ export default {
this.loading = false;
});
},
/** 前往结项页面 */
handleClosure(row){
const projectId = row.projectId;
// 前往项目结项报告
this.$router.push('/project/closure/detail/'+projectId)
},
/** 导出按钮操作 */
handleExport() {
this.download('oa/project/export', {
@@ -1769,7 +1788,6 @@ export default {
if (query !== '') {
this.queryLoading = true;
listWorker().then(res=>{
console.log(res.rows)
this.workerList = res.rows.filter(item => {
return item.nickName.toLowerCase()
.indexOf(query.toLowerCase()) > -1;