家里的样式
This commit is contained in:
355
src/views/Assembly/AssemblyExecution/index.vue
Normal file
355
src/views/Assembly/AssemblyExecution/index.vue
Normal file
@@ -0,0 +1,355 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <span>组号:</span>-->
|
||||
<!-- <el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" clearable @change="searchTable2()">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in groupNumber"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable1();searchTable2()">查询</el-button>-->
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">总装调试</h3>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
|
||||
<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-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-column label="操作" align="center" width="460px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.装配状态===null || scope.row.装配状态===0" type="success" size="small" @click="handlestart_1(scope.row)">开始装配</el-button>
|
||||
<el-button v-if="scope.row.装配状态===1" type="danger" size="small" @click="handleend_1(scope.row)">结束装配</el-button>
|
||||
<el-button v-if="scope.row.装配状态===2" type="info" size="small" >装配完成</el-button>
|
||||
<el-button v-if="scope.row.装配状态===1" plain size="small" @click="handleCancelStart_1(scope.row)">取消开始装配</el-button>
|
||||
<el-button v-if="scope.row.装配状态===2" plain size="small" @click="handleCancelEnd_1(scope.row)">取消结束装配</el-button>
|
||||
<el-button v-if="scope.row.调试状态===null || scope.row.调试状态===0" type="success" size="small" @click="handlestart_2(scope.row)">开始调试</el-button>
|
||||
<el-button v-if="scope.row.调试状态===1" type="danger" size="small" @click="handleend_2(scope.row)">结束调试</el-button>
|
||||
<el-button v-if="scope.row.调试状态===2" type="info" size="small" >调试完成</el-button>
|
||||
<el-button v-if="scope.row.调试状态===1" plain size="small" @click="handleCancelStart_2(scope.row)">取消开始调试</el-button>
|
||||
<el-button v-if="scope.row.调试状态===2" plain size="small" @click="handleCancelEnd_2(scope.row)">取消结束调试</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">部装</h3>
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
|
||||
<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">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.实际工时" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.实际工时 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.修补工时" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.修补工时 }}</span>
|
||||
</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">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.备注" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.备注 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="!scope.row.isEditing" type="primary" size="small" @click="editTable2(scope.row)">编辑</el-button>
|
||||
<el-button v-if="scope.row.isEditing" type="primary" size="small" @click="submitTable2(scope.row)">确定</el-button>
|
||||
<el-button v-if="scope.row.isEditing" size="small" @click="cancelTable2(scope.row)">取消</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 1" type="success" size="small" @click="handlestart_3(scope.row)">开始装配</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 2" type="danger" size="small" @click="handleend_3(scope.row)">结束装配</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 3" type="info" size="small" >装配完成</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 2" plain size="small" @click="handleCancelStart_3(scope.row)">取消开始装配</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 3" plain size="small" @click="handleCancelEnd_3(scope.row)">取消结束装配</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate, submitTable2 } from '@/api/Assembly/AssemblyExecution'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
tableData1: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
submitTable2(row) {
|
||||
row.备注 ? row.备注 : ''
|
||||
row.实际工时 ? row.实际工时 : ''
|
||||
row.修补工时 ? row.修补工时 : ''
|
||||
console.log(row.备注, row.计划流水号, row.实际工时, row.修补工时)
|
||||
submitTable2(row.备注, row.计划流水号, row.实际工时, row.修补工时).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
row.isEditing = !row.isEditing
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
console.log(row)
|
||||
},
|
||||
cancelTable2(row) {
|
||||
row.isEditing = !row.isEditing
|
||||
row.实际工时 = row.原实际工时
|
||||
row.修补工时 = row.原修补工时
|
||||
row.备注 = row.原备注
|
||||
console.log(row)
|
||||
},
|
||||
editTable2(row) {
|
||||
row.isEditing = !row.isEditing
|
||||
row.原实际工时 = row.实际工时
|
||||
row.原修补工时 = row.修补工时
|
||||
row.原备注 = row.备注
|
||||
console.log(row)
|
||||
},
|
||||
// 取消开始总装
|
||||
handleCancelStart_1(row) {
|
||||
MachineToolStateUpdate(row.机床流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束总装
|
||||
handleCancelEnd_1(row) {
|
||||
MachineToolStateUpdate(row.机床流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消开始调试
|
||||
handleCancelStart_2(row) {
|
||||
DebugStatusUpdate(row.机床流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束调试
|
||||
handleCancelEnd_2(row) {
|
||||
DebugStatusUpdate(row.机床流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消开始部装
|
||||
handleCancelStart_3(row) {
|
||||
ComponentStateUpdate(row.计划流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 1
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束部装
|
||||
handleCancelEnd_3(row) {
|
||||
ComponentStateUpdate(row.计划流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
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].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.check2 === 0) {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
} else {
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
}).then(() => {
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2() {
|
||||
this.tableData2 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
|
||||
this.check2 = 1
|
||||
searchTable2(this.machineNumberValue, 1).then(response => {
|
||||
console.log(response.data, 111)
|
||||
this.tableData2 = response.data
|
||||
this.tableData2.map(v => {
|
||||
this.$set(v, 'isEditing', false)
|
||||
this.$set(v, '原实际工时', '')
|
||||
this.$set(v, '原修补工时', '')
|
||||
this.$set(v, '原备注', '')
|
||||
if (v.是否工作 === null || v.是否工作 === 0) {
|
||||
this.$set(v, 'buttonStatus', 1)
|
||||
} else if (v.是否工作 === 1) {
|
||||
this.$set(v, 'buttonStatus', 2)
|
||||
} else {
|
||||
this.$set(v, 'buttonStatus', 3)
|
||||
}
|
||||
return v
|
||||
})
|
||||
})
|
||||
} else { this.check2 = 0 }
|
||||
},
|
||||
// 总装开始装配
|
||||
handlestart_1(row) { // 弹出单据编辑
|
||||
MachineToolStateUpdate(row.机床流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束装配
|
||||
handleend_1(row) { // 弹出单据编辑
|
||||
MachineToolStateUpdate(row.机床流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装开始调试
|
||||
handlestart_2(row) { // 弹出单据编辑
|
||||
DebugStatusUpdate(row.机床流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束调试
|
||||
handleend_2(row) { // 弹出单据编辑
|
||||
DebugStatusUpdate(row.机床流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装开始装配
|
||||
handlestart_3(row) { // 弹出单据编辑
|
||||
ComponentStateUpdate(row.计划流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装结束装配
|
||||
handleend_3(row) { // 弹出单据编辑
|
||||
ComponentStateUpdate(row.计划流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 3
|
||||
// this.searchTable2()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
247
src/views/Assembly/AssemblyInformationInput/index.vue
Normal file
247
src/views/Assembly/AssemblyInformationInput/index.vue
Normal file
@@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-row>
|
||||
<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">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</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 :disabled="staffNum===''" type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchDetail, searchProcess, update, getTree, fn, getTable8 } from '@/api/Assembly/AssemblyInformationInput'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
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() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
name: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
getTree().then(response => { // 获取人员信息树
|
||||
const data = response.data
|
||||
this.data2 = fn(data, 0)
|
||||
})
|
||||
},
|
||||
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>
|
||||
215
src/views/Assembly/AssemblyPlan/index.vue
Normal file
215
src/views/Assembly/AssemblyPlan/index.vue
Normal file
@@ -0,0 +1,215 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<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">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</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, 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() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
name: 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.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check1, this.machineNumberValue, this.check2, this.startEndDate[0], this.startEndDate[1], this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
console.log(response.data.rows[i].发货节点)
|
||||
if (response.data.rows[i].发货节点 !== '') {
|
||||
response.data.rows[i].发货节点 = (response.data.rows[i].发货节点).split(' ')[0]
|
||||
}
|
||||
}
|
||||
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>
|
||||
234
src/views/Assembly/AssemblyProcessAssignment/index.vue
Normal file
234
src/views/Assembly/AssemblyProcessAssignment/index.vue
Normal file
@@ -0,0 +1,234 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<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">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</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, initPerson, searchTable, Preservation } from '@/api/Assembly/AssemblyProcessAssignment'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
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() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
name: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
initPerson() { // 初始化工艺员
|
||||
initPerson().then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
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.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(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)
|
||||
},
|
||||
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>
|
||||
854
src/views/Assembly/AssemblyProcessPlanning/index.vue
Normal file
854
src/views/Assembly/AssemblyProcessPlanning/index.vue
Normal file
@@ -0,0 +1,854 @@
|
||||
<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, key) in dataAll" :key="key" 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, key) in dataAll1" :key="key" 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, key) in dataAll1" :key="key" 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: '',
|
||||
GroupNumberValue1: '',
|
||||
GroupNumber: [],
|
||||
GroupNum: '',
|
||||
GroupProcessNumber: '',
|
||||
SerialNumber: '',
|
||||
SerialNumberGroup: [],
|
||||
isShow2: false,
|
||||
processNameClassValue: '',
|
||||
processNameClass: [],
|
||||
processNameValue: '',
|
||||
Process: '',
|
||||
processName: [],
|
||||
Procedure: '',
|
||||
ProcedureNameGroup: [],
|
||||
processRequestValue: '',
|
||||
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 = []
|
||||
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.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = '', this.GroupNumberValue1 = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
this.GroupNumberValue1 = ''
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
console.log(row, 1111)
|
||||
this.form2.组件 = (row.组件流水号.split(',')).map(Number)
|
||||
console.log(this.form2.组件)
|
||||
},
|
||||
submitAdd() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], '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('保存失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请勾选是否核准')
|
||||
}
|
||||
},
|
||||
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.processName = []
|
||||
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>
|
||||
227
src/views/Assembly/AssemblyQualityInspection/index.vue
Normal file
227
src/views/Assembly/AssemblyQualityInspection/index.vue
Normal file
@@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>检测项:</span>
|
||||
<el-select v-model="TestValue" filterable placeholder="组号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in Test"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>质检情况:</span>
|
||||
<el-select v-model="qualityInspectionValue" filterable placeholder="质检情况" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in qualityInspection"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="exportExcel()">导出</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%" height="600px">
|
||||
<el-table-column align="center" label="检验情况" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.是否合格)===0||scope.row.是否合格===''" type="primary" size="small" @click="approvalPass(scope.row)">未检验</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.是否合格)===1" type="success" size="small">合格</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.是否合格)===2" type="error" size="small">不合格</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" width="260px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部件名称" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测项" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.检测项 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测项明细" align="center" width="300px">
|
||||
<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 class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
: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, searchgroup, selecttable, searchTest, selecttable22 } from '@/api/Assembly/AssemblyQualityInspection'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
TestValue: '',
|
||||
Test: [],
|
||||
qualityInspectionValue: '',
|
||||
qualityInspection: [
|
||||
{
|
||||
value: 1,
|
||||
label: '合格'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '不合格'
|
||||
}
|
||||
],
|
||||
tableData1: [],
|
||||
total: 0, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageCurrent: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
searchTest().then(response => {
|
||||
console.log(response.data)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Test.push({
|
||||
label: response.data[i].检测项,
|
||||
value: response.data[i].检测项流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
exportExcel() {
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.TestValue !== '' && this.TestValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
|
||||
selecttable22(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.TestValue, this.check4, this.qualityInspectionValue).then(response => {
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['是否合格', '机床图号', '机床名称', '组号', '部件名称', '检测项', '检测项明细', '备注']
|
||||
const filterVal = ['是否合格', '机床图号', '机床名称', '组号', '组件名称', '检测项', '检测项明细', '备注']
|
||||
const list = response.data
|
||||
const data = this.formatJson(filterVal, list)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '装配质检情况表',
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
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].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
selecttable() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.TestValue !== '' && this.TestValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
|
||||
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.TestValue, this.check4, this.qualityInspectionValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response.data.rows, 111)
|
||||
this.tableData1 = response.data.rows
|
||||
this.total = response.data.total
|
||||
console.log(this.tableData1)
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.selecttable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.selecttable()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</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>
|
||||
271
src/views/Assembly/ColdWorkPlanExecution/index.vue
Normal file
271
src/views/Assembly/ColdWorkPlanExecution/index.vue
Normal file
@@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
|
||||
<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-card>
|
||||
<el-card>
|
||||
<h3 style="margin: 0;text-align: center;">工作计划</h3>
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
|
||||
<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">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.实际工时" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.实际工时 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.修补工时" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.修补工时 }}</span>
|
||||
</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">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.备注" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.备注 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="!scope.row.isEditing" type="primary" size="small" @click="editTable2(scope.row)">编辑</el-button>
|
||||
<el-button v-if="scope.row.isEditing" type="primary" size="small" @click="submitTable2(scope.row)">确定</el-button>
|
||||
<el-button v-if="scope.row.isEditing" size="small" @click="cancelTable2(scope.row)">取消</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 1" type="success" size="small" @click="handlestart_3(scope.row)">开始工作</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 2" type="danger" size="small" @click="handleend_3(scope.row)">结束工作</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 3" type="info" size="small" >工作完成</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 2" plain size="small" @click="handleCancelStart_3(scope.row)">取消开始工作</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 3" plain size="small" @click="handleCancelEnd_3(scope.row)">取消结束工作</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate, submitTable2 } from '@/api/Assembly/PlanExecution'
|
||||
export default {
|
||||
name: 'ColdWorkPlanExecution',
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
tableData1: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
submitTable2(row) {
|
||||
submitTable2(row.备注, row.计划流水号, row.实际工时, row.修补工时).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
row.isEditing = !row.isEditing
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
console.log(row)
|
||||
},
|
||||
cancelTable2(row) {
|
||||
row.isEditing = !row.isEditing
|
||||
row.实际工时 = row.原实际工时
|
||||
row.修补工时 = row.原修补工时
|
||||
row.备注 = row.原备注
|
||||
console.log(row)
|
||||
},
|
||||
editTable2(row) {
|
||||
row.isEditing = !row.isEditing
|
||||
row.原实际工时 = row.实际工时
|
||||
row.原修补工时 = row.修补工时
|
||||
row.原备注 = row.备注
|
||||
console.log(row)
|
||||
},
|
||||
// 取消开始工作
|
||||
handleCancelStart_3(row) {
|
||||
ComponentStateUpdate(row.计划流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 1
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束工作
|
||||
handleCancelEnd_3(row) {
|
||||
ComponentStateUpdate(row.计划流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
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].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.check2 === 0) {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
} else {
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
}).then(() => {
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2() {
|
||||
this.tableData2 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
|
||||
this.check2 = 1
|
||||
searchTable2(this.machineNumberValue, 3).then(response => {
|
||||
console.log(response.data, 111)
|
||||
this.tableData2 = response.data
|
||||
this.tableData2.map(v => {
|
||||
this.$set(v, 'isEditing', false)
|
||||
this.$set(v, '原实际工时', '')
|
||||
this.$set(v, '原修补工时', '')
|
||||
this.$set(v, '原备注', '')
|
||||
if (v.是否工作 === null || v.是否工作 === 0) {
|
||||
this.$set(v, 'buttonStatus', 1)
|
||||
} else if (v.是否工作 === 1) {
|
||||
this.$set(v, 'buttonStatus', 2)
|
||||
} else {
|
||||
this.$set(v, 'buttonStatus', 3)
|
||||
}
|
||||
return v
|
||||
})
|
||||
})
|
||||
} else { this.check2 = 0 }
|
||||
},
|
||||
// 总装开始装配
|
||||
handlestart_1(row) { // 弹出单据编辑
|
||||
MachineToolStateUpdate(row.机床流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束装配
|
||||
handleend_1(row) { // 弹出单据编辑
|
||||
MachineToolStateUpdate(row.机床流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装开始调试
|
||||
handlestart_2(row) { // 弹出单据编辑
|
||||
DebugStatusUpdate(row.机床流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束调试
|
||||
handleend_2(row) { // 弹出单据编辑
|
||||
DebugStatusUpdate(row.机床流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装开始装配
|
||||
handlestart_3(row) { // 弹出单据编辑
|
||||
ComponentStateUpdate(row.计划流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装结束装配
|
||||
handleend_3(row) { // 弹出单据编辑
|
||||
ComponentStateUpdate(row.计划流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 3
|
||||
// this.searchTable2()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
109
src/views/Assembly/DeliveryApplication/index.vue
Normal file
109
src/views/Assembly/DeliveryApplication/index.vue
Normal file
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="selecttable()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
|
||||
<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-column label="注意事项" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.注意事项 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.发货状态===null || scope.row.发货状态===0" type="success" size="small" @click="handlconfirm(scope.row)">确认发货</el-button>
|
||||
<el-button v-else-if="scope.row.发货状态===1" disabled="true" type="danger" size="small">待审批</el-button>
|
||||
<el-button v-else type="info" size="small" >已审批</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, selecttable, updatestate } from '@/api/Assembly/DeliveryApplication'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
tableData1: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
selecttable() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
selecttable(this.check2, this.machineNumberValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
console.log(response.data)
|
||||
})
|
||||
},
|
||||
handlconfirm(row) {
|
||||
updatestate(row.机床流水号, 1).then(response => {
|
||||
this.selecttable()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
673
src/views/Assembly/DeliveryConfirmation/index.vue
Normal file
673
src/views/Assembly/DeliveryConfirmation/index.vue
Normal file
@@ -0,0 +1,673 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<div class="text">
|
||||
<el-row style="margin-top: 10px">
|
||||
<span style="width:80px;display:inline-block;">发货单名:</span>
|
||||
<el-input
|
||||
v-model="searchFrom.发货单名"
|
||||
clearable
|
||||
placeholder="请输入"
|
||||
style="width: 150px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
<span style="width:80px;display:inline-block;">发货单号:</span>
|
||||
<el-input
|
||||
v-model="searchFrom.发货单号"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
style="width: 150px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
<span style="width:80px;display:inline-block;">收货单位:</span>
|
||||
<el-input
|
||||
v-model="searchFrom.收货单位"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
style="width: 150px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span style="width:80px;display:inline-block;">车辆牌号:</span>
|
||||
<el-input
|
||||
v-model="searchFrom.车辆牌号"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
style="width: 150px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
<span style="width:80px;display:inline-block;">司机姓名:</span>
|
||||
<el-input
|
||||
v-model="searchFrom.司机姓名"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
style="width: 150px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
<span style="width:80px;display:inline-block;">司机电话:</span>
|
||||
<el-input
|
||||
v-model="searchFrom.司机电话"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
style="width: 150px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span style="width:80px;display:inline-block;">制单人:</span>
|
||||
<el-input
|
||||
v-model="searchFrom.制单人"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
style="width: 150px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
<span style="width:80px;display:inline-block;">核准人:</span>
|
||||
<el-input
|
||||
v-model="searchFrom.核准人"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
style="width: 150px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
<span style="width:80px;display:inline-block;">执行人:</span>
|
||||
<el-input
|
||||
v-model="searchFrom.执行人"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
style="width: 150px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span style="width:80px;display:inline-block;">制单日期:</span>
|
||||
<el-date-picker
|
||||
v-model="searchFrom.开始制单日期"
|
||||
style="width: 150px; margin-right: 10px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
size="small"
|
||||
type="datetime"
|
||||
placeholder="开始日期"/>
|
||||
<span style="width:80px;display:inline-block;">制单日期:</span>
|
||||
<el-date-picker
|
||||
v-model="searchFrom.结束制单日期"
|
||||
style="width: 150px; margin-right: 10px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
size="small"
|
||||
type="datetime"
|
||||
placeholder="结束日期"/>
|
||||
<span style="width:80px;display:inline-block;">发货状态:</span>
|
||||
<el-select v-model="DeliveryStatusValue" placeholder="请选择" size="mini" style="width: 150px" clearable>
|
||||
<el-option
|
||||
v-for="item in DeliveryStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span style="width:80px;display:inline-block;">核准日期:</span>
|
||||
<el-date-picker
|
||||
v-model="searchFrom.开始核准日期"
|
||||
style="width: 150px; margin-right: 10px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
size="small"
|
||||
type="datetime"
|
||||
placeholder="开始日期"/>
|
||||
<span style="width:80px;display:inline-block;">核准日期:</span>
|
||||
<el-date-picker
|
||||
v-model="searchFrom.结束核准日期"
|
||||
style="width: 150px; margin-right: 10px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
size="small"
|
||||
type="datetime"
|
||||
placeholder="结束日期"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span style="width:80px;display:inline-block;">发货日期:</span>
|
||||
<el-date-picker
|
||||
v-model="searchFrom.开始发货日期"
|
||||
style="width: 150px; margin-right: 10px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
size="small"
|
||||
type="datetime"
|
||||
placeholder="开始日期"/>
|
||||
<span style="width:80px;display:inline-block;">发货日期:</span>
|
||||
<el-date-picker
|
||||
v-model="searchFrom.结束发货日期"
|
||||
style="width: 150px; margin-right: 10px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
size="small"
|
||||
type="datetime"
|
||||
placeholder="结束日期"/>
|
||||
<el-button type="success" icon="el-icon-menu" size="mini" style="margin-left: 74px" @click="search">查询</el-button>
|
||||
<el-button type="warning" icon="el-icon-delete" size="mini" @click="clearSearch">清空</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-divider/>
|
||||
<div>
|
||||
<el-table
|
||||
:data="tableDataSearchList"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="500"
|
||||
border
|
||||
size="mini"
|
||||
@row-click="openDialogFormVisible">
|
||||
<el-table-column align="center" label="状态" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.是否发出.toString() === '1'" type="success" size="small">已发出</el-tag>
|
||||
<el-tag v-else type="danger" size="small">未发出</el-tag>
|
||||
<!--{{ scope.row.是否发出.toString() === '1' ? '已发出' : '未发出' }}-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发货单号" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发货单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发货单名" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发货单名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="收货单位" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.收货单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="收货地址" min-width="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.收货地址 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="收货人员" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.收货人员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="联系电话" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="车辆牌号" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.车辆牌号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="司机姓名" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.司机姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="司机电话" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.司机电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="制单人" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.制单人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="审核人" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审核人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发货人" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发货人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="制单时间" min-width="85">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="审核时间" min-width="85">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审核日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发货时间" min-width="85">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发出时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<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 style="min-height: 700px" width="60%">
|
||||
<el-form ref="invoiceFrom" :model="invoiceFrom" :rules="invoiceFromRules" label-position="left" label-width="110px">
|
||||
<el-row>
|
||||
<el-form-item label="发货单号" prop="发货单号" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.发货单号"
|
||||
readonly
|
||||
style="width: 200px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址" prop="收货地址" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.收货地址"
|
||||
readonly
|
||||
clearable
|
||||
size="mini"
|
||||
style="width: 495px;margin-right: 10px"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="发货单名" prop="发货单名" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.发货单名"
|
||||
readonly
|
||||
clearable
|
||||
style="width: 200px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="注意事项" prop="注意事项" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.注意事项"
|
||||
readonly
|
||||
clearable
|
||||
style="width: 495px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="收货单位" prop="收货单位" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.收货单位"
|
||||
readonly
|
||||
clearable
|
||||
style="width: 200px;margin-right: 10px"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货人员" prop="收货人员" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.收货人员"
|
||||
readonly
|
||||
clearable
|
||||
size="mini"
|
||||
style="width: 200px;margin-right: 10px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="联系电话" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.联系电话"
|
||||
:trigger-on-focus="false"
|
||||
readonly
|
||||
clearable
|
||||
size="mini"
|
||||
style="width: 200px;margin-right: 10px"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="车辆牌号" prop="车辆牌号" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.车辆牌号"
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
style="width: 200px;margin-right: 10px"
|
||||
clearable
|
||||
placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="司机姓名" prop="司机姓名" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.司机姓名"
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
style="width: 200px;margin-right: 10px"
|
||||
clearable
|
||||
placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="司机电话" prop="司机电话" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.司机电话"
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
style="width: 200px;margin-right: 10px"
|
||||
clearable
|
||||
placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 15px">
|
||||
<el-form-item label="备注" prop="备注" style="display: inline-block" label-width="80px">
|
||||
<el-input
|
||||
v-model="invoiceFrom.备注"
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
style="width: 788px;margin-right: 10px"
|
||||
clearable
|
||||
placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-button :disabled="disabled" type="success" size="mini" style="margin-left: 5px" @click="confirmation('invoiceFrom')">确认发货</el-button>
|
||||
<el-button :disabled="disabledDetailsDelete" type="danger" size="mini" @click="wiverOfConfirmation">打回确认</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div/>
|
||||
<el-divider/>
|
||||
<div>
|
||||
<el-table
|
||||
:data="tableDataDelivery"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="300"
|
||||
border
|
||||
size="mini">
|
||||
<el-table-column align="center" label="货品类别" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag effect="dark" size="small" type="success">{{ scope.row.货品类别 }}</el-tag>
|
||||
</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-column align="center" label="数量" width="80">
|
||||
<template slot-scope="scope">
|
||||
<template>
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="设计者" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设计者 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-divider/>
|
||||
<el-row>
|
||||
<div class="text">
|
||||
<span>制单人:</span>
|
||||
<span>{{ isMaker }}</span>
|
||||
<el-divider direction="vertical"/>
|
||||
<span style="margin-left: 10px">核准人:</span>
|
||||
<span>{{ isExamine }}</span>
|
||||
<el-divider direction="vertical"/>
|
||||
<span style="margin-left: 10px">发货执行人:</span>
|
||||
<span>{{ isDelive }}</span>
|
||||
<el-divider direction="vertical"/>
|
||||
<span>制单时间:</span>
|
||||
<span>{{ MakerTime }}</span>
|
||||
<el-divider direction="vertical"/>
|
||||
<span style="margin-left: 10px">核准时间:</span>
|
||||
<span>{{ ExamineTime }}</span>
|
||||
<el-divider direction="vertical"/>
|
||||
<span style="margin-left: 10px">发货时间:</span>
|
||||
<span>{{ DeliveTime }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--<el-button-->
|
||||
<!--:disabled="disabledDetailsDelete"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="text"-->
|
||||
<!--icon="el-icon-delete-solid"-->
|
||||
<!--@click.native.prevent="deleteRow(scope.$index, tableData)"-->
|
||||
<!-->删除</el-button>-->
|
||||
|
||||
<script>
|
||||
import { InvoiceListSearch, DetailsFeach, confirmation, reconfirmation } from '@/api/Assembly/DeliveryConfirmation'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
disabledDetailsDelete: false,
|
||||
disabled: false,
|
||||
isMaker: '',
|
||||
isDelive: '',
|
||||
isExamine: '',
|
||||
MakerTime: '',
|
||||
ExamineTime: '',
|
||||
DeliveTime: '',
|
||||
invoiceNum: '',
|
||||
tableDataDelivery: [],
|
||||
dialogFormVisible: false,
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
invoiceFrom: {
|
||||
发货单号: '',
|
||||
收货地址: '',
|
||||
发货单名: '',
|
||||
收货单位: '',
|
||||
注意事项: '',
|
||||
车辆牌号: '',
|
||||
司机姓名: '',
|
||||
司机电话: '',
|
||||
收货人员: '',
|
||||
联系电话: '',
|
||||
备注: ''
|
||||
},
|
||||
invoiceFromRules: {
|
||||
司机姓名: [{ required: true, message: '请输入司机姓名', trigger: 'blur' }],
|
||||
司机电话: [{ required: true, message: '请输入司机电话', trigger: 'blur' }],
|
||||
车辆牌号: [{ required: true, message: '请输入车辆牌号', trigger: 'blur' }]
|
||||
},
|
||||
searchFrom: {
|
||||
发货单名: '',
|
||||
发货单号: '',
|
||||
收货单位: '',
|
||||
车辆牌号: '',
|
||||
司机姓名: '',
|
||||
司机电话: '',
|
||||
制单人: '',
|
||||
核准人: '',
|
||||
执行人: '',
|
||||
开始制单日期: '',
|
||||
结束制单日期: '',
|
||||
开始核准日期: '',
|
||||
结束核准日期: '',
|
||||
开始发货日期: '',
|
||||
结束发货日期: '',
|
||||
发货单名_check: null,
|
||||
发货单号_check: null,
|
||||
收货单位_check: null,
|
||||
车辆牌号_check: null,
|
||||
司机姓名_check: null,
|
||||
司机电话_check: null,
|
||||
制单人_check: null,
|
||||
核准人_check: null,
|
||||
执行人_check: null,
|
||||
开始制单日期_check: null,
|
||||
结束制单日期_check: null,
|
||||
开始核准日期_check: null,
|
||||
结束核准日期_check: null,
|
||||
开始发货日期_check: null,
|
||||
结束发货日期_check: null
|
||||
},
|
||||
DeliveryStatusValue_check: null,
|
||||
tableDataSearchList: [],
|
||||
listLoading: false,
|
||||
DeliveryStatusValue: '',
|
||||
DeliveryStatus: [{
|
||||
value: 1,
|
||||
label: '已发货'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '未发货'
|
||||
}]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'name',
|
||||
'id'// 人员编号
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clearSearch() {
|
||||
this.DeliveryStatusValue = ''
|
||||
this.searchFrom.发货单名 = ''
|
||||
this.searchFrom.发货单号 = ''
|
||||
this.searchFrom.收货单位 = ''
|
||||
this.searchFrom.车辆牌号 = ''
|
||||
this.searchFrom.司机姓名 = ''
|
||||
this.searchFrom.司机电话 = ''
|
||||
this.searchFrom.制单人 = ''
|
||||
this.searchFrom.核准人 = ''
|
||||
this.searchFrom.执行人 = ''
|
||||
this.searchFrom.开始制单日期 = ''
|
||||
this.searchFrom.结束制单日期 = ''
|
||||
this.searchFrom.开始核准日期 = ''
|
||||
this.searchFrom.结束核准日期 = ''
|
||||
this.searchFrom.开始发货日期 = ''
|
||||
this.searchFrom.结束发货日期 = ''
|
||||
},
|
||||
search() {
|
||||
this.tableDataSearchList = []
|
||||
this.DeliveryStatusValue !== null && this.DeliveryStatusValue !== '' ? this.DeliveryStatusValue_check = 1 : this.DeliveryStatusValue_check = 0
|
||||
this.DeliveryStatusValue === null ? this.DeliveryStatusValue = '' : this.DeliveryStatusValue
|
||||
this.searchFrom.发货单名 !== null && this.searchFrom.发货单名 !== '' ? this.searchFrom.发货单名_check = 1 : this.searchFrom.发货单名_check = 0
|
||||
this.searchFrom.发货单号 !== null && this.searchFrom.发货单号 !== '' ? this.searchFrom.发货单号_check = 1 : this.searchFrom.发货单号_check = 0
|
||||
this.searchFrom.收货单位 !== null && this.searchFrom.收货单位 !== '' ? this.searchFrom.收货单位_check = 1 : this.searchFrom.收货单位_check = 0
|
||||
this.searchFrom.车辆牌号 !== null && this.searchFrom.车辆牌号 !== '' ? this.searchFrom.车辆牌号_check = 1 : this.searchFrom.车辆牌号_check = 0
|
||||
this.searchFrom.司机姓名 !== null && this.searchFrom.司机姓名 !== '' ? this.searchFrom.司机姓名_check = 1 : this.searchFrom.司机姓名_check = 0
|
||||
this.searchFrom.司机电话 !== null && this.searchFrom.司机电话 !== '' ? this.searchFrom.司机电话_check = 1 : this.searchFrom.司机电话_check = 0
|
||||
this.searchFrom.制单人 !== null && this.searchFrom.制单人 !== '' ? this.searchFrom.制单人_check = 1 : this.searchFrom.制单人_check = 0
|
||||
this.searchFrom.核准人 !== null && this.searchFrom.核准人 !== '' ? this.searchFrom.核准人_check = 1 : this.searchFrom.核准人_check = 0
|
||||
this.searchFrom.执行人 !== null && this.searchFrom.执行人 !== '' ? this.searchFrom.执行人_check = 1 : this.searchFrom.执行人_check = 0
|
||||
this.searchFrom.开始制单日期 !== null && this.searchFrom.开始制单日期 !== '' ? this.searchFrom.开始制单日期_check = 1 : this.searchFrom.开始制单日期_check = 0
|
||||
this.searchFrom.结束制单日期 !== null && this.searchFrom.结束制单日期 !== '' ? this.searchFrom.结束制单日期_check = 1 : this.searchFrom.结束制单日期_check = 0
|
||||
this.searchFrom.开始核准日期 !== null && this.searchFrom.开始核准日期 !== '' ? this.searchFrom.开始核准日期_check = 1 : this.searchFrom.开始核准日期_check = 0
|
||||
this.searchFrom.结束核准日期 !== null && this.searchFrom.结束核准日期 !== '' ? this.searchFrom.结束核准日期_check = 1 : this.searchFrom.结束核准日期_check = 0
|
||||
this.searchFrom.开始发货日期 !== null && this.searchFrom.开始发货日期 !== '' ? this.searchFrom.开始发货日期_check = 1 : this.searchFrom.开始发货日期_check = 0
|
||||
this.searchFrom.结束发货日期 !== null && this.searchFrom.结束发货日期 !== '' ? this.searchFrom.结束发货日期_check = 1 : this.searchFrom.结束发货日期_check = 0
|
||||
this.listLoading = true
|
||||
InvoiceListSearch(this.searchFrom.发货单名, this.searchFrom.发货单号, this.searchFrom.收货单位, this.searchFrom.车辆牌号, this.searchFrom.司机姓名, this.searchFrom.司机电话, this.searchFrom.制单人, this.searchFrom.核准人, this.searchFrom.执行人, this.searchFrom.开始制单日期, this.searchFrom.结束制单日期, this.searchFrom.开始核准日期, this.searchFrom.结束核准日期, this.searchFrom.开始发货日期, this.searchFrom.结束发货日期, this.searchFrom.发货单名_check, this.searchFrom.发货单号_check, this.searchFrom.收货单位_check, this.searchFrom.车辆牌号_check, this.searchFrom.司机姓名_check, this.searchFrom.司机电话_check, this.searchFrom.制单人_check, this.searchFrom.核准人_check, this.searchFrom.执行人_check, this.searchFrom.开始制单日期_check, this.searchFrom.结束制单日期_check, this.searchFrom.开始核准日期_check, this.searchFrom.结束核准日期_check, this.searchFrom.开始发货日期_check, this.searchFrom.结束发货日期_check, this.DeliveryStatusValue_check, this.DeliveryStatusValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.rows.length !== 0) {
|
||||
this.listLoading = false
|
||||
this.tableDataSearchList = response.data.rows
|
||||
this.total = response.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.search()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.search()
|
||||
},
|
||||
openDialogFormVisible(row) {
|
||||
this.addForm('invoiceFrom')
|
||||
row.是否发出.toString() === '1' ? this.disabled = true : this.disabled = false
|
||||
row.是否发出.toString() === '1' ? this.disabledDetailsDelete = false : this.disabledDetailsDelete = true
|
||||
this.invoiceFrom.发货单号 = row.发货单编号
|
||||
this.invoiceFrom.收货地址 = row.收货地址
|
||||
this.invoiceFrom.收货单位 = row.收货单位
|
||||
this.invoiceFrom.发货单名 = row.发货单名称
|
||||
this.invoiceFrom.注意事项 = row.注意事项
|
||||
this.invoiceFrom.车辆牌号 = row.车辆牌号
|
||||
this.invoiceFrom.司机姓名 = row.司机姓名
|
||||
this.invoiceFrom.司机电话 = row.司机电话
|
||||
this.invoiceFrom.收货人员 = row.收货人员
|
||||
this.invoiceFrom.联系电话 = row.联系电话
|
||||
this.invoiceFrom.备注 = row.备注
|
||||
this.isMaker = row.制单人
|
||||
this.isDelive = row.执行人
|
||||
this.isExamine = row.审核人
|
||||
this.MakerTime = row.操作日期
|
||||
this.ExamineTime = row.审核日期
|
||||
this.DeliveTime = row.发出时间
|
||||
this.invoiceNum = row.发货单流水号
|
||||
this.dialogFormVisible = true
|
||||
DetailsFeach(this.invoiceNum).then(response => {
|
||||
this.tableDataDelivery = response.data
|
||||
})
|
||||
},
|
||||
confirmation(formName) {
|
||||
this.invoiceFrom.司机姓名 === null ? this.invoiceFrom.司机姓名 = '' : this.invoiceFrom.司机姓名
|
||||
this.invoiceFrom.司机电话 === null ? this.invoiceFrom.司机电话 = '' : this.invoiceFrom.司机电话
|
||||
this.invoiceFrom.车辆牌号 === null ? this.invoiceFrom.车辆牌号 = '' : this.invoiceFrom.车辆牌号
|
||||
this.invoiceFrom.备注 === null ? this.invoiceFrom.备注 = '' : this.invoiceFrom.备注
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm('请确认货物是否全部发出, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
confirmation(this.invoiceNum, this.invoiceFrom.司机姓名, this.invoiceFrom.司机电话, this.invoiceFrom.车辆牌号, this.name, this.invoiceFrom.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('发货确认成功!')
|
||||
this.disabled = true
|
||||
this.disabledDetailsDelete = false
|
||||
DetailsFeach(this.invoiceNum).then(response => {
|
||||
this.tableDataDelivery = response.data
|
||||
})
|
||||
this.search()
|
||||
} else {
|
||||
this.$message.error('发货确认失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
wiverOfConfirmation() {
|
||||
this.$confirm('请确认货物是否全部发出, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
reconfirmation(this.invoiceNum).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('打回成功!')
|
||||
this.disabled = false
|
||||
this.disabledDetailsDelete = true
|
||||
DetailsFeach(this.invoiceNum).then(response => {
|
||||
this.tableDataDelivery = response.data
|
||||
})
|
||||
this.search()
|
||||
} else {
|
||||
this.$message.success('打回失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-form-item{
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.text{
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
</style>
|
||||
350
src/views/Assembly/ElectricalAssembly/index.vue
Normal file
350
src/views/Assembly/ElectricalAssembly/index.vue
Normal file
@@ -0,0 +1,350 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <span>组号:</span>-->
|
||||
<!-- <el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" clearable @change="searchTable2()">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in groupNumber"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable1();searchTable2()">查询</el-button>-->
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">总装调试</h3>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
|
||||
<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-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-column label="操作" align="center" width="460px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.电气装配状态===null || scope.row.电气装配状态===0" type="success" size="small" @click="handlestart_1(scope.row)">开始装配</el-button>
|
||||
<el-button v-if="scope.row.电气装配状态===1" type="danger" size="small" @click="handleend_1(scope.row)">结束装配</el-button>
|
||||
<el-button v-if="scope.row.电气装配状态===2" type="info" size="small" >装配完成</el-button>
|
||||
<el-button v-if="scope.row.电气装配状态===1" plain size="small" @click="handleCancelStart_1(scope.row)">取消开始装配</el-button>
|
||||
<el-button v-if="scope.row.电气装配状态===2" plain size="small" @click="handleCancelEnd_1(scope.row)">取消结束装配</el-button>
|
||||
<el-button v-if="scope.row.电气调试状态===null || scope.row.电气调试状态===0" type="success" size="small" @click="handlestart_2(scope.row)">开始调试</el-button>
|
||||
<el-button v-if="scope.row.电气调试状态===1" type="danger" size="small" @click="handleend_2(scope.row)">结束调试</el-button>
|
||||
<el-button v-if="scope.row.电气调试状态===2" type="info" size="small" >调试完成</el-button>
|
||||
<el-button v-if="scope.row.电气调试状态===1" plain size="small" @click="handleCancelStart_2(scope.row)">取消开始调试</el-button>
|
||||
<el-button v-if="scope.row.电气调试状态===2" plain size="small" @click="handleCancelEnd_2(scope.row)">取消结束调试</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">部装</h3>
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
|
||||
<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">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.实际工时" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.实际工时 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.修补工时" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.修补工时 }}</span>
|
||||
</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">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.备注" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.备注 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="!scope.row.isEditing" type="primary" size="small" @click="editTable2(scope.row)">编辑</el-button>
|
||||
<el-button v-if="scope.row.isEditing" type="primary" size="small" @click="submitTable2(scope.row)">确定</el-button>
|
||||
<el-button v-if="scope.row.isEditing" size="small" @click="cancelTable2(scope.row)">取消</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 1" type="success" size="small" @click="handlestart_3(scope.row)">开始装配</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 2" type="danger" size="small" @click="handleend_3(scope.row)">结束装配</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 3" type="info" size="small" >装配完成</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 2" plain size="small" @click="handleCancelStart_3(scope.row)">取消开始装配</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 3" plain size="small" @click="handleCancelEnd_3(scope.row)">取消结束装配</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate, submitTable2 } from '@/api/Assembly/ElectricalAssembly'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
tableData1: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
submitTable2(row) {
|
||||
submitTable2(row.备注, row.计划流水号, row.实际工时, row.修补工时).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
row.isEditing = !row.isEditing
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
console.log(row)
|
||||
},
|
||||
cancelTable2(row) {
|
||||
row.isEditing = !row.isEditing
|
||||
row.实际工时 = row.原实际工时
|
||||
row.修补工时 = row.原修补工时
|
||||
row.备注 = row.原备注
|
||||
console.log(row)
|
||||
},
|
||||
editTable2(row) {
|
||||
row.isEditing = !row.isEditing
|
||||
row.原实际工时 = row.实际工时
|
||||
row.原修补工时 = row.修补工时
|
||||
row.原备注 = row.备注
|
||||
console.log(row)
|
||||
},
|
||||
// 取消开始总装
|
||||
handleCancelStart_1(row) {
|
||||
MachineToolStateUpdate(row.机床流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束总装
|
||||
handleCancelEnd_1(row) {
|
||||
MachineToolStateUpdate(row.机床流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消开始调试
|
||||
handleCancelStart_2(row) {
|
||||
DebugStatusUpdate(row.机床流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束调试
|
||||
handleCancelEnd_2(row) {
|
||||
DebugStatusUpdate(row.机床流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消开始部装
|
||||
handleCancelStart_3(row) {
|
||||
ComponentStateUpdate(row.计划流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 1
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束部装
|
||||
handleCancelEnd_3(row) {
|
||||
ComponentStateUpdate(row.计划流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
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].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.check2 === 0) {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
} else {
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
}).then(() => {
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2() {
|
||||
this.tableData2 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
|
||||
this.check2 = 1
|
||||
searchTable2(this.machineNumberValue, 2).then(response => {
|
||||
console.log(response.data, 111)
|
||||
this.tableData2 = response.data
|
||||
this.tableData2.map(v => {
|
||||
this.$set(v, 'isEditing', false)
|
||||
this.$set(v, '原实际工时', '')
|
||||
this.$set(v, '原修补工时', '')
|
||||
this.$set(v, '原备注', '')
|
||||
if (v.是否工作 === null || v.是否工作 === 0) {
|
||||
this.$set(v, 'buttonStatus', 1)
|
||||
} else if (v.是否工作 === 1) {
|
||||
this.$set(v, 'buttonStatus', 2)
|
||||
} else {
|
||||
this.$set(v, 'buttonStatus', 3)
|
||||
}
|
||||
return v
|
||||
})
|
||||
})
|
||||
} else { this.check2 = 0 }
|
||||
},
|
||||
// 总装开始装配
|
||||
handlestart_1(row) { // 弹出单据编辑
|
||||
MachineToolStateUpdate(row.机床流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束装配
|
||||
handleend_1(row) { // 弹出单据编辑
|
||||
MachineToolStateUpdate(row.机床流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装开始调试
|
||||
handlestart_2(row) { // 弹出单据编辑
|
||||
DebugStatusUpdate(row.机床流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束调试
|
||||
handleend_2(row) { // 弹出单据编辑
|
||||
DebugStatusUpdate(row.机床流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装开始装配
|
||||
handlestart_3(row) { // 弹出单据编辑
|
||||
ComponentStateUpdate(row.计划流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装结束装配
|
||||
handleend_3(row) { // 弹出单据编辑
|
||||
ComponentStateUpdate(row.计划流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 3
|
||||
// this.searchTable2()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
364
src/views/Assembly/InstallationAndMonitoring/index.vue
Normal file
364
src/views/Assembly/InstallationAndMonitoring/index.vue
Normal file
@@ -0,0 +1,364 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-row>
|
||||
<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">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<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, searchTable, searchTable1, addData, editData, deleteData, addData1, editData1, deleteData1 } from '@/api/Assembly/InstallationAndMonitoring'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
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() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
name: 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>
|
||||
256
src/views/Assembly/MakeAssemblyPlan/index.vue
Normal file
256
src/views/Assembly/MakeAssemblyPlan/index.vue
Normal file
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1();machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div v-for="(file, key) in hadFile" :key="key">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div class="action"/>
|
||||
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
|
||||
<div v-else class="icon"><svg-icon icon-class="file" /></div>
|
||||
<a :href="file.url" target="view_window"><div class="info">{{ file.name }}</div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">机床信息</h3>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
|
||||
<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-card>
|
||||
<el-card>
|
||||
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="float:left;margin: 7px 0 0 0" @click="addTable()">增加</el-button>
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
|
||||
<el-option
|
||||
v-for="item in groupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.计划工时 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
|
||||
<el-button v-if="scope.row.edit" type="primary" size="small" @click="cancel(scope.row)">取消</el-button>
|
||||
<el-button type="danger" size="small" @click="deleteData(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initProject, searchgroup, searchgroupName, getFileData, searchTable1, searchTable2, deletedata, editData, addData } from '@/api/Assembly/MakeAssemblyPlan'
|
||||
import { ServerIP } from '@/utils/request'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNum: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
hadFile: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
getFileData(machineValue) {
|
||||
this.hadFile = []
|
||||
getFileData(machineValue).then(res => {
|
||||
if (res.data.length > 0) {
|
||||
res.data.map(item => {
|
||||
this.hadFile.push({
|
||||
url: `${ServerIP}${item.文件标识}.${item.文件后缀}`,
|
||||
name: `${item.文件名称}.${item.文件后缀}`,
|
||||
suffix: item.文件后缀,
|
||||
id: item.文件标识
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
groupChange(row, index) {
|
||||
this.groupNumberValue = ''
|
||||
this.tableData2[index].任务名称 = ''
|
||||
if (row.组件流水号 !== '' && row.组件流水号 !== null) {
|
||||
searchgroupName(row.组件流水号).then(response => {
|
||||
console.log(row, 22222)
|
||||
this.groupNumberValue = response.data[0].组号
|
||||
this.tableData2[index].任务名称 = response.data[0].组件名称
|
||||
})
|
||||
}
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNum = []
|
||||
searchgroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.getFileData(this.machineNumberValue)
|
||||
},
|
||||
confirmEdit(row) {
|
||||
editData(row.计划流水号, row.组件流水号, this.groupNumberValue, row.任务名称, row.计划工时).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.edit = false
|
||||
this.searchTable2()
|
||||
this.$message.success('编辑成功')
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel(row) {
|
||||
row.edit = !row.edit
|
||||
this.searchTable2()
|
||||
},
|
||||
deleteData(row) {
|
||||
console.log(row.计划流水号)
|
||||
this.deleteRow(deletedata, row.计划流水号, function() { this.searchTable2() })
|
||||
},
|
||||
addTable() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
addData(this.machineNumberValue, 1).then(response => {
|
||||
console.log(response)
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchTable2()
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择机床')
|
||||
}
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.check2 === 0) {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
} else {
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
}).then(() => {
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2() {
|
||||
this.tableData2 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
|
||||
this.check2 = 1
|
||||
searchTable2(this.machineNumberValue, 1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData2.push({
|
||||
计划流水号: response.data[i].计划流水号,
|
||||
组件流水号: response.data[i].组件流水号,
|
||||
组号: response.data[i].组号,
|
||||
任务名称: response.data[i].任务名称,
|
||||
计划工时: response.data[i].计划工时,
|
||||
edit: false
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log(this.tableData2, 222222)
|
||||
} else { this.check2 = 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
256
src/views/Assembly/MakeColdWorkPlan/index.vue
Normal file
256
src/views/Assembly/MakeColdWorkPlan/index.vue
Normal file
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1();machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div v-for="(file, key) in hadFile" :key="key">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div class="action"/>
|
||||
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
|
||||
<div v-else class="icon"><svg-icon icon-class="file" /></div>
|
||||
<a :href="file.url" target="view_window"><div class="info">{{ file.name }}</div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">机床信息</h3>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
|
||||
<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-card>
|
||||
<el-card>
|
||||
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="float:left;margin: 7px 0 0 0" @click="addTable()">增加</el-button>
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
|
||||
<el-option
|
||||
v-for="item in groupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.计划工时 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
|
||||
<el-button v-if="scope.row.edit" type="primary" size="small" @click="cancel(scope.row)">取消</el-button>
|
||||
<el-button type="danger" size="small" @click="deleteData(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initProject, searchgroup, searchgroupName, getFileData, searchTable1, searchTable2, deletedata, editData, addData } from '@/api/Assembly/MakeAssemblyPlan'
|
||||
import { ServerIP } from '@/utils/request'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNum: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
hadFile: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
getFileData(machineValue) {
|
||||
this.hadFile = []
|
||||
getFileData(machineValue).then(res => {
|
||||
if (res.data.length > 0) {
|
||||
res.data.map(item => {
|
||||
this.hadFile.push({
|
||||
url: `${ServerIP}${item.文件标识}.${item.文件后缀}`,
|
||||
name: `${item.文件名称}.${item.文件后缀}`,
|
||||
suffix: item.文件后缀,
|
||||
id: item.文件标识
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
groupChange(row, index) {
|
||||
this.groupNumberValue = ''
|
||||
this.tableData2[index].任务名称 = ''
|
||||
if (row.组件流水号 !== '' && row.组件流水号 !== null) {
|
||||
searchgroupName(row.组件流水号).then(response => {
|
||||
console.log(row, 22222)
|
||||
this.groupNumberValue = response.data[0].组号
|
||||
this.tableData2[index].任务名称 = response.data[0].组件名称
|
||||
})
|
||||
}
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNum = []
|
||||
searchgroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.getFileData(this.machineNumberValue)
|
||||
},
|
||||
confirmEdit(row) {
|
||||
editData(row.计划流水号, row.组件流水号, this.groupNumberValue, row.任务名称, row.计划工时).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.edit = false
|
||||
this.searchTable2()
|
||||
this.$message.success('编辑成功')
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel(row) {
|
||||
row.edit = !row.edit
|
||||
this.searchTable2()
|
||||
},
|
||||
deleteData(row) {
|
||||
console.log(row.计划流水号)
|
||||
this.deleteRow(deletedata, row.计划流水号, function() { this.searchTable2() })
|
||||
},
|
||||
addTable() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
addData(this.machineNumberValue, 3).then(response => {
|
||||
console.log(response)
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchTable2()
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择机床')
|
||||
}
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.check2 === 0) {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
} else {
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
}).then(() => {
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2() {
|
||||
this.tableData2 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
|
||||
this.check2 = 1
|
||||
searchTable2(this.machineNumberValue, 3).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData2.push({
|
||||
计划流水号: response.data[i].计划流水号,
|
||||
组件流水号: response.data[i].组件流水号,
|
||||
组号: response.data[i].组号,
|
||||
任务名称: response.data[i].任务名称,
|
||||
计划工时: response.data[i].计划工时,
|
||||
edit: false
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log(this.tableData2, 222222)
|
||||
} else { this.check2 = 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
256
src/views/Assembly/MakeElectricalAssembly/index.vue
Normal file
256
src/views/Assembly/MakeElectricalAssembly/index.vue
Normal file
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1();machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div v-for="(file, key) in hadFile" :key="key">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div class="action"/>
|
||||
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
|
||||
<div v-else class="icon"><svg-icon icon-class="file" /></div>
|
||||
<a :href="file.url" target="view_window"><div class="info">{{ file.name }}</div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">机床信息</h3>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
|
||||
<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-card>
|
||||
<el-card>
|
||||
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="float:left;margin: 7px 0 0 0" @click="addTable()">增加</el-button>
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
|
||||
<el-option
|
||||
v-for="item in groupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.计划工时 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
|
||||
<el-button v-if="scope.row.edit" type="primary" size="small" @click="cancel(scope.row)">取消</el-button>
|
||||
<el-button type="danger" size="small" @click="deleteData(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initProject, searchgroup, searchgroupName, getFileData, searchTable1, searchTable2, deletedata, editData, addData } from '@/api/Assembly/MakeAssemblyPlan'
|
||||
import { ServerIP } from '@/utils/request'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNum: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
hadFile: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
getFileData(machineValue) {
|
||||
this.hadFile = []
|
||||
getFileData(machineValue).then(res => {
|
||||
if (res.data.length > 0) {
|
||||
res.data.map(item => {
|
||||
this.hadFile.push({
|
||||
url: `${ServerIP}${item.文件标识}.${item.文件后缀}`,
|
||||
name: `${item.文件名称}.${item.文件后缀}`,
|
||||
suffix: item.文件后缀,
|
||||
id: item.文件标识
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
groupChange(row, index) {
|
||||
this.groupNumberValue = ''
|
||||
this.tableData2[index].任务名称 = ''
|
||||
if (row.组件流水号 !== '' && row.组件流水号 !== null) {
|
||||
searchgroupName(row.组件流水号).then(response => {
|
||||
console.log(row, 22222)
|
||||
this.groupNumberValue = response.data[0].组号
|
||||
this.tableData2[index].任务名称 = response.data[0].组件名称
|
||||
})
|
||||
}
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNum = []
|
||||
searchgroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.getFileData(this.machineNumberValue)
|
||||
},
|
||||
confirmEdit(row) {
|
||||
editData(row.计划流水号, row.组件流水号, this.groupNumberValue, row.任务名称, row.计划工时).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.edit = false
|
||||
this.searchTable2()
|
||||
this.$message.success('编辑成功')
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel(row) {
|
||||
row.edit = !row.edit
|
||||
this.searchTable2()
|
||||
},
|
||||
deleteData(row) {
|
||||
console.log(row.计划流水号)
|
||||
this.deleteRow(deletedata, row.计划流水号, function() { this.searchTable2() })
|
||||
},
|
||||
addTable() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
addData(this.machineNumberValue, 2).then(response => {
|
||||
console.log(response)
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchTable2()
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择机床')
|
||||
}
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.check2 === 0) {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
} else {
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
}).then(() => {
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2() {
|
||||
this.tableData2 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
|
||||
this.check2 = 1
|
||||
searchTable2(this.machineNumberValue, 2).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData2.push({
|
||||
计划流水号: response.data[i].计划流水号,
|
||||
组件流水号: response.data[i].组件流水号,
|
||||
组号: response.data[i].组号,
|
||||
任务名称: response.data[i].任务名称,
|
||||
计划工时: response.data[i].计划工时,
|
||||
edit: false
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log(this.tableData2, 222222)
|
||||
} else { this.check2 = 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
256
src/views/Assembly/MakePaintPlan/index.vue
Normal file
256
src/views/Assembly/MakePaintPlan/index.vue
Normal file
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1();machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div v-for="(file, key) in hadFile" :key="key">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div class="action"/>
|
||||
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
|
||||
<div v-else class="icon"><svg-icon icon-class="file" /></div>
|
||||
<a :href="file.url" target="view_window"><div class="info">{{ file.name }}</div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">机床信息</h3>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
|
||||
<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-card>
|
||||
<el-card>
|
||||
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="float:left;margin: 7px 0 0 0" @click="addTable()">增加</el-button>
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
|
||||
<el-option
|
||||
v-for="item in groupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.计划工时 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
|
||||
<el-button v-if="scope.row.edit" type="primary" size="small" @click="cancel(scope.row)">取消</el-button>
|
||||
<el-button type="danger" size="small" @click="deleteData(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initProject, searchgroup, searchgroupName, getFileData, searchTable1, searchTable2, deletedata, editData, addData } from '@/api/Assembly/MakeAssemblyPlan'
|
||||
import { ServerIP } from '@/utils/request'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNum: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
hadFile: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
getFileData(machineValue) {
|
||||
this.hadFile = []
|
||||
getFileData(machineValue).then(res => {
|
||||
if (res.data.length > 0) {
|
||||
res.data.map(item => {
|
||||
this.hadFile.push({
|
||||
url: `${ServerIP}${item.文件标识}.${item.文件后缀}`,
|
||||
name: `${item.文件名称}.${item.文件后缀}`,
|
||||
suffix: item.文件后缀,
|
||||
id: item.文件标识
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
groupChange(row, index) {
|
||||
this.groupNumberValue = ''
|
||||
this.tableData2[index].任务名称 = ''
|
||||
if (row.组件流水号 !== '' && row.组件流水号 !== null) {
|
||||
searchgroupName(row.组件流水号).then(response => {
|
||||
console.log(row, 22222)
|
||||
this.groupNumberValue = response.data[0].组号
|
||||
this.tableData2[index].任务名称 = response.data[0].组件名称
|
||||
})
|
||||
}
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNum = []
|
||||
searchgroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.getFileData(this.machineNumberValue)
|
||||
},
|
||||
confirmEdit(row) {
|
||||
editData(row.计划流水号, row.组件流水号, this.groupNumberValue, row.任务名称, row.计划工时).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.edit = false
|
||||
this.searchTable2()
|
||||
this.$message.success('编辑成功')
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel(row) {
|
||||
row.edit = !row.edit
|
||||
this.searchTable2()
|
||||
},
|
||||
deleteData(row) {
|
||||
console.log(row.计划流水号)
|
||||
this.deleteRow(deletedata, row.计划流水号, function() { this.searchTable2() })
|
||||
},
|
||||
addTable() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
addData(this.machineNumberValue, 4).then(response => {
|
||||
console.log(response)
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchTable2()
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择机床')
|
||||
}
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.check2 === 0) {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
} else {
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
}).then(() => {
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2() {
|
||||
this.tableData2 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
|
||||
this.check2 = 1
|
||||
searchTable2(this.machineNumberValue, 4).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData2.push({
|
||||
计划流水号: response.data[i].计划流水号,
|
||||
组件流水号: response.data[i].组件流水号,
|
||||
组号: response.data[i].组号,
|
||||
任务名称: response.data[i].任务名称,
|
||||
计划工时: response.data[i].计划工时,
|
||||
edit: false
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log(this.tableData2, 222222)
|
||||
} else { this.check2 = 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
271
src/views/Assembly/PaintPlanExecution/index.vue
Normal file
271
src/views/Assembly/PaintPlanExecution/index.vue
Normal file
@@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
|
||||
<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-card>
|
||||
<el-card>
|
||||
<h3 style="margin: 0;text-align: center;">工作计划</h3>
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
|
||||
<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">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.实际工时" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.实际工时 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.修补工时" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.修补工时 }}</span>
|
||||
</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">
|
||||
<el-input v-if="scope.row.isEditing" v-model="scope.row.备注" size="mini"/>
|
||||
<span v-if="!scope.row.isEditing">{{ scope.row.备注 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="!scope.row.isEditing" type="primary" size="small" @click="editTable2(scope.row)">编辑</el-button>
|
||||
<el-button v-if="scope.row.isEditing" type="primary" size="small" @click="submitTable2(scope.row)">确定</el-button>
|
||||
<el-button v-if="scope.row.isEditing" size="small" @click="cancelTable2(scope.row)">取消</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 1" type="success" size="small" @click="handlestart_3(scope.row)">开始工作</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 2" type="danger" size="small" @click="handleend_3(scope.row)">结束工作</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 3" type="info" size="small" >工作完成</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 2" plain size="small" @click="handleCancelStart_3(scope.row)">取消开始工作</el-button>
|
||||
<el-button v-if="scope.row.buttonStatus === 3" plain size="small" @click="handleCancelEnd_3(scope.row)">取消结束工作</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate, submitTable2 } from '@/api/Assembly/PlanExecution'
|
||||
export default {
|
||||
name: 'ColdWorkPlanExecution',
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
tableData1: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
submitTable2(row) {
|
||||
submitTable2(row.备注, row.计划流水号, row.实际工时, row.修补工时).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
row.isEditing = !row.isEditing
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
console.log(row)
|
||||
},
|
||||
cancelTable2(row) {
|
||||
row.isEditing = !row.isEditing
|
||||
row.实际工时 = row.原实际工时
|
||||
row.修补工时 = row.原修补工时
|
||||
row.备注 = row.原备注
|
||||
console.log(row)
|
||||
},
|
||||
editTable2(row) {
|
||||
row.isEditing = !row.isEditing
|
||||
row.原实际工时 = row.实际工时
|
||||
row.原修补工时 = row.修补工时
|
||||
row.原备注 = row.备注
|
||||
console.log(row)
|
||||
},
|
||||
// 取消开始工作
|
||||
handleCancelStart_3(row) {
|
||||
ComponentStateUpdate(row.计划流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 1
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束工作
|
||||
handleCancelEnd_3(row) {
|
||||
ComponentStateUpdate(row.计划流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
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].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.check2 === 0) {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
} else {
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
}).then(() => {
|
||||
this.searchTable2()
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2() {
|
||||
this.tableData2 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
|
||||
this.check2 = 1
|
||||
searchTable2(this.machineNumberValue, 4).then(response => {
|
||||
console.log(response.data, 111)
|
||||
this.tableData2 = response.data
|
||||
this.tableData2.map(v => {
|
||||
this.$set(v, 'isEditing', false)
|
||||
this.$set(v, '原实际工时', '')
|
||||
this.$set(v, '原修补工时', '')
|
||||
this.$set(v, '原备注', '')
|
||||
if (v.是否工作 === null || v.是否工作 === 0) {
|
||||
this.$set(v, 'buttonStatus', 1)
|
||||
} else if (v.是否工作 === 1) {
|
||||
this.$set(v, 'buttonStatus', 2)
|
||||
} else {
|
||||
this.$set(v, 'buttonStatus', 3)
|
||||
}
|
||||
return v
|
||||
})
|
||||
})
|
||||
} else { this.check2 = 0 }
|
||||
},
|
||||
// 总装开始装配
|
||||
handlestart_1(row) { // 弹出单据编辑
|
||||
MachineToolStateUpdate(row.机床流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束装配
|
||||
handleend_1(row) { // 弹出单据编辑
|
||||
MachineToolStateUpdate(row.机床流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装开始调试
|
||||
handlestart_2(row) { // 弹出单据编辑
|
||||
DebugStatusUpdate(row.机床流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束调试
|
||||
handleend_2(row) { // 弹出单据编辑
|
||||
DebugStatusUpdate(row.机床流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装开始装配
|
||||
handlestart_3(row) { // 弹出单据编辑
|
||||
ComponentStateUpdate(row.计划流水号, 1).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装结束装配
|
||||
handleend_3(row) { // 弹出单据编辑
|
||||
ComponentStateUpdate(row.计划流水号, 2).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 3
|
||||
// this.searchTable2()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
240
src/views/Assembly/PrintingAssemblyProcessCard/index.vue
Normal file
240
src/views/Assembly/PrintingAssemblyProcessCard/index.vue
Normal file
@@ -0,0 +1,240 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<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">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</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()">导出</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>
|
||||
<div id="cjn">
|
||||
<table cellspacing="0px" border align="center" width="100%" style="">
|
||||
<thead id="20">
|
||||
<tr class="trHeight2">
|
||||
<td colspan="3" style="text-align: center;font-size: 30px;font-weight: bold;width: 10.25%;">GAOJING</td>
|
||||
<td colspan="13" style="text-align:center;font-size: 30px;font-weight: bold">专机装配工艺过程卡</td>
|
||||
<td colspan="2"><img id="img" alt=""></td>
|
||||
</tr>
|
||||
<tr class="tbodyHead">
|
||||
<td colspan="2" style="font-weight: bold" width="7.25%" align="center">机床编号:</td>
|
||||
<td colspan="3" width="16%" align="center">{{ MachineNum }}</td>
|
||||
<td colspan="1" style="font-weight: bold" width="8.25%" align="center">机床名称:</td>
|
||||
<td colspan="5" width="30%" align="center">{{ MachineName }}</td>
|
||||
<td colspan="1" style="font-weight: bold" width="7.25%" align="center">客户名称:</td>
|
||||
<td colspan="6" width="31.25%" align="center">{{ CustomerName }}</td>
|
||||
</tr>
|
||||
<tr id="tableHead" class="trHeight">
|
||||
<th class="tg-0pky" width="4%">序号</th>
|
||||
<th class="tg-0lax" colspan="4">工序名称</th>
|
||||
<th class="tg-0lax" colspan="6">工艺内容及装配具体要求</th>
|
||||
<th class="tg-0lax">质检</th>
|
||||
<th class="tg-0lax" width="4%">工时/时</th>
|
||||
<th class="tg-0lax">完成情况/装配工</th>
|
||||
<th class="tg-0lax">检验情况/检验员</th>
|
||||
<th class="tg-0lax" width="100px">备注</th>
|
||||
<th class="tg-0lax" colspan="2" width="200px">条码</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="(item, index) in dataAll" :key="index">
|
||||
<tr class="trHeight">
|
||||
<td colspan="18" style="font-weight: bold">{{ item.table1 }}</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in item.table2" :key="index" class="trHeight1">
|
||||
<td align="center"> {{ list.序号 }}</td>
|
||||
<td colspan="4">{{ list.工序名称 }}</td>
|
||||
<td colspan="6">{{ list.工艺内容及装配具体要求 }}</td>
|
||||
<td align="center">{{ list.质检 }}</td>
|
||||
<td>{{ list.工时 }}</td>
|
||||
<td/>
|
||||
<td/>
|
||||
<td width="100px"/>
|
||||
<td colspan="2" width="200px"><barcode :value="list.装配工序流水号" :options="barcode_option" tag="svg"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchDetail, searchProcess, searchTable } from '@/api/Assembly/PrintingAssemblyProcessCard'
|
||||
import $ from 'jquery'
|
||||
import QRCode from 'qrcode'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
barcode_option: {
|
||||
displayValue: false,
|
||||
background: '#fff',
|
||||
valid: function(valid) {
|
||||
console.log(valid)
|
||||
},
|
||||
width: '2px',
|
||||
height: '25px'
|
||||
},
|
||||
dataAll: [],
|
||||
tableData: [],
|
||||
radio: 0,
|
||||
check: 0,
|
||||
check1: 0,
|
||||
loading: false,
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
MachineNum: '',
|
||||
MachineName: '',
|
||||
CustomerName: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
name: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() { // 主表查询
|
||||
this.loading = true
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(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 opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
type: 'image/jpeg',
|
||||
rendererOpts: {
|
||||
quality: 0.3
|
||||
}
|
||||
}
|
||||
QRCode.toDataURL(row.机床流水号, opts, function(err, url) {
|
||||
if (err) throw err
|
||||
const img = document.getElementById('img')
|
||||
img.src = url
|
||||
})
|
||||
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() {
|
||||
const htmlNode = $('#cjn').html()
|
||||
const body = $('body')
|
||||
body.children().hide()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.children().not('script').show()
|
||||
printNode.remove()
|
||||
},
|
||||
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;
|
||||
}
|
||||
.trHeight{
|
||||
height: 65px;
|
||||
}
|
||||
.trHeight1{
|
||||
height: 30px;
|
||||
}
|
||||
.trHeight2{
|
||||
height: 120px;
|
||||
}
|
||||
.tbodyHead{
|
||||
height: 70px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
</style>
|
||||
456
src/views/Assembly/QualityBasicData/index.vue
Normal file
456
src/views/Assembly/QualityBasicData/index.vue
Normal file
@@ -0,0 +1,456 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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="handleAdd1()">增加</el-button>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
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" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</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="handleAdd2()">增加</el-button>
|
||||
<el-table :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" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div style="width: 32.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: 85%;margin-top: 15px" @click="handleAdd3()">增加</el-button>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
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" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 32.8%; float: right; margin-right: 6px;margin-left: 6px">
|
||||
<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: 85%;margin-top: 15px" @click="handleAdd4()">增加</el-button>
|
||||
<el-table :data="tableData3" 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" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 32.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: 85%;margin-top: 15px" @click="handleAdd5()">增加</el-button>
|
||||
<el-table :data="tableData4" 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" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div style="width: 35.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: 85%;margin-top: 15px" @click="handleAdd6()">增加</el-button>
|
||||
<el-table :data="tableData5" border style="width: 100%;max-height: 450px;margin-top: 10px" height="450px" highlight-current-row size="small" @row-click="searchTesting">
|
||||
<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" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 63.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="handleAdd7()">增加</el-button>
|
||||
<el-table :data="tableData6" 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" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="400px">
|
||||
<el-form label-position="left" label-width="115px" class="demo-ruleForm">
|
||||
<el-form-item v-show="title==='增加不合格原因'" label="不合格原因" prop="不合格原因">
|
||||
<el-input v-model="Reasons" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="title==='增加不合格处理'" label="不合格处理" prop="不合格处理">
|
||||
<el-input v-model="Handle" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="title==='增加质检尺寸'" label="质检尺寸" prop="质检尺寸">
|
||||
<el-input v-model="Size" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="title==='增加质检外观'" label="质检外观" prop="质检外观">
|
||||
<el-input v-model="Appearance" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="title==='增加质检形位'" label="质检形位" prop="质检形位">
|
||||
<el-input v-model="Position" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="title==='增加检测项'" label="检测项" prop="检测项">
|
||||
<el-input v-model="Test" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="title==='增加检测项明细'" label="检测项明细" prop="检测项明细">
|
||||
<el-input v-model="Testing" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible=false">取消</el-button>
|
||||
<el-button type="primary" @click="submitAdd()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initReasons, initHandle, initSize, initAppearance, initPosition, initTest, initTesting, addReasons, addHandle, addSize, addAppearance, addPosition,
|
||||
addTest, addTesting, deleteReasons, deleteHandle, deleteSize, deleteAppearance, deletePosition, deleteTest, deleteTesting } from '@/api/Assembly/QualityBasicData'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
tableData4: [],
|
||||
tableData5: [],
|
||||
tableData6: [],
|
||||
Reasons: '',
|
||||
ReasonsValue: '',
|
||||
Handle: '',
|
||||
HandleValue: '',
|
||||
Size: '',
|
||||
Test: '',
|
||||
Testing: '',
|
||||
SizeValue: '',
|
||||
Appearance: '',
|
||||
AppearanceValue: '',
|
||||
Position: '',
|
||||
PositionValue: '',
|
||||
value1: '',
|
||||
dialogFormVisible: false,
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchReasons()
|
||||
this.searchHandle()
|
||||
this.searchSize()
|
||||
this.searchAppearance()
|
||||
this.searchPosition()
|
||||
this.searchTest()
|
||||
},
|
||||
methods: {
|
||||
searchReasons() {
|
||||
initReasons().then(response => {
|
||||
this.tableData = response.data
|
||||
})
|
||||
},
|
||||
searchHandle() {
|
||||
initHandle().then(response => {
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
},
|
||||
searchSize() {
|
||||
initSize().then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
searchAppearance() {
|
||||
initAppearance().then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
searchPosition() {
|
||||
initPosition().then(response => {
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
searchTest() {
|
||||
initTest().then(response => {
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
},
|
||||
searchTesting(row) {
|
||||
this.value1 = row.检测项流水号
|
||||
initTesting(row.检测项流水号).then(response => {
|
||||
this.tableData6 = response.data
|
||||
})
|
||||
},
|
||||
handleAdd1() {
|
||||
this.title = '增加不合格原因'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleAdd2() {
|
||||
this.title = '增加不合格处理'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleAdd3() {
|
||||
this.title = '增加质检尺寸'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleAdd4() {
|
||||
this.title = '增加质检外观'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleAdd5() {
|
||||
this.title = '增加质检形位'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleAdd6() {
|
||||
this.title = '增加检测项'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleAdd7() {
|
||||
this.title = '增加检测项明细'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
submitAdd() {
|
||||
if (this.title === '增加不合格原因') {
|
||||
addReasons(this.Reasons).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchReasons()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else if (this.title === '增加不合格处理') {
|
||||
addHandle(this.Handle).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchHandle()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else if (this.title === '增加质检尺寸') {
|
||||
addSize(this.Size).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchSize()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else if (this.title === '增加质检外观') {
|
||||
addAppearance(this.Appearance).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchAppearance()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else if (this.title === '增加质检形位') {
|
||||
addPosition(this.Position).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchPosition()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else if (this.title === '增加检测项') {
|
||||
addTest(this.Test).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchTest()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else if (this.title === '增加检测项明细') {
|
||||
addTesting(this.value1, this.Testing).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
initTesting(this.value1).then(response => { this.tableData6 = response.data })
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleDelete(row) {
|
||||
console.log(row)
|
||||
if (row.不合格原因) {
|
||||
this.deleteRow(deleteReasons, row.不合格原因, function() { this.searchReasons() })
|
||||
} else if (row.不合格处理) {
|
||||
this.deleteRow(deleteHandle, row.不合格处理, function() { this.searchHandle() })
|
||||
} else if (row.质检尺寸流水号) {
|
||||
this.deleteRow(deleteSize, row.质检尺寸流水号, function() { this.searchSize() })
|
||||
} else if (row.质检外观流水号) {
|
||||
this.deleteRow(deleteAppearance, row.质检外观流水号, function() { this.searchAppearance() })
|
||||
} else if (row.质检形位流水号) {
|
||||
this.deleteRow(deletePosition, row.质检形位流水号, function() { this.searchPosition() })
|
||||
} else if (row.检测项流水号 && !row.检测项明细流水号) {
|
||||
this.deleteRow(deleteTest, row.检测项流水号, function() { this.searchTest() })
|
||||
} else if (row.检测项流水号 && row.检测项明细流水号) {
|
||||
this.deleteRow(deleteTesting, row.检测项明细流水号, function() { initTesting(this.value1).then(response => { this.tableData6 = response.data }) })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
699
src/views/Assembly/QualityInspectionInformationInquiry/index.vue
Normal file
699
src/views/Assembly/QualityInspectionInformationInquiry/index.vue
Normal file
@@ -0,0 +1,699 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件:</span>
|
||||
<el-input v-model="SpareParts" filterable placeholder="请输入零件名称" style="width: 200px" size="small" clearable/>
|
||||
<span>质检类型:</span>
|
||||
<el-select v-model="QualityTypeValue" filterable placeholder="质检类型" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in QualityTypeNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<span class="demonstration">时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<span>质检情况:</span>
|
||||
<el-select v-model="qualityInspectionValue" filterable placeholder="质检情况" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in qualityInspection"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>质检人员:</span>
|
||||
<el-select v-model="personNum" filterable placeholder="质检人员" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="exportExcel()">导出</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
|
||||
<el-table-column align="center" label="禁用情况" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.是否禁用)===0||scope.row.是否禁用===''" type="success" size="small" @click="approvalPass(scope.row)">未禁用</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.是否禁用)===1" type="error" size="small">已禁用</el-tag>
|
||||
</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="160px">
|
||||
<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-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">
|
||||
<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" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.不合格数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格原因" align="center" width="90px">
|
||||
<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="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作时间 ? scope.row.操作时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="形位" fixed="right" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" highlight-current-row size="mini">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="数值">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数值 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="零件数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" plain size="mini" icon="el-icon-search" @click="searchTableDetail(1, scope.row.质检流水号)">形位</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="尺寸" fixed="right" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" highlight-current-row size="mini">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="数值">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数值 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="零件数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" plain size="mini" icon="el-icon-search" @click="searchTableDetail(2, scope.row.质检流水号)">尺寸</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外观" fixed="right" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" highlight-current-row size="mini">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="数值">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数值 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="零件数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" plain size="mini" icon="el-icon-search" @click="searchTableDetail(3, scope.row.质检流水号)">外观</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="viewPicture(scope.row)">查看图片</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 align="center">正在加工零件列表</h3>
|
||||
<el-table :data="tableData10" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="475px">
|
||||
<el-table-column label="机床图号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" width="160px">
|
||||
<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-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" 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="操作" fixed="right" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="viewProcedures(scope.row)">查看工序情况</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 align="center">待加工零件列表</h3>
|
||||
<el-table :data="tableData20" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="475px">
|
||||
<el-table-column label="机床图号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" width="160px">
|
||||
<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-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" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.mes终端编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作工" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="viewProcedures(scope.row)">查看工序情况</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible4" 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="tableData5"
|
||||
style="width: 100%;max-height: 400px;margin-top: 20px"
|
||||
size="mini"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="工序顺序" width="100">
|
||||
<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="工艺要求">
|
||||
<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="130">
|
||||
<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="130">
|
||||
<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>
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="图片" center style="" width="1100px">
|
||||
<viewer>
|
||||
<img v-for="url in urls" :key="url" :src="url" lazy style="width: 1000px;height: 700px">
|
||||
</viewer>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchgroup, selecttable, QualityType, searchPic, searchTableDetail, searchData, searchData1, processingStatus, initPerson, Prohibit, selecttable22 } from '@/api/Assembly/QualityInspectionInformationInquiry'
|
||||
import { readFile } from '@/utils/request'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
urls: [],
|
||||
URL: '',
|
||||
number: '',
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
gridData: [],
|
||||
QualityTypeNumber: [],
|
||||
QualityTypeValue: '',
|
||||
qualityInspectionValue: '',
|
||||
qualityInspection: [
|
||||
{
|
||||
value: 1,
|
||||
label: '合格'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '不合格'
|
||||
}
|
||||
],
|
||||
tableData1: [],
|
||||
tableData10: [],
|
||||
tableData20: [],
|
||||
tableData5: [],
|
||||
SpareParts: '',
|
||||
SparePartsNumber: '',
|
||||
SparePartsName: '',
|
||||
personNum: '',
|
||||
person: [],
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible4: false,
|
||||
loading: false,
|
||||
total: 0, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageCurrent: 1, // 后台获取页
|
||||
total1: 0, // 总条数
|
||||
pageSize1: 10, // 每页显示条数
|
||||
pageCurrent1: 1, // 后台获取页
|
||||
total2: 0, // 总条数
|
||||
pageSize2: 10, // 每页显示条数
|
||||
pageCurrent2: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
this.QualityType()
|
||||
this.fetchData()
|
||||
this.fetchData1()
|
||||
},
|
||||
methods: {
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
QualityType() {
|
||||
QualityType().then(response => {
|
||||
console.log(response.data)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.QualityTypeNumber.push({
|
||||
label: response.data[i].质检类型,
|
||||
value: response.data[i].质检类型代码
|
||||
})
|
||||
}
|
||||
})
|
||||
initPerson().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
approvalPass(row) {
|
||||
this.$confirm('是否禁用?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
Prohibit(row.质检流水号, row.质检类型代码).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.selecttable()
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
exportExcel() {
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
|
||||
if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
|
||||
if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
|
||||
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
|
||||
if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
|
||||
selecttable22(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.check8, this.personNum).then(response => {
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['是否禁用', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工序名称', '质检类型', '检验数量', '不合格数量', '不合格原因', '处理结果', '质检时间', '备注']
|
||||
const filterVal = ['是否禁用', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工艺名称', '质检类型', '数量', '不合格数量', '不合格原因文本', '不合格处理文本', '操作时间', '备注']
|
||||
const list = response.data
|
||||
const data = this.formatJson(filterVal, list)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '质检情况表',
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
searchData(this.pageSize1, this.pageCurrent1).then(response => {
|
||||
this.tableData10 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
fetchData1() {
|
||||
searchData1(this.pageSize2, this.pageCurrent2).then(response => {
|
||||
console.log(response)
|
||||
this.tableData20 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
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].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTableDetail(type, num) {
|
||||
searchTableDetail(type, num).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
console.log(type)
|
||||
},
|
||||
selecttable() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
|
||||
if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
|
||||
if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
|
||||
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
|
||||
if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
|
||||
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.check8, this.personNum, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response.data.rows, 111)
|
||||
this.tableData1 = response.data.rows
|
||||
this.loading = false
|
||||
this.total = response.data.total
|
||||
console.log(this.tableData1)
|
||||
})
|
||||
},
|
||||
viewPicture(row) {
|
||||
this.dialogFormVisible = true
|
||||
console.log(row)
|
||||
searchPic(row.质检流水号).then(response => {
|
||||
console.log(response.data, 222)
|
||||
this.urls = []
|
||||
// this.URL = readFile + response.data[0].文件标识 + '.' + response.data[0].文件后缀
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.urls.push(readFile + response.data[i].文件标识 + '.' + response.data[i].文件后缀)
|
||||
}
|
||||
})
|
||||
},
|
||||
viewProcedures(row) {
|
||||
this.dialogFormVisible4 = true
|
||||
this.SparePartsNumber = row.零件图号
|
||||
this.SparePartsName = row.零件名称
|
||||
processingStatus(row.工艺计划流水号).then(response => {
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.selecttable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.selecttable()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.fetchData()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.fetchData()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
this.fetchData1()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.fetchData1()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
125
src/views/Assembly/ShipmentApproval/index.vue
Normal file
125
src/views/Assembly/ShipmentApproval/index.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="selecttable()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="selecttable">查询</el-button>-->
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
|
||||
<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-column label="注意事项" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.注意事项" style="width:100px;margin-right:3px" size="mini" width="120"/>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.注意事项 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="!scope.row.edit && scope.row.发货状态===1" type="success" size="mini" icon="el-icon-circle-check-outline" @click="scope.row.edit=!scope.row.edit" >确认审批</el-button>
|
||||
<el-button v-else-if="!scope.row.edit && scope.row.发货状态===2" disabled="true" type="danger" size="mini" icon="el-icon-circle-check-outline" >已审批</el-button>
|
||||
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="primary" @click="confirmEdit(scope.row)">确认</el-button>
|
||||
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="danger" @click="cancelEdit(scope.row)">取消</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, selecttable, updatestate } from '@/api/Assembly/ShipmentApproval'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
tableData1: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
selecttable() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
selecttable(this.check2, this.machineNumberValue).then(response => {
|
||||
response.data.map(v => {
|
||||
this.$set(v, 'edit', false)
|
||||
v.原注意事项 = v.注意事项
|
||||
return v
|
||||
})
|
||||
this.tableData1 = response.data
|
||||
this.edit = false
|
||||
console.log(response.data)
|
||||
})
|
||||
},
|
||||
cancelEdit(row) {
|
||||
row.注意事项 = row.原注意事项
|
||||
row.edit = false
|
||||
this.$message('取消修改')
|
||||
},
|
||||
confirmEdit(row) {
|
||||
updatestate(row.机床流水号, 2, row.注意事项).then(response => {
|
||||
this.selecttable()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
170
src/views/Assembly/SparePartsOutStockRecord/index.vue
Normal file
170
src/views/Assembly/SparePartsOutStockRecord/index.vue
Normal file
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="PartDrawingNumber" filterable placeholder="零件图号" style="width: 200px" size="small" clearable/>
|
||||
<span class="demonstration">时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="total=0;pageSize=10; pageCurrent=1;selecttable()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
|
||||
<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-column label="出库时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
: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, searchgroup, selecttable } from '@/api/Assembly/SparePartsOutStockRecord'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PartDrawingNumber: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
startTime_check: '',
|
||||
endTime_check: '',
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
tableData1: [],
|
||||
loading: false,
|
||||
total: null, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageCurrent: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
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].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
selecttable() {
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.PartDrawingNumber !== '' && this.PartDrawingNumber !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
|
||||
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
|
||||
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.PartDrawingNumber, this.startTime_check, this.startTime, this.endTime_check, this.endTime, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.loading = false
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.selecttable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.selecttable()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
477
src/views/Assembly/TypicalAssemblyMaintenance/index.vue
Normal file
477
src/views/Assembly/TypicalAssemblyMaintenance/index.vue
Normal file
@@ -0,0 +1,477 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<span>机床分类:</span>
|
||||
<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>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px" @change="searchGroup()">
|
||||
<el-option
|
||||
v-for="item in machineNumber2"
|
||||
: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 type="primary" size="small" icon="el-icon-tickets" @click="handleAdd">增加</el-button>
|
||||
<el-button type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除</el-button>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<div v-for="(item, key) in dataAll" :key="key" 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
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row, 'form2')">编辑</el-button>
|
||||
<el-button
|
||||
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.序号" 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.工序名称"
|
||||
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"
|
||||
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.质检" size="mini" align="center" @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.工艺工时" size="mini" align="center" @change="update2(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-up"
|
||||
type="primary"
|
||||
@click="upOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-down"
|
||||
type="primary"
|
||||
@click="downOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
type="primary"
|
||||
@click="insertOne(scope.row)"/>
|
||||
<el-button
|
||||
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="form1" :model="form1" 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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SearchMachine, searchDetail, searchProcess, update, submitAdd, submitEdit, insertOne, update2, upOne, downOne, deleteOne,
|
||||
deleteGroup, initmachineType, initprocessNameClass, initProcessName, update1, searchGroup } from '@/api/Assembly/TypicalAssemblyMaintenance'
|
||||
import '@/icon/iconfont.css'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
radio: 0,
|
||||
checked: false,
|
||||
number: '',
|
||||
machineNumberValue1: '',
|
||||
machineNumber2: [],
|
||||
machineTypeValue: '',
|
||||
machineType: [],
|
||||
AssemblyTask: '',
|
||||
Group: '',
|
||||
GroupNumberValue: [],
|
||||
GroupNumberValue1: '',
|
||||
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,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible4: false,
|
||||
dataAll: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
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].机床分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
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].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroup() {
|
||||
this.GroupNumber = []
|
||||
this.GroupNumberValue = []
|
||||
searchGroup(this.machineNumberValue1).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.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.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
update(row) {
|
||||
update(row.装配工序流水号, row.序号, row.工序名称, row.工艺内容及装配具体要求, row.质检).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
update2(row) {
|
||||
update2(row.装配工序流水号, row.工艺工时).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue1 !== '') {
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = '', this.GroupNumberValue1 = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
this.GroupNumberValue1 = ''
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
console.log(row, 1111)
|
||||
this.form2.组件 = (row.组件流水号.split(',')).map(Number)
|
||||
console.log(this.form2.组件)
|
||||
},
|
||||
submitAdd() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue1, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], '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()
|
||||
},
|
||||
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()
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
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 = []
|
||||
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() {
|
||||
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>
|
||||
Reference in New Issue
Block a user