完成日期补录正在加工零件

This commit is contained in:
bryan sun
2019-10-30 18:39:43 +08:00
parent 95794ba703
commit 59ed8e2d4d
9 changed files with 504 additions and 51 deletions

BIN
dist.zip

Binary file not shown.

View File

@@ -7,8 +7,7 @@ export function getMachines() {
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间生产管理工艺_传递后_机床名称_根据机床查询', name: 'PDM_机床名称_全部_查询数据'
param: '是否传递=2=int&考核状态=6=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
} }
}) })
} }

View File

@@ -0,0 +1,33 @@
import request from '@/utils/request'
export function searchData() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_加工顺序调整_查询正在加工零件工序_NEW'
}
})
}
export function processingStatus(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_成组配套加工进度_查询数据',
param: '工艺计划流水号=' + num
}
})
}
export function searchData1() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'MES_机加工MES_记录零件待加工显示_NEW'
}
})
}

View File

@@ -48,4 +48,65 @@ export function gettabledata1(num) {
} }
}) })
} }
// 补录加工完成日期
export function editdata(processSerialNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_加工进度查询_查询_New',
param: '工艺计划流水号=' + processSerialNumber + '=int'
}
})
}
// 初始化人员信息 弹出框
export function getTree() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '人事档案管理_部门关系_查询节点',
param: '子节点=0=int'
}
})
}
export function fn(data, pid) {
const result = []
let temp
for (let i = 0; i < data.length; i++) {
if (data[i].父节点 === pid) {
const obj = { label: data[i].节点名称, id: data[i].子节点 }
temp = fn(data, data[i].子节点)
if (temp.length > 0) {
obj.children = temp
}
result.push(obj)
}
}
return result
}
export function getTable8(code) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=' + code + '=int'
}
})
}
export function submitEdit(Number1, completetime, processSerialNumber) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '车间生产管理工艺_加工完成时间_补录',
param: '人员编号=' + Number1 + '=string&完成时间=' + completetime + '=string&工序流水号=' + processSerialNumber + '=string'
}
})
}

View File

