This commit is contained in:
liushuai
2020-01-06 18:44:28 +08:00
4 changed files with 110 additions and 81 deletions

View File

@@ -1,27 +1,27 @@
import request from '@/utils/request'
// 查询人员总工工时
export function searchtable(num2, num3, num4, num5, pageCurrent, pageSize) {
export function searchtable(num1, num2, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_工时统计_查询数据2_新',
param: '操作者_check=0&姓名=' + num2 + '&时间_check=' + num3 + '&开始时间=' + num4 + '&结束时间=' + num5,
name: '车间生产管理工艺_工时统计_设备工时_Vue',
param: '开始时间=' + num1 + '&结束时间=' + num2,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询人员具体工序
export function searchtable2(num1, num2, num3, num4, pageCurrent, pageSize) {
export function searchtable2(num1, num2, num3, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_工时统计按人员查询_查询数据2_新',
param: '工作者编号=' + num1 + '&时间_check=' + num2 + '&开始时间=' + num3 + '&结束时间=' + num4,
name: '车间生产管理工艺_工时统计_设备工时_Vue_详细',
param: '人员编号=' + num1 + '&开始时间=' + num2 + '&结束时间=' + num3,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -189,14 +189,14 @@ export function selectProvince() {
}
})
}
export function SelectMarketingManager(code) {
export function SelectMarketingManager() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '客户关系管理系统_按姓名查询_营销经理',
param: '姓名=' + code
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=7'
}
})
}
@@ -287,3 +287,35 @@ export function searchTimeAll() {
}
})
}
export function SelectPartment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '选择营销经理_部门查询'
}
})
}
export function SelectMarketingManager1(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=' + num
}
})
}
export function addMarketingManager(MarketingManagerId, AdressID) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '客户关系管理系统_营销经理_增加数据_MESWORK',
param: '营销经理流水号=' + MarketingManagerId + '&省份流水号=' + AdressID + '&导入类型=0=int=output'
}
})
}

View File

