车间组件完成情况
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 机床名称
|
||||
export function getMachines() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_传递后_机床名称_根据机床查询',
|
||||
param: '是否传递=2=int&考核状态=6=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取组号
|
||||
export function getGroups(stepNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组_新',
|
||||
param: '机床流水号=' + stepNumber + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
1
src/icons/svg/ScheduleCompletionDetails.svg
Normal file
1
src/icons/svg/ScheduleCompletionDetails.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302173366" class="icon" style="" viewBox="0 0 1044 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2695" xmlns:xlink="http://www.w3.org/1999/xlink" width="203.90625" height="200"><defs><style type="text/css"></style></defs><path d="M840.454 62.442h-638.605c-76.445 0-139.409 63.68-139.409 141.007v614.048c0 77.326 62.963 141.007 139.408 141.007h638.605c76.454 0 139.408-63.68 139.408-141.007v-614.048c0-77.326-58.454-141.007-139.408-141.007zM912.409 822.050c0 40.931-31.473 72.772-71.954 72.772h-638.605c-40.473 0-71.954-31.84-71.954-72.772v-618.603c0-40.931 31.481-72.772 71.954-72.772h638.605c40.481 0 71.954 31.84 71.954 72.772v618.603zM399.73 285.32l-98.936 100.065-44.973-45.477c-13.5-13.647-35.981-13.647-44.973 0-13.5 13.638-13.5 36.386 0 45.477l71.954 72.781c4.5 4.546 13.492 9.092 26.981 9.092 13.5 0 13.5-4.546 26.981-9.092l121.426-122.813c13.5-13.647 13.5-36.386 0-45.487-26.981-13.638-44.973-13.638-58.463-4.546zM813.473 339.908h-310.308c-22.481 0-31.481 13.638-31.481 31.84 0 22.739 13.5 31.84 31.481 31.84h310.316c22.481 0 31.473-13.647 31.473-31.84 0-18.202-13.5-31.84-31.481-31.84zM318.775 544.584c-58.463 0-103.436 45.487-103.436 104.62 0 59.125 44.973 104.611 103.436 104.611 58.473 0 103.436-45.487 103.436-104.611 0-63.68-49.463-104.62-103.436-104.62zM318.775 681.043c-22.481 0-35.973-13.647-35.973-36.386 0-22.747 13.492-36.395 35.973-36.395 22.492 0 35.981 13.647 35.981 36.395 0 22.739-17.992 36.386-35.981 36.386zM813.473 612.808h-310.308c-22.481 0-31.481 13.647-31.481 31.849 0 18.184 13.5 31.84 31.481 31.84h310.316c22.481 0 31.473-13.647 31.473-31.84 0-18.202-13.5-31.84-31.481-31.84z" p-id="2696"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -26,8 +26,8 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil
|
||||
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
|
||||
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
|
||||
const service = axios.create({
|
||||
// baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`,
|
||||
// baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
})
|
||||
export default service
|
||||
|
||||
@@ -52,6 +52,17 @@ export function getNowTime() {
|
||||
const time = date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
|
||||
return time
|
||||
}
|
||||
// 获取当前0晨
|
||||
export function getNowTime1() {
|
||||
const date = new Date()
|
||||
const month = zeroFill(date.getMonth() + 1)
|
||||
const day = zeroFill(date.getDate())
|
||||
const hour = '00'
|
||||
const minute = '00'
|
||||
const second = '00'
|
||||
const time = date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
|
||||
return time
|
||||
}
|
||||
// 判断类型
|
||||
export function type(target) {
|
||||
const ret = typeof (target)
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 180px;" placeholder="机床号" @change="getTreeData">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="Complete" size="small" clearable placeholder="是否完成" style="margin:0px 10px;width: 120px;">
|
||||
<el-option
|
||||
v-for="item in Completes"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-col style="width: 530px">
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
loading="loading"
|
||||
class="table"
|
||||
style="height: 800px"
|
||||
highlight-current-row
|
||||
empty-text=" "
|
||||
border>
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column align="center" label="工艺名" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="序间质检" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序间质检 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="不合格数" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.不合格数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作者" show-overflow-tooltip width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作者 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="完成日期" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width:600px">
|
||||
<el-row>
|
||||
<el-card class="box-card" style="min-height: 400px">
|
||||
<div style="min-height: 650px">
|
||||
<el-tree
|
||||
:data="departmentData"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:indent="30"
|
||||
class="gongyizhiding"
|
||||
default-expand-all
|
||||
@node-click="onClick"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-card style="height: 400px">
|
||||
详情
|
||||
</el-card>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMachines, getGroups } from '@/api/ManufacturingCenter/CompletionOfWorkshopComponents'
|
||||
import Cookie from 'js-cookie'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Machine: '', // 机床号
|
||||
Machines: [],
|
||||
Group: '', // 组号
|
||||
Groups: [],
|
||||
number: '', // 零件图号
|
||||
Completes: [{
|
||||
value: 1,
|
||||
label: '完成'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '在制'
|
||||
}],
|
||||
departmentData: [], // 树状数据
|
||||
MachineDrawingNumber: [] // 获取树状机床信息
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getMachine()
|
||||
},
|
||||
methods: {
|
||||
getMachine() {
|
||||
if (Cookie.get('machineValue') !== undefined) {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
if (Cookie.get('group') !== undefined) {
|
||||
this.Machine = parseInt(Cookie.get('machineValue'))
|
||||
this.getGroup()
|
||||
this.getTableData()
|
||||
this.Group = parseInt(Cookie.get('group'))
|
||||
// this.getTableData()
|
||||
Cookie.remove('machineValue')
|
||||
Cookie.remove('group')
|
||||
} else {
|
||||
// this.getTableData()
|
||||
Cookie.remove('machineValue')
|
||||
Cookie.remove('group')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}, // 获取组号
|
||||
getGroup() {
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getGroups(this.Machine).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Groups.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
this.Group = response.data[0].组件流水号
|
||||
})
|
||||
}, // 获取树状数据
|
||||
getTreeData() {
|
||||
getGroups(this.Machine).then(response => { // 初始化机床图号分类
|
||||
this.options = []
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.options.push({
|
||||
label: response.data[i].组号 + '●●●' + response.data[i].组件名称,
|
||||
value: response.data[i].组件流水号,
|
||||
father: true,
|
||||
children: []
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
// this.options.map(firstLevel => {
|
||||
// processNameSelect(firstLevel.value).then(response => { // 根据分类查询机床图号
|
||||
// firstLevel.children = []
|
||||
// for (let j = 0; j < response.data.length; j++) {
|
||||
// firstLevel.children.push({
|
||||
// label: response.data[j].机床图号,
|
||||
// value: response.data[j].机床流水号,
|
||||
// father: false
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
}).then(() => {
|
||||
this.departmentData = this.options
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -66,10 +66,10 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="margin-left: 0px;width: 830px">
|
||||
<el-col style="margin-left: 0px;width: 850px">
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe highlight-current-row style="width: 100%;" height="800px" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="零件图号" align="center" width="150px" show-overflow-tooltip>
|
||||
<el-table-column label="零件图号" align="center" width="170px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
@@ -79,7 +79,7 @@
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺名称" align="center" width="70px">
|
||||
<el-table-column label="工艺名称" align="center" width="70px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
@@ -133,11 +133,11 @@
|
||||
|
||||
<script>
|
||||
import { searchtable, searchtable2 } from '@/api/ManufacturingCenter/ScheduleCompletionDetails'
|
||||
import { getNowTime } from '@/utils/tool'
|
||||
import { getNowTime, getNowTime1 } from '@/utils/tool'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
startTime: '', // 开始时间
|
||||
startTime: getNowTime1(), // 开始时间
|
||||
endTime: getNowTime(), // 结束时间
|
||||
tableData: [], // 操作者工时统计
|
||||
loading: '',
|
||||
|
||||
Reference in New Issue
Block a user