@@ -52,6 +52,14 @@ export function getNowTime() {
const time = date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second const time = date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
return time return time
} }
// 获取当前时间(yyyy-mm-dd)
export function getNowShotTime() {
const date = new Date()
const month = zeroFill(date.getMonth() + 1)
const day = zeroFill(date.getDate())
const time = date.getFullYear() + '-' + month + '-' + day
return time
}
// 获取当前0晨 // 获取当前0晨
export function getNowTime1() { export function getNowTime1() {
const date = new Date() const date = new Date()

View File

@@ -18,8 +18,8 @@
</el-row> </el-row>
</el-card> </el-card>
<el-card style="width: 1100px;"> <el-card style="width: 1120px;">
<el-table v-loading="loading" :data="tableData" stripe height="700" size="mini" style="width: 1100px;" border> <el-table v-loading="loading" :data="tableData" stripe height="700" size="mini" style="width: 1150px;" border>
<el-table-column label="序号" type="index" align="center" width="55"/> <el-table-column label="序号" type="index" align="center" width="55"/>
<el-table-column label="操作者" prop="姓名" align="center" width="80px"> <el-table-column label="操作者" prop="姓名" align="center" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">

View File

@@ -62,7 +62,8 @@
<el-col style="width:600px"> <el-col style="width:600px">
<el-row> <el-row>
<el-card class="box-card" style="min-height: 400px"> <el-card class="box-card" style="min-height: 400px">
<div style="min-height: 650px"> <div>机床图号{{ MachineLabel }} 机床名称{{ MachineName }}</div>
<div style="min-height: 400px;margin-left: 50px;">
<el-tree <el-tree
:data="departmentData" :data="departmentData"
:props="defaultProps" :props="defaultProps"
@@ -96,6 +97,8 @@ export default {
Group: '', // 组号 Group: '', // 组号
Groups: [], Groups: [],
number: '', // 零件图号 number: '', // 零件图号
tableData1: [],
Complete: '',
Completes: [{ Completes: [{
value: 1, value: 1,
label: '完成' label: '完成'
@@ -104,7 +107,9 @@ export default {
label: '在制' label: '在制'
}], }],
departmentData: [], // 树状数据 departmentData: [], // 树状数据
MachineDrawingNumber: [] // 获取树状机床信息 MachineDrawingNumber: [], // 获取树状机床信息
MachineLabel: '', // 机床图号
MachineName: '' // 机床名称
} }
}, },
created() { created() {
@@ -122,7 +127,7 @@ export default {
this.Machines.push({ this.Machines.push({
label: response.data[i].机床图号, label: response.data[i].机床图号,
value: response.data[i].机床流水号, value: response.data[i].机床流水号,
value2: response.data[i].项目名称 value2: response.data[i].机床名称
}) })
} }
if (Cookie.get('group') !== undefined) { if (Cookie.get('group') !== undefined) {
@@ -149,7 +154,7 @@ export default {
this.Machines.push({ this.Machines.push({
label: response.data[i].机床图号, label: response.data[i].机床图号,
value: response.data[i].机床流水号, value: response.data[i].机床流水号,
value2: response.data[i].项目名称 value2: response.data[i].机床名称
}) })
} }
}) })
@@ -169,11 +174,17 @@ export default {
}) })
}, // 获取树状数据 }, // 获取树状数据
getTreeData() { getTreeData() {
for (let i = 0; i < this.Machines.length; i++) {
if (this.Machine === this.Machines[i].value) {
this.MachineLabel = this.Machines[i].label
this.MachineName = this.Machines[i].value2
}
}
getGroups(this.Machine).then(response => { // 初始化机床图号分类 getGroups(this.Machine).then(response => { // 初始化机床图号分类
this.options = [] this.options = []
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.options.push({ this.options.push({
label: response.data[i].组号 + '●●●' + response.data[i].组件名称, label: response.data[i].组号 + '..........' + response.data[i].组件名称,
value: response.data[i].组件流水号, value: response.data[i].组件流水号,
father: true, father: true,
children: [] children: []

View File

@@ -0,0 +1,220 @@
<template>
<div class="app-container">
<el-card>
<span style="margin-left: 30%;font-size: 20px;">正在加工零件列表</span>
<el-table :data="tableData" border size="mini" highlight-current-row style="width: 1160px" stripe height="475px">
<el-table-column label="机床图号" show-overflow-tooltip prop="机床图号" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" show-overflow-tooltip prop="机床名称" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="50px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" show-overflow-tooltip prop="零件图号" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" show-overflow-tooltip prop="零件名称" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="80px">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="工序名称" prop="工艺名称" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column label="工位" prop="终端编号" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.终端编号 }}
</template>
</el-table-column>
<el-table-column label="操作工" prop="姓名" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120px">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
plain
icon="el-icon-search"
@click="viewProcedures(scope.row)">查看工序</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<span style="margin-left: 30%;font-size: 20px">待加工零件列表</span>
<el-table :data="tableData3" border size="mini" highlight-current-row style="width: 1160px" stripe height="475px">
<el-table-column label="机床图号" prop="机床图号" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" show-overflow-tooltip prop="机床名称" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="50px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" show-overflow-tooltip prop="零件图号" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" show-overflow-tooltip prop="零件名称" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="80px">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="工序名称" prop="工艺名称" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column label="工位" prop="mes终端编号" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.mes终端编号 }}
</template>
</el-table-column>
<el-table-column label="操作工" prop="姓名" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="120">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
plain
icon="el-icon-search"
@click="viewProcedures(scope.row)">查看工序</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="工序完成情况" center style="min-height: 300px">
<el-row>
<span>零件图号:</span>
<el-input v-model="SparePartsNumber" style="width: 200px" size="small"/>
<span>零件名称:</span>
<el-input v-model="SparePartsName" style="width: 200px" size="small"/>
</el-row>
<el-table
:data="tableData2"
style="width: 100%;margin-top: 20px"
size="mini"
height="300"
stripe
highlight-current-row
border>
<el-table-column align="center" label="工序顺序" width="70">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺名称" width="120">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺要求">
<template slot-scope="scope">
{{ scope.row.工艺要求 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作工">
<template slot-scope="scope">
{{ scope.row.员工姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺是否完成" width="120">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.工序状态)===4" type="success" size="small">已完成</el-tag>
<el-tag v-if="parseInt(scope.row.工序状态)===5" type="warning" size="small">报废</el-tag>
<el-tag v-if="parseInt(scope.row.工序状态)!==4 && parseInt(scope.row.工序状态)!==5" type="primary" size="small">未完成</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="工艺是否质检" width="120">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否质检)===1" type="success" size="small">合格</el-tag>
<el-tag v-if="parseInt(scope.row.是否质检)===2" type="warning" size="small">不合格</el-tag>
<el-tag v-if="parseInt(scope.row.是否质检)!==1 && parseInt(scope.row.是否质检)!==2" type="primary" size="small">未检测</el-tag>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { searchData, processingStatus, searchData1 } from '@/api/ManufacturingCenter/MachiningParts'
export default {
data() {
return {
tableData: [], // 正在加工零件列表
dialogFormVisible: false,
SparePartsNumber: '',
SparePartsName: '',
tableData2: [],
tableData3: []
}
},
mounted() {
this.fetchData()
this.fetchData1()
},
methods: {
fetchData() {
searchData().then(response => {
this.tableData = response.data
})
},
fetchData1() {
searchData1().then(response => {
this.tableData3 = response.data
})
},
viewProcedures(row) {
this.dialogFormVisible = true
this.SparePartsNumber = row.零件图号
this.SparePartsName = row.零件名称
processingStatus(row.工艺计划流水号).then(response => {
this.tableData2 = response.data
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<!-- <el-button :disabled="isShow" type="info" size="small" style="margin: 0px 10px;" @click="EditData">补录完成日期</el-button>--> <el-button :disabled="isShow" type="info" size="small" style="margin: 0px 180px;float: right" @click="EditData">补录完成日期</el-button>
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 180px;" placeholder="机床号" @change="getGroup"> <el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 180px;" placeholder="机床号" @change="getGroup">
<el-option <el-option
v-for="item in Machines" v-for="item in Machines"
@@ -33,7 +33,8 @@
style="max-height: 830px" style="max-height: 830px"
highlight-current-row highlight-current-row
empty-text=" " empty-text=" "
border> border
@current-change="getRow">
<el-table-column type="index" label="序号" width="50"/> <el-table-column type="index" label="序号" width="50"/>
<el-table-column align="center" label="工艺名" width="90"> <el-table-column align="center" label="工艺名" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -79,7 +80,7 @@
border border
height="800" height="800"
@current-change="getCurrentRow"> @current-change="getCurrentRow">
<el-table-column type="index" label="序号" width="65"> <el-table-column type="index" label="序号" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio :label="scope.row.序号" v-model="radio"/> <el-radio :label="scope.row.序号" v-model="radio"/>
</template> </template>
@@ -133,11 +134,78 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px" class="demo-ruleForm">
<el-row width="200px">
<el-form-item label="操作员" prop="人员" >
<el-input v-model="form.人员" placeholder="操作员" readonly size="small" style="width: 80%" @focus="dialogTableVisible" />
</el-form-item>
<el-form-item label="人员编号" prop="人员编号" >
<el-input v-model="form.人员编号" placeholder="人员编号" disabled size="small" style="width: 80%" />
</el-form-item>
<el-form-item label="完成日期" prop="完成时间">
<el-date-picker
v-model="form.完成时间"
style="width: 80%"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="submit('form')" >确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible1" title="人员信息" center width="750px">
<div style="height: 500px">
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px">
<el-tree
:data="data2"
node-key="id"
style="width: 150px;float: left"
height="400"
accordion
default-expand-all="true"
highlight-current="true"
@node-click="handleNodeClick"/>
</div>
<el-table :data="List1" highlight-current-row height="400" style="width: 400px;float: left;margin-left: 30px" @row-click="handleCurrentChange2">
<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-column label="工作岗位" align="center">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
</el-table>
</div>
<el-button style="margin-left: 260px" @click="dialogFormVisible1 = false">取消</el-button>
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getMachines, getGroups, getTable, gettabledata1 } from '@/api/ManufacturingCenter/ProcessingStatusNew' import { getMachines, getGroups, getTable, gettabledata1, getTree, fn, getTable8, submitEdit } from '@/api/ManufacturingCenter/ProcessingStatusNew'
import Cookie from 'js-cookie' import Cookie from 'js-cookie'
export default { export default {
@@ -163,11 +231,32 @@ export default {
isShow: true, isShow: true,
processSerialNumber: '', // 工序流水号 processSerialNumber: '', // 工序流水号
startTime: '', // 开始时间 startTime: '', // 开始时间
endTime: '' endTime: '',
dateOfProduction: '', // 排产时间
title: '',
dialogFormVisible: false,
form: {
人员: '',
人员编号: '',
完成时间: ''
},
rules: {
人员: [{ required: true, message: '请选择操作员', trigger: 'change' }],
人员编号: [{ required: true, message: '人员编号', trigger: 'change' }],
完成时间: [{ required: true, message: '请选择实际完成时间', trigger: 'change' }]
},
dialogFormVisible1: false,
data2: [],
List1: [],
ssks: '',
Number1: '', // 人员编号
row2: [],
khbmbh: ''
} }
}, },
created() { created() {
this.getMachine() this.getMachine()
this.getTable9()
}, },
methods: { methods: {
getMachine() { getMachine() {
@@ -250,12 +339,6 @@ export default {
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => { getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.rows.length !== 0) { if (response.data.rows.length !== 0) {
for (let i = 0; i < response.data.rows.length; i++) { for (let i = 0; i < response.data.rows.length; i++) {
// while (response.data.rows[i].机加工实际完成时间.indexOf('-') >= 0) {
// response.data.rows[i].机加工实际完成时间 = (response.data.rows[i].机加工实际完成时间.replace('-', '/'))
// }
// while (response.data.rows[i].机加工结束时间.indexOf('-') >= 0) {
// response.data.rows[i].机加工结束时间 = (response.data.rows[i].机加工结束时间.replace('-', '/'))
// }
this.tableData.push({ this.tableData.push({
工艺计划流水号: response.data.rows[i].工艺计划流水号, 工艺计划流水号: response.data.rows[i].工艺计划流水号,
序号: response.data.rows[i].序号, 序号: response.data.rows[i].序号,
@@ -263,10 +346,8 @@ export default {
零件名称: response.data.rows[i].零件名称, 零件名称: response.data.rows[i].零件名称,
加工数: response.data.rows[i].完成数量, // MES里采集 现在没有 加工数: response.data.rows[i].完成数量, // MES里采集 现在没有
投产数量: response.data.rows[i].批次数量, 投产数量: response.data.rows[i].批次数量,
// 完成日期: response.data.rows[i].完成日期,
完成日期: response.data.rows[i].机加工实际完成时间 ? response.data.rows[i].机加工实际完成时间.split(' ')[0] : '', // 排产时间 完成日期: response.data.rows[i].机加工实际完成时间 ? response.data.rows[i].机加工实际完成时间.split(' ')[0] : '', // 排产时间
计划结束时间: response.data.rows[i].机加工结束时间 ? response.data.rows[i].机加工结束时间.split(' ')[0] : '', 计划结束时间: response.data.rows[i].机加工结束时间 ? response.data.rows[i].机加工结束时间.split(' ')[0] : '',
// 计划结束时间: response.data.rows[i].计划结束时间,
客户名称: response.data.rows[i].客户名称 // 客户名 客户名称: response.data.rows[i].客户名称 // 客户名
}) })
} }
@@ -276,58 +357,98 @@ export default {
}) })
}, // 获取工序表 }, // 获取工序表
getCurrentRow(row) { getCurrentRow(row) {
// this.radio = row.序号 this.completeTime = ''
this.dateOfProduction = ''
this.processSerialNumber = ''
this.radio = true this.radio = true
this.tableData1 = [] this.tableData1 = []
this.row2 = row
gettabledata1(row.工艺计划流水号).then(response => { gettabledata1(row.工艺计划流水号).then(response => {
console.log(response, 909090)
if (response.data.length !== 0) { if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
// while (response.data[i].计划日期.indexOf('-') >= 0) {
// response.data[i].计划日期 = (response.data[i].计划日期.replace('-', '/'))
// }
// while (response.data[i].工序完成日期.indexOf('-') >= 0) {
// response.data[i].工序完成日期 = (response.data[i].工序完成日期.replace('-', '/'))
// }
this.tableData1.push({ this.tableData1.push({
工艺名称: response.data[i].工艺名称, 工艺名称: response.data[i].工艺名称,
序间质检: response.data[i].质检结果, 序间质检: response.data[i].质检结果,
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '', 排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '',
// 排产日期: response.data[i].计划日期,
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '', 完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '',
操作者: response.data[i].操作者, 操作者: response.data[i].操作者,
不合格数量: response.data[i].不合格数量, 不合格数量: response.data[i].不合格数量,
质检数量: response.data[i].数量 质检数量: response.data[i].数量,
工序流水号: response.data[i].工序流水号
}) })
} }
} }
}) })
}, // 补加完成日期 }, // 补加完成日期
// EditData() { EditData() {
// editdata(this.processSerialNumber).then(response => { this.dialogFormVisible = true
// if (response.data.result === '1') { this.form.人员 = ''
// this.$message.success('编辑成功') this.form.人员编号 = ''
// } else { this.form.完成时间 = ''
// this.$message.error('编辑失败') },
// } getRow(row) {
// }) this.completeTime = row.完成日期
// }, this.dateOfProduction = row.排产日期
// getRow(row) { this.processSerialNumber = row.工序流水号
// console.log(this.completeTime) if (this.completeTime === '' && this.dateOfProduction !== '') {
// this.completeTime = row.完成日期 this.isShow = false
// this.processSerialNumber = row.工序流水号 } else {
// if (this.completeTime === null) { this.isShow = true
// this.isShow = false }
// } else { },
// this.isShow = true dialogTableVisible() {
// } this.dialogFormVisible1 = true
// }, this.fetchData3()
},
fetchData3() {
getTree().then(response => { // 获取人员信息树
const data = response.data
this.data2 = fn(data, 0)
})
},
handleNodeClick(data) { // 树节点点击
this.ssks = data.label
getTable8(data.id).then(response => {
this.List1 = response.data
})
},
getTable9() {
this.khbmbh = 12
getTable8(this.khbmbh).then(response => {
this.List1 = response.data
})
},
handleCurrentChange2(row) { // 获取当前行人员信息
this.ssks = row.节点名称
this.Number1 = row.人员编号
this.Name = row.姓名
},
getName() { // 提交人员
this.dialogFormVisible1 = false
this.form.人员 = this.Name
this.form.人员编号 = this.Number1
},
submit() {
submitEdit(this.Number1, this.form.完成时间, this.processSerialNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('补录成功')
} else {
this.$message.error('补录失败')
}
})
this.dialogFormVisible = false
this.getCurrentRow(this.row2)
},
// 完成日期变色 // 完成日期变色
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
row.index = rowIndex row.index = rowIndex
if (row.完成日期 !== '') { if (row.完成日期 !== '') {
return 'CompleteColor' return 'CompleteColor'
} }
}, // 重置表单
callOff(formName) {
this.dialogFormVisible = false
this.$refs[formName].resetFields()
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val