采购、装配
This commit is contained in:
258
src/views/Assembly/AssemblyInformationInput/index.vue
Normal file
258
src/views/Assembly/AssemblyInformationInput/index.vue
Normal file
@@ -0,0 +1,258 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-row>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="searchDetail()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.序号" size="mini" style="width:60px" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工序名称" size="mini" style="width:200px" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺内容及装配具体要求" :rows="1" size="mini" type="textarea" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.质检" size="mini" readonly align="center"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工时/时" align="center">
|
||||
<el-table-column label="工艺工时" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺工时" size="mini" readonly align="center"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际工时" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.实际工时" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成情况/装配工" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.装配员" size="mini" readonly align="center" @click.native="param=0;selectPerson(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验情况/检验员" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.检验员" size="mini" readonly align="center" @click.native="param=1;selectPerson(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="人员信息" center>
|
||||
<div style="height: 500px;">
|
||||
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px;width: 30%">
|
||||
<el-tree
|
||||
:data="data2"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
style="width: 150px;float: left"
|
||||
height="400"
|
||||
accordion
|
||||
@node-click="handleNodeClick"/>
|
||||
</div>
|
||||
<el-table :data="List1" highlight-current-row height="400" style="width: 60%;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>
|
||||
<el-button style="margin-left: 120px;margin-top: 20px" @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchMachine, searchDetail, searchProcess, update, getTree, fn, getTable8 } from '@/api/Assembly/AssemblyInformationInput'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
floatNum: '',
|
||||
workingHours: '',
|
||||
Completion: '',
|
||||
Inspection: '',
|
||||
Remarks: '',
|
||||
name: '',
|
||||
staffNum: '',
|
||||
dialogFormVisible: false,
|
||||
data2: [],
|
||||
List1: [],
|
||||
loading: false,
|
||||
result: 0,
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
},
|
||||
dataAll: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
getTree().then(response => { // 获取人员信息树
|
||||
const data = response.data
|
||||
this.data2 = fn(data, 0)
|
||||
})
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchMachine(this.projectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchDetail() { // 主表查询
|
||||
this.dataAll = []
|
||||
if (this.machineNumberValue !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
selectPerson(row) { // 点击查询按钮
|
||||
this.floatNum = row.装配工序流水号
|
||||
this.workingHours = row.实际工时
|
||||
this.Completion = row.完成情况
|
||||
this.Inspection = row.检验情况
|
||||
this.Remarks = row.备注
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleCurrentChange2(row) { // 获取当前行人员信息
|
||||
this.staffNum = row.人员编号
|
||||
},
|
||||
getName() { // 提交人员
|
||||
if (this.param === 0) {
|
||||
update(this.floatNum, this.workingHours, this.staffNum, this.Inspection, this.Remarks).then(response => {
|
||||
this.searchDetail()
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
} else if (this.param === 1) {
|
||||
update(this.floatNum, this.workingHours, this.Completion, this.staffNum, this.Remarks).then(response => {
|
||||
this.searchDetail()
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
}
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
handleNodeClick(data) { // 树节点点击
|
||||
getTable8(data.id).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
console.log(row)
|
||||
update(row.装配工序流水号, row.实际工时, row.完成情况, row.检验情况, row.备注).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
219
src/views/Assembly/AssemblyPlan/index.vue
Normal file
219
src/views/Assembly/AssemblyPlan/index.vue
Normal file
@@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="projectChange">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>计划完成日期:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="goDown()">下达</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
min-height="450px"
|
||||
height="450px"
|
||||
highlight-current-row
|
||||
border
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
align="center"
|
||||
width="35"/>
|
||||
<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="机床名称">
|
||||
<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>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTable, goDown } from '@/api/Assembly/AssemblyPlan'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
ProjectSerialNumber: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
MachineSerialNumber: [],
|
||||
ProcessStartTime: '',
|
||||
ProcessEndTime: '',
|
||||
TimeToGo: '',
|
||||
startEndDate: '',
|
||||
time: '',
|
||||
time1: '',
|
||||
check: 0,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
result: 0,
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
projectChange() {
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchmachine(this.projectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
console.log(this.startEndDate)
|
||||
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
|
||||
this.check2 = 0
|
||||
this.startEndDate = ''
|
||||
} else { this.check2 = 1 }
|
||||
this.projectValue ? this.check = 1 : this.check = 0
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.check2, this.startEndDate[0], this.startEndDate[1], this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.ProjectSerialNumber = []
|
||||
this.MachineSerialNumber = []
|
||||
this.ProcessStartTime = []
|
||||
this.ProcessEndTime = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.ProjectSerialNumber[i] = val[i].项目流水号
|
||||
this.MachineSerialNumber[i] = val[i].机床流水号
|
||||
}
|
||||
},
|
||||
getCurrentTime() {
|
||||
this.ProcessStartTime = this.getTime0(0)
|
||||
this.ProcessEndTime = this.getTime0(2)
|
||||
this.TimeToGo = this.getTime0(0)
|
||||
},
|
||||
getTime0(num) {
|
||||
var date0 = new Date()
|
||||
var date = new Date(date0.getTime() + num * 24 * 60 * 60 * 1000)
|
||||
var month = this.zeroFill(date.getMonth() + 1)
|
||||
var day = this.zeroFill(date.getDate())
|
||||
var hour = this.zeroFill(date.getHours())
|
||||
var minute = this.zeroFill(date.getMinutes())
|
||||
var second = this.zeroFill(date.getSeconds())
|
||||
return date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
|
||||
},
|
||||
zeroFill(i) {
|
||||
if (i >= 0 && i <= 9) {
|
||||
return '0' + i
|
||||
} else {
|
||||
return i
|
||||
}
|
||||
},
|
||||
goDown() {
|
||||
this.getCurrentTime()
|
||||
if (this.ProjectSerialNumber.length !== 0) {
|
||||
this.result = 0
|
||||
for (let i = 0; i < this.ProjectSerialNumber.length; i++) {
|
||||
goDown(this.ProjectSerialNumber[i], this.MachineSerialNumber[i], this.ProcessStartTime, this.ProcessEndTime, this.TimeToGo).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.ProjectSerialNumber.length) {
|
||||
this.$message.success('下达成功')
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('下达失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('至少选择一条')
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
257
src/views/Assembly/AssemblyProcessAssignment/index.vue
Normal file
257
src/views/Assembly/AssemblyProcessAssignment/index.vue
Normal file
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="projectChange">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="Preservation()">保存</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
min-height="500px"
|
||||
height="500px"
|
||||
border
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
align="center"
|
||||
width="35"/>
|
||||
<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="工艺开始时间">
|
||||
<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">
|
||||
<el-input v-model="tableData[scope.$index].工艺员" size="mini" style="width:150px" placeholder="工艺员" @click.native="selectPerson(scope.$index)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="下达时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.下发时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="工艺定额人员选择" center>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
style="width: 100%;max-height: 200px"
|
||||
border
|
||||
size="mini"
|
||||
height="200px"
|
||||
highlight-current-row
|
||||
@row-click="confirmPerson">
|
||||
<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="性别">
|
||||
<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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogFormVisible=false">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, initPerson, searchTable, Preservation } from '@/api/Assembly/AssemblyProcessAssignment'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
tableData: [],
|
||||
tableData2: [],
|
||||
ProcessSerialNumber: [],
|
||||
PersonnelNumber: [],
|
||||
index: '',
|
||||
check: 0,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
result: 0,
|
||||
loading: false,
|
||||
dialogFormVisible: false,
|
||||
multipleSelection: [],
|
||||
pageSize: 1,
|
||||
pageCurrent: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.initPerson()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
initPerson() { // 初始化工艺员
|
||||
initPerson().then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
projectChange() {
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
if (this.projectValue !== '') {
|
||||
this.check2 = 1
|
||||
searchmachine(this.projectValue, this.check2).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
},
|
||||
selectPerson(index) { // 点击查询按钮
|
||||
this.index = index
|
||||
this.dialogFormVisible = true
|
||||
console.log(this.index)
|
||||
},
|
||||
confirmPerson(row) { // 选择一行
|
||||
this.tableData[this.index].工艺员 = row.姓名
|
||||
this.tableData[this.index].人员编号 = row.人员编号
|
||||
console.log(this.tableData)
|
||||
},
|
||||
searchTable() {
|
||||
this.tableData = []
|
||||
this.loading = true
|
||||
this.projectValue ? this.check = 1 : this.check = 0
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData.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].下发时间
|
||||
})
|
||||
}
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
console.log(this.multipleSelection)
|
||||
// this.ProcessSerialNumber = []
|
||||
// this.PersonnelNumber = []
|
||||
// for (let i = 0; i < val.length; i++) {
|
||||
// this.ProcessSerialNumber[i] = val[i].工艺计划流水号
|
||||
// this.PersonnelNumber[i] = val[i].人员编号
|
||||
// }
|
||||
},
|
||||
Preservation() {
|
||||
if (this.multipleSelection.length !== 0) {
|
||||
this.result = 0
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
console.log(this.multipleSelection[i].人员编号)
|
||||
if (this.multipleSelection[i].人员编号 === '') {
|
||||
this.$message.error('请选择工艺员')
|
||||
} else {
|
||||
Preservation(this.multipleSelection[i].工艺计划流水号, this.multipleSelection[i].人员编号).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
this.$message.success('分配成功')
|
||||
this.searchTable()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('至少选择一条')
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
834
src/views/Assembly/AssemblyProcessPlanning/index.vue
Normal file
834
src/views/Assembly/AssemblyProcessPlanning/index.vue
Normal file
@@ -0,0 +1,834 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="Organization()">
|
||||
<el-radio :label="0">未编制</el-radio>
|
||||
<el-radio :label="1">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
<span>工艺员:</span>
|
||||
<el-select v-model="CraftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="clearDetail();searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Craftmen"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small" @change="searchGroup()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchDetail">查询</el-button>
|
||||
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">装配工艺调整</el-button>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<el-row>
|
||||
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" style="margin-left: 20px" @click="DYbtn">典艺</el-button>
|
||||
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="WYbtn">完艺</el-button>
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-tickets" @click="handleAdd">增加</el-button>
|
||||
<el-button :disabled="disabled" type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除</el-button>
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
|
||||
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row, 'form2')">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteGroup(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.序号" :disabled="disabled" size="mini" style="width:60px" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工序名称"
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
style="width:200px"
|
||||
@dblclick.native="tableSearch(scope.row)"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工艺内容及装配具体要求"
|
||||
:rows="1"
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="textarea"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.质检" :disabled="disabled" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-arrow-up"
|
||||
type="primary"
|
||||
@click="upOne(scope.row)"/>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-arrow-down"
|
||||
type="primary"
|
||||
@click="downOne(scope.row)"/>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
type="primary"
|
||||
@click="insertOne(scope.row)"/>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteOne(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="工序名称、工序要求选择" center width="400px">
|
||||
<el-form ref="form2" :model="form2" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="工序名称分类">
|
||||
<el-select v-model="processNameClassValue" placeholder="分类" size="small" @change="cChange()">
|
||||
<el-option
|
||||
v-for="item in processNameClass"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称">
|
||||
<el-select v-model="processNameValue" placeholder="名称" size="small" @change="nChange()">
|
||||
<el-option
|
||||
v-for="item in processName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序要求">
|
||||
<el-input v-model="processRequestValue" placeholder="要求" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button size="mini" type="primary" @click="confirmSelect()">确定选择</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="序号" prop="序号">
|
||||
<el-input v-model="form2.序号" placeholder="序号" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组件" prop="组件">
|
||||
<el-select v-model="form2.组件" multiple placeholder="组件" size="small">
|
||||
<el-option
|
||||
v-for="item in GroupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="装配任务" prop="装配任务">
|
||||
<el-input v-model="form2.装配任务" placeholder="装配任务" type="textarea" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible4=false">取消</el-button>
|
||||
<el-button v-show="title==='增加组件工艺'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title==='编辑组件工艺'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible5" title="典型工艺选择" center width="800px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="典型工艺机床分类">
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
|
||||
<el-option
|
||||
v-for="item in machineType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机床编号">
|
||||
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px">
|
||||
<el-option
|
||||
v-for="item in machineNumber2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="searchCompleted()">查询</el-button>
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" 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" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.质检 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="已完工艺选择" center width="800px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工艺员">
|
||||
<el-input v-model="CraftmanValue" size="small" readonly style="width: 150px;" @focus="dialogFormVisible3=true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机床编号">
|
||||
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px">
|
||||
<el-option
|
||||
v-for="item in machineNumber1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="searchCompleted()">查询</el-button>
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" 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" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.质检 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogFormVisible3"
|
||||
title="工艺定额人员"
|
||||
center
|
||||
style="min-height: 300px">
|
||||
<el-table
|
||||
:data="tableData3"
|
||||
size="mini"
|
||||
style="width: 97%;max-height: 300px"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectPerson">
|
||||
<el-table-column align="center" label="考勤编号" width="150">
|
||||
<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="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.性别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工作岗位" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.岗位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="tijiao()">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initCraftmen, searchMachine, searchGroup, submitAdd, submitEdit, searchDetail, searchProcess, insertOne, update, upOne, downOne, deleteOne,
|
||||
deleteGroup, saveApprove, returnEdit, procedureCopy1, processCopy1, initprocessNameClass, initProcessName, update1, initmachineType, SearchMachine } from '@/api/Assembly/AssemblyProcessPlanning'
|
||||
import '@/icon/iconfont.css'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
radio: 0,
|
||||
checked: false,
|
||||
disabled: false,
|
||||
CraftmenValue: '',
|
||||
Craftmen: [],
|
||||
CraftmanValue: '',
|
||||
perNum: '',
|
||||
Name: '',
|
||||
Number: '',
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
machineNumberValue1: '',
|
||||
machineNumber1: [],
|
||||
machineNumberValue2: '',
|
||||
machineNumber2: [],
|
||||
machineTypeValue: '',
|
||||
machineType: [],
|
||||
AssemblyTask: '',
|
||||
Group: '',
|
||||
GroupNumberValue: [],
|
||||
GroupNumber: [],
|
||||
GroupNum: '',
|
||||
GroupProcessNumber: '',
|
||||
SerialNumber: '',
|
||||
SerialNumberGroup: [],
|
||||
isShow2: false,
|
||||
processNameClassValue: '',
|
||||
processNameClass: [],
|
||||
processNameValue: '',
|
||||
Process: '',
|
||||
processName: [],
|
||||
Procedure: '',
|
||||
ProcedureNameGroup: [],
|
||||
processRequestValue: '',
|
||||
ProcessContentGroup: [],
|
||||
QualityTesting: [],
|
||||
ProcessSequence: [],
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
loading: false,
|
||||
form1: {},
|
||||
form2: {
|
||||
序号: '',
|
||||
组件: [],
|
||||
装配任务: ''
|
||||
},
|
||||
rules: {
|
||||
序号: [{ required: true, message: '请输入序号', trigger: 'blur' }],
|
||||
组件: [{ required: true, message: '请选择组件', trigger: 'change' }],
|
||||
装配任务: [{ required: true, message: '请输入装配任务', trigger: 'blur' }]
|
||||
},
|
||||
num1: '',
|
||||
result: 0,
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
dialogFormVisible4: false,
|
||||
dialogFormVisible5: false,
|
||||
dataAll: [],
|
||||
dataAll1: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initCraftmen().then(response => { // 初始化工艺员
|
||||
this.tableData3 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Craftmen.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
initprocessNameClass().then(response => { // 初始化工序分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processNameClass.push({
|
||||
label: response.data[i].工序分类名称,
|
||||
value: response.data[i].工序分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initmachineType().then(response => { // 初始化机床分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineType.push({
|
||||
label: response.data[i].机床分类名称,
|
||||
value: response.data[i].机床分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
clearDetail() {
|
||||
this.checked = false
|
||||
this.machineNumberValue = ''
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumber = []
|
||||
searchMachine(this.CraftmenValue, this.radio).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroup() {
|
||||
this.GroupNumber = []
|
||||
this.GroupNumberValue = []
|
||||
searchGroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchDetail() { // 主表查询
|
||||
this.dataAll = []
|
||||
if (this.machineNumberValue !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
Organization() {
|
||||
this.CraftmenValue = ''
|
||||
this.checked = false
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
if (this.radio === 0) {
|
||||
this.dataAll = []
|
||||
this.isShow2 = false
|
||||
this.disabled = false
|
||||
} else if (this.radio === 1) {
|
||||
this.dataAll = []
|
||||
this.isShow2 = true
|
||||
this.disabled = true
|
||||
}
|
||||
},
|
||||
returnEdit() {
|
||||
returnEdit(this.machineNumberValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('调整成功')
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('调整失败') }
|
||||
})
|
||||
},
|
||||
DYbtn() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
this.dialogFormVisible5 = true
|
||||
this.dataAll1 = []
|
||||
this.machineTypeValue = ''
|
||||
this.machineNumber2 = []
|
||||
this.machineNumberValue1 = ''
|
||||
} else {
|
||||
this.$message.warning('请先选择机床')
|
||||
}
|
||||
},
|
||||
SearchMachine() {
|
||||
this.machineNumberValue1 = ''
|
||||
this.machineNumber2 = []
|
||||
SearchMachine(this.machineTypeValue).then(response => { // 典型机床查询
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber2.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
WYbtn() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
this.dialogFormVisible1 = true
|
||||
this.dataAll1 = []
|
||||
this.machineNumber1 = []
|
||||
this.machineNumberValue1 = ''
|
||||
this.CraftmanValue = ''
|
||||
} else {
|
||||
this.$message.warning('请先选择机床')
|
||||
}
|
||||
},
|
||||
selectPerson(row) { // 选择工艺员
|
||||
this.Name = row.姓名
|
||||
this.Number = row.人员编号
|
||||
},
|
||||
tijiao() {
|
||||
this.dialogFormVisible3 = false
|
||||
this.CraftmanValue = this.Name
|
||||
this.perNum = this.Number
|
||||
this.machineNumber = []
|
||||
searchMachine(this.perNum, 1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber1.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchCompleted() { // 主表查询
|
||||
this.dataAll1 = []
|
||||
if (this.machineNumberValue1 !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue1)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll1.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
async processCopy1() {
|
||||
this.result = 0
|
||||
for (let i = 0; i < this.dataAll1.length; i++) {
|
||||
processCopy1(this.machineNumberValue, this.dataAll1[i].table1[0].序号, this.dataAll1[i].table1[0].组号, this.dataAll1[i].table1[0].装配任务).then(response => {
|
||||
this.GroupNum = parseInt(response.data.output[0].组件工艺流水号)
|
||||
if (response.data.result[0].result === '1') {
|
||||
for (let j = 0; j < this.dataAll1[i].table2.length; j++) {
|
||||
procedureCopy1(this.GroupNum, this.dataAll1[i].table2[j].序号, this.dataAll1[i].table2[j].工序名称, this.dataAll1[i].table2[j].工艺内容及装配具体要求, this.dataAll1[i].table2[j].质检, this.dataAll1[i].table2[j].工序顺序).then(response => {
|
||||
})
|
||||
}
|
||||
}
|
||||
this.result += parseInt(response.data.result[0].result)
|
||||
if (this.result === this.dataAll1.length) {
|
||||
this.$message.success('拷贝成功')
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible5 = false
|
||||
this.searchDetail()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
// this.title = '增加组件工艺'
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
console.log(this.$refs[formName])
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
// this.editForm(row, 'form2', [this.title = '编辑组件工艺', this.GroupProcessNumber = row.组件工艺流水号, this.dialogFormVisible4 = true, this.Group = '', this.form2.组件 = []])
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
this.form2.组件 = []
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
},
|
||||
submitAdd() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
},
|
||||
deleteGroup(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteGroup(row.组件工艺流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
insertOne(row) {
|
||||
insertOne(row.组件工艺流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
update(row) {
|
||||
update(row.装配工序流水号, row.序号, row.工序名称, row.工艺内容及装配具体要求, row.质检).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
deleteTable() {
|
||||
this.$confirm('此操作将永久删除该工艺, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.result = 0
|
||||
for (var i = 0; i < this.dataAll.length; i++) {
|
||||
deleteGroup(this.dataAll[i].table1[0].组件工艺流水号).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.dataAll.length) {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
saveApprove() {
|
||||
if (this.checked === true) {
|
||||
saveApprove(this.machineNumberValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
upOne(row) {
|
||||
upOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
downOne(row) {
|
||||
downOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
deleteOne(row) {
|
||||
deleteOne(row.装配工序流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
cChange() {
|
||||
this.processName = []
|
||||
this.processNameValue = ''
|
||||
this.Process = ''
|
||||
this.processRequestValue = ''
|
||||
initProcessName(this.processNameClassValue).then(response => { // 初始化工序分类
|
||||
this.tableData = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processName.push({
|
||||
label: response.data[i].工序名称,
|
||||
value: response.data[i].工序名称流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
nChange() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.processNameValue === this.tableData[i].工序名称流水号) {
|
||||
this.Process = this.tableData[i].工序名称
|
||||
this.processRequestValue = this.tableData[i].工艺内容及装配具体要求
|
||||
}
|
||||
}
|
||||
},
|
||||
tableSearch(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.processNameClassValue = ''
|
||||
this.processNameValue = ''
|
||||
this.processRequestValue = ''
|
||||
this.Procedure = row.装配工序流水号
|
||||
this.number = row.序号
|
||||
},
|
||||
confirmSelect() {
|
||||
console.log(this.Procedure, this.number, this.Process, this.processRequestValue)
|
||||
update1(this.Procedure, this.number, this.Process, this.processRequestValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$message.success('选择成功')
|
||||
this.searchDetail()
|
||||
} else {
|
||||
this.$message.success('选择失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
213
src/views/Assembly/AssemblyQuotaSetting/index.vue
Normal file
213
src/views/Assembly/AssemblyQuotaSetting/index.vue
Normal file
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="Organization()">
|
||||
<el-radio :label="0">未编制</el-radio>
|
||||
<el-radio :label="1">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
<span>定额员:</span>
|
||||
<el-select v-model="CraftmenValue" placeholder="定额员" size="small" style="width:100px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Craftmen"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin-left: 10px;" size="small" @click="searchDetail">查询</el-button>
|
||||
<el-button v-show="isShow1" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
|
||||
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">装配定额调整</el-button>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.序号" size="mini" style="width:60px" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工序名称" size="mini" style="width:200px" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺内容及装配具体要求" :rows="1" size="mini" type="textarea" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.质检" size="mini" readonly align="center"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺工时" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺工时" :disabled="disabled" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initCraftmen, searchMachine, searchDetail, searchProcess, update, saveApprove, returnEdit } from '@/api/Assembly/AssemblyQuotaSetting'
|
||||
import '@/icon/iconfont.css'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radio: 0,
|
||||
checked: false,
|
||||
disabled: false,
|
||||
CraftmenValue: '',
|
||||
Craftmen: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
isShow1: true,
|
||||
isShow2: false,
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
loading: false,
|
||||
result: 0,
|
||||
dataAll: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initCraftmen().then(response => { // 初始化工艺员
|
||||
this.tableData3 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Craftmen.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchMachine(this.radio).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchDetail() { // 主表查询
|
||||
this.dataAll = []
|
||||
if (this.machineNumberValue !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
Organization() {
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
if (this.radio === 0) {
|
||||
this.dataAll = []
|
||||
this.isShow1 = true
|
||||
this.isShow2 = false
|
||||
this.disabled = false
|
||||
} else if (this.radio === 1) {
|
||||
this.dataAll = []
|
||||
this.isShow1 = false
|
||||
this.isShow2 = true
|
||||
this.disabled = true
|
||||
}
|
||||
},
|
||||
returnEdit() {
|
||||
returnEdit(this.machineNumberValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('调整成功')
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('调整失败') }
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
update(row.装配工序流水号, row.工艺工时).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
saveApprove() {
|
||||
saveApprove(this.machineNumberValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
381
src/views/Assembly/InstallationAndMonitoring/index.vue
Normal file
381
src/views/Assembly/InstallationAndMonitoring/index.vue
Normal file
@@ -0,0 +1,381 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-row>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>客户名称:</span>
|
||||
<el-input v-model="CustomerName" size="small" placeholder="客户名称" readonly style="width: 200px"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="searchTable()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<div style="width: 49.8%; float: left;margin-left: 2px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<div style="margin-left: 43%;margin-top: 20px;font-weight: bold;font-size: 24px">关键节点记录</div>
|
||||
</el-row>
|
||||
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin-left: 90%;margin-top: 15px" @click="handleAdd()">增加</el-button>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
:row-class-name="tableRowClassName"
|
||||
border
|
||||
style="width: 100%;max-height: 450px;margin-top: 10px"
|
||||
height="450px"
|
||||
highlight-current-row
|
||||
size="small">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="关键节点" align="center">
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 49.8%; float: right; margin-right: 2px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<div style="margin-left: 43%;margin-top: 20px;font-weight: bold;font-size: 24px">每日工作记录</div>
|
||||
</el-row>
|
||||
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin-left: 90%;margin-top: 15px" @click="handleAdd1()">增加</el-button>
|
||||
<el-table v-loading="loading" :data="tableData1" border style="width: 100%;max-height: 450px;margin-top: 10px" height="450px" highlight-current-row size="small">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="工作情况" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工作情况 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作日期" align="center" width="130px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工作日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit1(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete1(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="关键节点" prop="关键节点">
|
||||
<el-input v-model="form.关键节点" placeholder="关键节点" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="完成情况" prop="完成情况">
|
||||
<el-select v-model="form.完成情况" placeholder="完成情况" size="small">
|
||||
<el-option
|
||||
v-for="item in Completion"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.备注" placeholder="备注" type="textarea" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible=false">取消</el-button>
|
||||
<el-button v-show="title==='增加关键节点'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title==='编辑关键节点'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogFormVisible1" center width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="工作情况" prop="工作情况">
|
||||
<el-input v-model="form1.工作情况" placeholder="工作情况" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作日期" prop="工作日期">
|
||||
<el-date-picker
|
||||
v-model="form1.工作日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="工作日期"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible1=false">取消</el-button>
|
||||
<el-button v-show="title1==='增加工作记录'" type="primary" @click="submitAdd1()">确定</el-button>
|
||||
<el-button v-show="title1==='编辑工作记录'" type="primary" @click="submitEdit1()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchMachine, searchTable, searchTable1, addData, editData, deleteData, addData1, editData1, deleteData1 } from '@/api/Assembly/InstallationAndMonitoring'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
CustomerName: '',
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
loading: false,
|
||||
loading1: false,
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
title: '',
|
||||
title1: '',
|
||||
Completion: [{
|
||||
value: '未完成',
|
||||
label: '未完成'
|
||||
}, {
|
||||
value: '完成',
|
||||
label: '完成'
|
||||
}],
|
||||
form: {
|
||||
关键节点: '',
|
||||
完成情况: '',
|
||||
备注: ''
|
||||
},
|
||||
rules: {
|
||||
关键节点: [{ required: true, message: '请输入关键节点', trigger: 'blur' }],
|
||||
完成情况: [{ required: true, message: '请选择完成情况', trigger: 'change' }]
|
||||
},
|
||||
form1: {
|
||||
工作情况: '',
|
||||
工作日期: ''
|
||||
},
|
||||
rules1: {
|
||||
工作情况: [{ required: true, message: '请输入工作记录', trigger: 'blur' }],
|
||||
工作日期: [{ required: true, message: '请选择工作日期', trigger: 'change' }]
|
||||
},
|
||||
KeyNodeNum: '',
|
||||
WorkRecordNum: '',
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
pageSize: 10,
|
||||
pageSize1: 10,
|
||||
pageCurrent: 1,
|
||||
pageCurrent1: 1,
|
||||
total: 0,
|
||||
total1: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchMachine(this.projectValue).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
this.CustomerName = response.data[0].客户名称
|
||||
}
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
searchTable(this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
searchTable1(this.machineNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].工作日期 !== '') {
|
||||
response.data.rows[i].工作日期 = response.data.rows[i].工作日期.split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择机床')
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
this.addForm('form', [this.dialogFormVisible = true, this.title = '增加关键节点'])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床')
|
||||
}
|
||||
},
|
||||
submitAdd() {
|
||||
this.addTable(addData, [this.machineNumberValue, this.form.关键节点, this.form.完成情况, this.form.备注], 'form', function() { this.dialogFormVisible = false; this.searchTable() })
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.editForm(row, 'form', [this.title = '编辑关键节点', this.KeyNodeNum = row.关键节点流水号, this.dialogFormVisible = true])
|
||||
},
|
||||
submitEdit() {
|
||||
this.editTable(editData, [this.KeyNodeNum, this.form.关键节点, this.form.完成情况, this.form.备注], 'form', function() { this.searchTable(); this.dialogFormVisible = false })
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.deleteRow(deleteData, row.关键节点流水号, function() { this.searchTable() })
|
||||
},
|
||||
handleAdd1() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
this.addForm('form1', [this.dialogFormVisible1 = true, this.title1 = '增加工作记录'])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床')
|
||||
}
|
||||
},
|
||||
submitAdd1() {
|
||||
this.addTable(addData1, [this.machineNumberValue, this.form1.工作情况, this.form1.工作日期], 'form1', function() { this.dialogFormVisible1 = false; this.searchTable() })
|
||||
},
|
||||
handleEdit1(row) {
|
||||
this.editForm(row, 'form1', [this.title1 = '编辑工作记录', this.WorkRecordNum = row.工作记录流水号, this.dialogFormVisible1 = true])
|
||||
},
|
||||
submitEdit1() {
|
||||
this.editTable(editData1, [this.WorkRecordNum, this.form1.工作情况, this.form1.工作日期], 'form1', function() { this.dialogFormVisible1 = false; this.searchTable() })
|
||||
},
|
||||
handleDelete1(row) {
|
||||
this.deleteRow(deleteData1, row.工作记录流水号, function() { this.searchTable() })
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
searchTable(this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
searchTable(this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
searchTable1(this.machineNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].工作日期 !== '') {
|
||||
response.data.rows[i].工作日期 = response.data.rows[i].工作日期.split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
searchTable1(this.machineNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].工作日期 !== '') {
|
||||
response.data.rows[i].工作日期 = response.data.rows[i].工作日期.split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (row.完成情况 === '完成') {
|
||||
return 'completion'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-table .completion {
|
||||
background: limegreen;
|
||||
}
|
||||
</style>
|
||||
217
src/views/Assembly/PrintingAssemblyProcessCard/index.vue
Normal file
217
src/views/Assembly/PrintingAssemblyProcessCard/index.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchTable">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" size="small" @click="exportTable('cjn')">导出</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
min-height="300px"
|
||||
height="300px"
|
||||
border
|
||||
@row-click="searchDetail">
|
||||
<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="机床名称">
|
||||
<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>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<table id="cjn" cellspacing="0px" border align="center" width="100%" style="">
|
||||
<thead id="20">
|
||||
<tr>
|
||||
<td colspan="1" style="text-align: center;font-size: 30px;font-weight: bold;width: 10.25%;">GAOJING</td>
|
||||
<td colspan="15" style="text-align:center;font-size: 30px;font-weight: bold">专机装配工艺过程卡</td>
|
||||
</tr>
|
||||
<tr class="tbodyHead">
|
||||
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">机床编号:</td>
|
||||
<td colspan="4" width="15%" align="center">{{ MachineNum }}</td>
|
||||
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">机床名称:</td>
|
||||
<td colspan="5" width="35%" align="center">{{ MachineName }}</td>
|
||||
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">客户名称:</td>
|
||||
<td colspan="4" width="31.25%" align="center">{{ CustomerName }}</td>
|
||||
</tr>
|
||||
<tr id="tableHead">
|
||||
<th class="tg-0pky">序号</th>
|
||||
<th class="tg-0lax" colspan="4">工序名称</th>
|
||||
<th class="tg-0lax" colspan="6">工艺内容及装配具体要求</th>
|
||||
<th class="tg-0lax">质检</th>
|
||||
<th class="tg-0lax">工时/时</th>
|
||||
<th class="tg-0lax">完成情况/装配工</th>
|
||||
<th class="tg-0lax">检验情况/检验员</th>
|
||||
<th class="tg-0lax" width="100px">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="(item, index) in dataAll" :key="index">
|
||||
<tr>
|
||||
<td colspan="16" style="font-weight: bold">{{ item.table1 }}</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in item.table2" :key="index">
|
||||
<td align="center"> {{ list.序号 }}</td>
|
||||
<td colspan="4">{{ list.工序名称 }}</td>
|
||||
<td colspan="6">{{ list.工艺内容及装配具体要求 }}</td>
|
||||
<td align="center">{{ list.质检 }}</td>
|
||||
<td>{{ list.工时 }}</td>
|
||||
<td>{{ list.完成情况 }}</td>
|
||||
<td>{{ list.检验情况 }}</td>
|
||||
<td width="100px">{{ list.备注 }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchMachine, searchDetail, searchProcess, searchTable } from '@/api/Assembly/PrintingAssemblyProcessCard'
|
||||
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataAll: [],
|
||||
tableData: [],
|
||||
radio: 0,
|
||||
check: 0,
|
||||
check1: 0,
|
||||
loading: false,
|
||||
projectValue: '',
|
||||
project: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
MachineNum: '',
|
||||
MachineName: '',
|
||||
CustomerName: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchMachine(this.projectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() { // 主表查询
|
||||
this.loading = true
|
||||
this.projectValue ? this.check = 1 : this.check = 0
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async searchDetail(row) { // 查询工艺
|
||||
this.dataAll = []
|
||||
this.MachineName = row.机床名称
|
||||
this.MachineNum = row.机床图号
|
||||
this.CustomerName = row.客户名称
|
||||
const response = await searchDetail(row.机床流水号)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: data[i].序号 + ' ' + data[i].组号 + ' ' + data[i].装配任务,
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
},
|
||||
exportTable(tableid) {
|
||||
if (this.dataAll.length === 0) {
|
||||
this.$message.warning('暂无数据')
|
||||
} else {
|
||||
getExplorer()
|
||||
method5(tableid)
|
||||
Cleanup()
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.tg {border-collapse:collapse;border-spacing:0;}
|
||||
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
.tg .tg-0pky{border-color:inherit;text-align:left;vertical-align:top}
|
||||
.tg .tg-0lax{text-align:left;vertical-align:top}
|
||||
</style>
|
||||
Reference in New Issue
Block a user