@@ -17,24 +17,11 @@
type="date"
placeholder="选择加工完成日期"/>
<el-button type="success" class="el-icon-search" size="small" style="margin:0px 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
<!-- <el-tooltip :open-delay="1000" content="导出人员工时统计表" placement="right">-->
<!-- <el-button type="primary" size="small" icon="el-icon-download" style="margin:0px 10px" @click="exportUninquirySheet1()">导出</el-button>-->
<!-- </el-tooltip>-->
</el-card>
<el-row>
<el-col style="width: 350px">
<el-col :span="8">
<el-card>
<el-table
v-loading="loading"
:data="tableData"
highlight-current-row
size="mini"
stripe
style="width: 100%;"
height="700px"
border
element-loading-text="拼命加载中"
@row-click="searchTable2">
<el-table v-loading="loading" :data="tableData" highlight-current-row size="mini" stripe style="width: 100%;" height="700px" border element-loading-text="拼命加载中" @row-click="searchTable2">
<el-table-column label="操作者" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.姓名 }}
@@ -42,17 +29,27 @@
</el-table-column>
<el-table-column label="计划工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.理论加工时间段 }}
{{ scope.row.定额总工时 }}
</template>
</el-table-column>
<el-table-column label="实际工时" align="center" width="70px">
<el-table-column label="设备工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.设备工时 }}
{{ scope.row.设备工时 }}
</template>
</el-table-column>
<el-table-column label="扫码工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.扫码总工时 }}
</template>
</el-table-column>
<el-table-column label="修补准结工时" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.修补准结总工时 }}
</template>
</el-table-column>
<el-table-column label="完成数量" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.完成数量 }}
{{ scope.row.数量 }}
</template>
</el-table-column>
</el-table>
@@ -66,7 +63,7 @@
</div>
</el-card>
</el-col>
<el-col style="margin-left: 0px;width: 860px">
<el-col :span="16">
<el-card>
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe highlight-current-row style="width: 100%;" height="700px" border element-loading-text="拼命加载中">
<el-table-column label="零件图号" align="center" width="140px" show-overflow-tooltip>
@@ -89,34 +86,29 @@
{{ scope.row.完成数量 }}
</template>
</el-table-column>
<el-table-column label="序间质检" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.质检结果 }}
</template>
</el-table-column>
<!--<el-table-column label="不合格数" align="center" width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.不合格数量 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="计划工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.理论加工时间段 }}
{{ scope.row.工时总额 }}
</template>
</el-table-column>
<el-table-column label="加工工时" align="center" width="70px">
<el-table-column label="设备工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.设备工时 ? scope.row.设备工时 : 0 }}
{{ scope.row.设备工时 }}
</template>
</el-table-column>
<el-table-column label="加工开始" align="center" width="135px">
<el-table-column label="扫码工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.加工开始时间 }}
{{ scope.row.扫码工时 }}
</template>
</el-table-column>
<el-table-column label="加工完成" align="center" width="135px">
<el-table-column label="修补准结工时" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.加工完成时间 }}
{{ scope.row.修补准结工时 }}
</template>
</el-table-column>
<el-table-column label="加工时间" align="center" width="135px">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
</template>
</el-table-column>
</el-table>
@@ -168,12 +160,7 @@ export default {
this.tableData = []
this.tableData2 = []
this.total2 = 0
if (this.startTime !== '' && this.startTime !== null && this.endTime !== null && this.endTime !== null) {
this.timeCheck = 1
} else {
this.timeCheck = 0
}
searchtable(this.operater, this.timeCheck, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
searchtable(this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
@@ -188,23 +175,9 @@ export default {
this.loading2 = true
this.tableData2 = []
this.pageCurrent2 = 1
searchtable2(row.人员编号, this.timeCheck, this.startTime, this.endTime, this.pageCurrent2, this.pageSize2).then(response => {
searchtable2(row.人员编号, this.startTime, this.endTime, this.pageCurrent2, this.pageSize2).then(response => {
if (response.data.rows.length !== 0) {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData2.push({
零件图号: response.data.rows[i].零件图号,
零件名称: response.data.rows[i].零件名称,
工艺名称: response.data.rows[i].工艺名称,
完成数量: response.data.rows[i].完成数量,
质检结果: response.data.rows[i].质检结果,
设备工时: response.data.rows[i].设备工时,
不合格数量: response.data.rows[i].不合格数量,
理论加工时间段: response.data.rows[i].理论加工时间段,
实际加工时间段: response.data.rows[i].实际加工时间段,
加工开始时间: response.data.rows[i].加工开始时间 ? response.data.rows[i].加工开始时间 : '',
加工完成时间: response.data.rows[i].加工完成时间 ? response.data.rows[i].加工完成时间 : ''
})
}
this.tableData2 = response.data.rows
}
this.loading2 = false
this.total2 = response.data.total

View File

@@ -415,9 +415,9 @@
<!--营销经理选择-->
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="500px">
<span>姓名</span>
<el-input v-model="name" clearable size="small" style="width: 200px"/>
<el-button size="small" type="success" style="margin-left: 10px" icon="el-icon-search" @click="searchName">查询</el-button>
<!-- <span>姓名</span>-->
<!-- <el-input v-model="name" clearable size="small" style="width: 200px"/>-->
<!-- <el-button size="small" type="success" style="margin-left: 10px" icon="el-icon-search" @click="searchName">查询</el-button>-->
<!--<span>责权省份</span>-->
<!--<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">-->
<!--<el-option-->
@@ -426,18 +426,25 @@
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<div style="margin-top: 15px">
<el-table :data="tableData3" border stripe style="width: 100%; text-align: center;" size="mini" highlight-current-row @row-click="handleChange">
<div style="margin-top: 15px;">
<el-table :data="tableData4" border stripe style="width: 200px; text-align: center;display: inline-block;vertical-align: top;" size="mini" highlight-current-row @row-click="handleChange1">
<el-table-column label="部门" align="center" >
<template slot-scope="scope">
{{ scope.row.部门名称 }}
</template>
</el-table-column>
</el-table>
<el-table :data="tableData3" border stripe style="width: 200px;height:350px; text-align: center;display: inline-block;vertical-align: top;" size="mini" highlight-current-row @row-click="handleChange">
<el-table-column label="销售经理" align="center" >
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<!-- <el-table-column label="性别" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.性别 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
<div slot="footer" class="dialog-footer">
@@ -573,7 +580,7 @@
<script>
import elInput from 'element-ui/packages/input'
import { searchTimeAll, searchTime, selectBidBond, changeExecutionProgressID, initProject, searchTable1, fetchExecutionProgress, delList, addList, executionProgressID, editchar, getTree, tree, getTablePeople, fetchCustomerData, getFileData, deleteFileData, selectMachine, selectProvince, SelectMarketingManager, submitMachine, editMachine, delMachine, money } from '@/api/MarketingCenter/ContractInformationManagement'
import { addMarketingManager, SelectMarketingManager1, SelectPartment, searchTimeAll, searchTime, selectBidBond, changeExecutionProgressID, initProject, searchTable1, fetchExecutionProgress, delList, addList, executionProgressID, editchar, getTree, tree, getTablePeople, fetchCustomerData, getFileData, deleteFileData, selectMachine, selectProvince, SelectMarketingManager, submitMachine, editMachine, delMachine, money } from '@/api/MarketingCenter/ContractInformationManagement'
import { upload, download } from '@/utils/request'
export default {
components: {
@@ -647,6 +654,7 @@ export default {
tableData1: [], // 合同信息表
tableData2: [], // 机床信息表
tableData3: [], // 营销经理表
tableData4: [], // 部门表
PageCurrent: 1,
PageSize: 30,
total: null,
@@ -714,10 +722,22 @@ export default {
},
methods: {
searchName() { // 模糊查询姓名
SelectMarketingManager(this.name).then(response => {
this.tableData3 = []
SelectMarketingManager().then(response => {
this.tableData3 = response.data
})
},
handleChange1(row) {
this.tableData3 = []
SelectMarketingManager1(row.考核部门编号).then(response => {
this.tableData3 = response.data
})
},
searchPartment() { // 模糊查询姓名
SelectPartment().then(response => {
this.tableData4 = response.data
})
},
fetchData() {
getTree().then(response => { // 获取人员信息树
const data = response.data
@@ -734,6 +754,7 @@ export default {
this.name = ''
this.tableData3 = []
this.dialogFormVisiblePeople = true
this.searchPartment()
},
getRowKeys(row) {
return row.项目流水号
@@ -744,10 +765,13 @@ export default {
})
},
handleChange(row) {
this.peopleid = row.营销经理流水
this.peopleid = row.人员编
this.peoplename = row.姓名
},
getName() {
addMarketingManager(this.peopleid, 1).then(response => {
console.log(response, 123)
})
if (this.param === 1) {
this.dialogFormVisiblePeople = false
this.MarketingManagerValue = this.peoplename