This commit is contained in:
liushuai
2019-05-31 13:39:03 +08:00
35 changed files with 2682 additions and 231 deletions

View File

@@ -0,0 +1,507 @@
<template>
<div class="app-container">
<el-card>
<span style="margin: 5px">领料单编号</span>
<el-input v-model="pickingListNumber" clearable size="small" style="width:200px"/>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchListinfor()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="addListinfor()">创建</el-button>
</el-card>
<el-card>
<el-table v-loading="listLoading0" :data="tableData1" highlight-current-row border style="width: 100%;" size="mini" height="300" @row-click="chooseListinfor">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="领料单编号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
<el-table-column label="领料时间" align="center" min-width="200" >
<template slot-scope="scope">
{{ scope.row.领料时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="创建人" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column v-if="true" label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button size="mini" type="danger" icon="el-icon-delete" @click="dropListinfor(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="PageCurrent0"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize0"
:total="total0"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange0"
@current-change="handleCurrentChange0"/>
</div>
<el-table :data="tableDataPicking" border style="width: 100%;" size="mini" height="300">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="零件图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="来源" align="center" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.是否外购===1">外购</el-tag>
<el-tag v-else>自家</el-tag>
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column v-if="true" label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button size="mini" type="danger" icon="el-icon-delete" @click="dropListdetail(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<!--<span>项目名称:</span>-->
<el-select v-show="false" v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
<el-option
v-for="item in Project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床图号:</span>
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>组号:</span>
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
<el-option
v-for="item in GroupNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPartinfo()">查询</el-button>
</el-card>
<el-card>
<h4>自家备料</h4>
<el-table v-loading="listLoading1" :data="tableDataBasic" border style="width: 100%;" size="mini" height="440">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="项目名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="80">
<template slot-scope="scope" align="center">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope" align="center">
<el-button size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicList(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="PageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize1"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<hr>
<h4>外购备料</h4>
<el-table v-loading="listLoading2" :data="tableDataPurchase" border style="width: 100%;" size="mini" height="440">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="项目名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="物料编码" align="center" min-width="80">
<template slot-scope="scope" align="center">
{{ scope.row.物料编码 + scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope" align="center">
<el-button size="mini" type="primary" icon="el-icon-edit" @click="addPurchaseList(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="PageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize2"
:total="total2"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
</div>
</template>
<script>
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart,
searchList, addList, dropList, searchListDetail, dropListDetailBasic, addBasicList, addPurchaseList } from '@/api/ManufacturingCenter/CreateIntakeList'
import { mapGetters } from 'vuex'
export default {
data() {
return {
listLoading0: false, // 领料单
listLoading1: false, // 自制件
listLoading2: false, // 采购部采购件
PageCurrent0: 1,
PageSize0: 10,
total0: 0,
PageCurrent1: 1,
PageSize1: 10,
total1: 0,
PageCurrent2: 1,
PageSize2: 10,
total2: 0,
ProjectValue: '',
Project: [],
ProjectValue_check: 0,
MachineValue: '',
Machine: [],
MachineValue_check: 0,
GroupNumValue: '',
GroupNum: [],
GroupNumValue_check: 0,
tableData1: [], // 领料单
tableDataPicking: [], // 领料单明细
tableDataBasic: [], // 自制件
tableDataPurchase: [], // 采购部采购件
tableDataBacklog: [], // 滞货件
tableDataHouse: [], // 车间采购件
enableOut: '', // 可出库数量
partPiant: '', // 零件图号
material: '', // 材料
outType: '',
pickingListNumber: null, // 领料单编号
pickingListNumberx: '', // 领料单流水号
picikingPeople: '', // 领料人流水号
partProjectNumber: '', // 项目流水号
partMachineNumber: '', // 机床流水号
partGroupNumber: '', // 分组流水号
receive: '', // 收件信息ID
locatenumber: '', // 货位流水号
materialName: '',
materialNumber: '',
materialType: '',
purchaseDetailNum: '', // 采购合同明细流水号
askPurchaseNumber: '', // 请购单明细流水号
materialLocate: '',
partType: '', // 零件类型
craftplannumber: '' // 工艺计划流水号
}
},
computed: {
...mapGetters([
'id'
])
},
created() {
this.fetchData()
this.searchListinfor()
this.searchPartinfo()
this.searchMachine()
},
methods: {
// 创建领料单
addListinfor() {
this.$confirm('确认创建新的领料单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
addList(this.picikingPeople).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchListinfor()
} else {
this.$message.error('增加失败')
}
})
}).catch(() => {
this.$message('已取消操作')
})
},
// 查询领料单
searchListinfor() {
let check
this.pickingListNumber ? check = 1 : check = 0
this.listLoading0 = true
searchList(this.PageCurrent0, this.PageSize0, check, this.pickingListNumber).then(response => {
this.tableData1 = response.data.rows
this.total0 = response.data.total
this.listLoading0 = false
})
},
// 领料单分页
handleSizeChange0(val) {
this.PageCurrent0 = 1
this.PageSize0 = val
this.searchListinfor()
},
handleCurrentChange0(val) {
this.PageCurrent0 = val
this.searchListinfor()
},
// 选择领料单
chooseListinfor(row) {
this.pickingListNumberx = row.备料领料单流水号
// this.pickingListNumber = row.领料单编号
this.searchListDetailt()
},
// 查询领料单明细
searchListDetailt() {
searchListDetail(this.pickingListNumberx).then(response => {
this.tableDataPicking = response.data
})
},
// 移除
dropListdetail(row) {
this.$confirm('确认移除该零件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
dropListDetailBasic(row.备料领料单明细流水号, row.是否外购, row.工艺计划流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListDetailt()
this.searchPartinfo()
} else {
this.$message.error('数据占用')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 初始化项目,获取人员编号
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
this.picikingPeople = this.id
},
// 查询机床
searchMachine() {
this.MachineValue = ''
this.Machine = []
this.GroupNumValue = ''
this.GroupNum = []
this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
// 查询组号
searchGroupList() {
if (this.MachineValue) {
this.GroupNumValue = ''
this.GroupNum = []
searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
} else {
this.GroupNumValue = ''
this.GroupNum = []
}
},
// 根据项目机床分组查零件/物料
searchPartinfo() {
this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0
this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0
this.searchOwnPart() // 自制件
this.searchPurchasePart() // 采购部采购件
},
// 删除领料单
dropListinfor(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.tableDataPicking.length === 0) {
dropList(row.备料领料单流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListinfor()
} else {
this.$message.error('数据占用')
}
})
} else {
this.$message.error('数据占用')
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 查询自家备料
searchOwnPart() {
this.tableDataBasic = []
this.listLoading1 = true
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataBasic = response.data.rows
this.total1 = response.data.total
this.listLoading1 = false
})
},
// 自制件分页
handleSizeChange1(val) {
this.PageCurrent1 = 1
this.PageSize1 = val
this.searchOwnPart()
},
handleCurrentChange1(val) {
this.PageCurrent1 = val
this.searchOwnPart()
},
// 查询外购备料
searchPurchasePart() {
this.tableDataPurchase = []
this.listLoading2 = true
searchPurchasePart(this.PageCurrent2, this.PageSize2, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataPurchase = response.data.rows
this.listLoading2 = false
this.total2 = response.data.total
})
},
// 采购部采购件分页
handleSizeChange2(val) {
this.PageCurrent2 = 1
this.PageSize2 = val
this.searchPurchasePart()
},
handleCurrentChange2(val) {
this.PageCurrent2 = val
this.searchPurchasePart()
},
// 自家备料领料
addBasicList(row) {
addBasicList(this.pickingListNumberx, row.工艺计划流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListDetailt()
this.searchPartinfo()
} else {
this.$message.error('数据占用')
}
})
},
// 外购备料领料
addPurchaseList(row) {
addPurchaseList(this.pickingListNumberx, row.工艺计划流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListDetailt()
this.searchPartinfo()
} else {
this.$message.error('数据占用')
}
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.el-tag{
margin: 0
}
</style>

View File

@@ -285,6 +285,13 @@
{{ scope.row.机床主管 }}
</template>
</el-table-column>
<el-table-column align="center" label="装配状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.装配状态===null || scope.row.装配状态===0" type="success" size="small">未装配</el-tag>
<el-tag v-else-if="scope.row.装配状态===1" type="danger" size="small" >装配中</el-tag>
<el-tag v-else type="info" size="small" >装配完成</el-tag>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
@@ -329,9 +336,11 @@
{{ scope.row.组件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="组件介绍">
<el-table-column align="center" label="装配状态">
<template slot-scope="scope">
{{ scope.row.组件介绍 }}
<el-tag v-if="scope.row.组件是否完成===null || scope.row.组件是否完成===0" type="success" size="small">未装配</el-tag>
<el-tag v-else-if="scope.row.组件是否完成===1" type="danger" size="small" >装配中</el-tag>
<el-tag v-else type="info" size="small" >装配完成</el-tag>
</template>
</el-table-column>
</el-table>

View File

@@ -5,14 +5,13 @@
<span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<!--<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>-->
<!--<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">自家备料出库</el-button>-->
<!--<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>-->
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit2()">自家备料确认</el-button>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange2">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="零件名称" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
@@ -28,25 +27,6 @@
{{ scope.row.工艺要求 }}
</template>
</el-table-column>
<el-table-column prop="request" label="重量(kg)" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.重量" size="mini"/>
</template>
</el-table-column>
<el-table-column prop="request" label="单价(元)" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.单价" size="mini"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="150px" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleChange1(scope.row)">出库</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
@@ -64,14 +44,11 @@
<span>零件图号:</span>
<el-input v-model="partName2" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="total2=0;pageSize2=10; pageCurrent2=1;searchTable2()">查询</el-button>
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">外购备料出库</el-button>
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">外购备料确认</el-button>
</el-card>
<el-card>
<el-table v-loading="loading2" :data="tableData2" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="零件名称" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
@@ -115,11 +92,12 @@
</template>
<script>
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2, change3 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { mapGetters } from 'vuex'
export default {
data() {
return {
arrest2: [],
editTime: '',
bianliang1: [],
bianliang2: [],
@@ -153,6 +131,25 @@ export default {
this.searchTable2()
},
methods: {
handleSelectionChange2(val) {
this.arrest2 = val
},
edit2() {
this.bianliang1 = []
this.bianliang2 = []
if (this.arrest2.length === 0) {
this.$message.warning('请选择零件')
} else {
for (let i = 0; i < this.arrest2.length; i++) {
this.bianliang1.push(this.arrest2[i].工艺计划流水号)
this.bianliang2.push(this.arrest2[i].工序流水号)
}
change3(this.bianliang2, '0000', this.bianliang1).then(response => {
this.searchTable()
})
}
},
// ////////////////////////////////////////////////////////////////////////////0530新↑
// 查询表格数据
searchTable() {
this.loading = true
@@ -195,25 +192,19 @@ export default {
return i
}
},
// 自家备料出库
// 自家备料确认
handleChange1(row) {
if (row.重量 === '' || row.重量 === null) {
this.$message.error('请输入重量')
} else if (row.单价 === '' || row.单价 === null) {
this.$message.error('请输入单价')
} else {
var date = new Date()
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
this.editTime = date.getFullYear() + '-' + month + '-' + day
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
handlechange(row.工序流水号, '0000').then(response => {
handlechange2(row.工序流水号, this.form.完成时间)
})
}).then(response => {
this.searchTable()
var date = new Date()
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
this.editTime = date.getFullYear() + '-' + month + '-' + day
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
handlechange(row.工序流水号, '0000').then(response => {
handlechange2(row.工序流水号, this.form.完成时间)
})
}
}).then(response => {
this.searchTable()
})
},
handleSelectionChange(val) {
this.arrest = val

View File

@@ -76,6 +76,11 @@
{{ 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" style="margin-top: 10px;">
<el-pagination

View File

@@ -10,14 +10,13 @@
:value="item.value"/>
</el-select>
<span>零件图号:</span>
<el-select v-model="partNumValue" filterable placeholder="零件图号" style="margin-right: 10px" size="small" clearable @clear="returnDate = ''">
<el-select v-model="partNumValue" filterable placeholder="零件图号" style="margin-right: 10px" size="small" @change="tableData1=[];tableData2=[];returnDate = '';searchData();">
<el-option
v-for="item in partNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchData()">查询</el-button>
<span>打回时间:</span>
<el-date-picker v-model="returnDate" :clearable="false" type="datetime" placeholder="打回时间" size="small" readonly/>
</el-card>
@@ -219,15 +218,11 @@ export default {
tableRowClassName2({ row }) {
for (let i = 0; i < this.tableData1.length; i++) {
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
if (this.tableData1[i].工序流水号 === row.工序流水号 && this.tableData1[i].工艺编号 !== null) {
if (this.tableData1[i].工序顺序 === row.工序顺序) {
if (this.tableData1[i].工艺编号 !== row.工艺编号 || this.tableData1[i].工艺要求 !== row.工艺要求 || this.tableData1[i].工艺难度等级 !== row.工艺难度等级) {
return 'change'
} else {
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
return 'change'
} else {
return ''
}
return ''
}
}
}
@@ -235,15 +230,11 @@ export default {
tableRowClassName1({ row }) {
for (let i = 0; i < this.tableData2.length; i++) {
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
if (this.tableData2[i].工序流水号 === row.工序流水号 && this.tableData2[i].工艺编号 !== null) {
if (this.tableData2[i].工序顺序 === row.工序顺序) {
if (this.tableData2[i].工艺编号 !== row.工艺编号 || this.tableData2[i].工艺要求 !== row.工艺要求 || this.tableData2[i].工艺难度等级 !== row.工艺难度等级) {
return 'change'
} else {
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
return 'change'
} else {
return ''
}
return ''
}
}
}

View File

@@ -1,6 +1,10 @@
<template>
<div class="app-container">
<el-card>
<el-radio-group v-model="radio" size="small" style="margin: 10px;" @change="checked = false;partNum=[];partNumValue = '';typeValue = '';partName = '';material = '';materialName = '';prepareMateriel = '';spec = '';batchNum = '';searchPartsByMachineGroup();">
<el-radio v-model="radio" :label="1">未编制</el-radio>
<el-radio v-model="radio" :label="2">已编制</el-radio>
</el-radio-group>
<span>工艺员:</span>
<el-select v-model="CraftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="clearDetail();">
<el-option
@@ -9,22 +13,28 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>零件号:</span>
<!--<span>零件号:</span>
<el-input v-model="partNumber" clearable placeholder="零件号" size="small" style="width:200px">
<el-button slot="append" icon="el-icon-right" @click="searchParts();partNumValue=''"/>
</el-input>-->
<span>机床-分组 零件号:</span>
<el-input v-model="machine_Group_part" clearable placeholder="例:机床号-组号 或 零件号" size="small" style="width:260px">
<el-button slot="append" icon="el-icon-right" @click="searchPartsByMachineGroup();partNumValue=''"/>
</el-input>
<el-select v-model="partNumValue" placeholder="选择零件编制工艺定额" size="small" @clear="clearDetail" @change="searchDetail()">
<el-option
v-for="item in partNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<b style="float: left">{{ item.label }}</b>
<b style="float: right; color: #8492a6; font-size: 13px">-{{ item.group }}</b>
<b style="float: right; color: #8492a6; font-size: 13px">&nbsp;&nbsp;{{ item.machine }}</b>
</el-option>
</el-select>
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整
</el-button>
<el-button v-show="false" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式
</el-button>
<!--<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整</el-button>-->
<!--<el-button v-show="false" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式</el-button>-->
<div v-show="isShow">
<span>种类:</span>
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
@@ -42,7 +52,7 @@
</div>
<div>
<el-row>
<el-col :span="4">
<el-col style="width:210px">
<span>物料类型:</span>
<el-select v-model="materielValue" size="small" style="margin-top: 20px;width:120px" placeholder="物料类型" @change="clear()">
<el-option
@@ -160,6 +170,7 @@
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-tickets" @click="saveApprove">保存
</el-button>
</el-button-group>
<el-button v-if="!isShow1" type="warning" size="small" icon="el-icon-tickets" @click="saveCompiled">记录修改备注</el-button>
</el-row>
<div style="margin-top: 5px;margin-bottom: 10px;display: inline-block"><span>符号</span>
<el-tag type="info"></el-tag>
@@ -203,21 +214,10 @@
@change="handleChange(scope.row)"/>
</template>
</el-table-column>
<el-table-column v-if="false" prop="name" label="工艺名称" width="130" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.工艺名称"
:disabled="disabled"
readonly
style="width:100%"
@dblclick.native="tableSearch(scope.$index)"/>
</template>
</el-table-column>
<el-table-column prop="hard" label="难度等级" width="110" align="center">
<template slot-scope="scope">
<el-select
v-model="scope.row.工艺难度等级"
:disabled="disabled"
clearable
placeholder=""
@change="hardEdit(scope.row)">
@@ -227,17 +227,6 @@
</el-select>
</template>
</el-table-column>
<el-table-column v-if="false" prop="request" label="工艺要求" align="center" min-width="350">
<template slot-scope="scope">
<el-input
v-model="scope.row.工艺要求"
:rows="1"
:disabled="disabled"
type="textarea"
@dblclick.native="tableSearch(scope.$index)"
@change="requestEdit(scope.row)"/>
</template>
</el-table-column>
<el-table-column prop="request" label="工艺要求" align="center" min-width="350">
<template slot-scope="scope">
<el-autocomplete
@@ -264,22 +253,18 @@
<template slot-scope="scope">
<div>
<el-button
:disabled="disabled"
icon="el-icon-arrow-up"
type="primary"
@click="upOne(scope.row)"/>
<el-button
:disabled="disabled"
icon="el-icon-arrow-down"
type="primary"
@click="downOne(scope.row)"/>
<el-button
:disabled="disabled"
icon="el-icon-circle-plus-outline"
type="primary"
@click="insertOne(scope.row)"/>
<el-button
:disabled="disabled"
icon="el-icon-delete"
type="danger"
@click="deleteOne(scope.row)"/>
@@ -543,7 +528,10 @@ import {
singleChange,
readyChange,
TableAddLi1,
TableAddLi
TableAddLi,
getPartnames3,
getPartnames4,
modifyRemark
} from '@/api/ManufacturingCenter/ProcessQuotaEstablishment'
import elInput from 'element-ui/packages/input'
import { mapGetters } from 'vuex'
@@ -554,6 +542,7 @@ export default {
},
data() {
return {
machine_Group_part: '',
partNumber: '',
options: [],
weight: '',
@@ -710,13 +699,33 @@ export default {
'id'
])
},
created() {
mounted() {
this.fetchData()
this.initPerson()
this.getList()
this.openCascader()
},
methods: {
// 保存已编制
saveCompiled() {
if (this.partNumValue) {
this.$prompt('请输入工艺修改备注', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
console.log(value, '日期', this.id, this.partNumValue)
modifyRemark(this.id, value, this.partNumValue)
this.$message.success('记录成功')
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
} else {
this.$message.warning('请选择零件')
}
},
blurRequest(row) {
selectRequest(row.工序流水号, row.工艺计划流水号, row.工艺编号, row.工序顺序, row.工艺要求).then(response => {
if (response.data[0].result === '1') {
@@ -1073,6 +1082,43 @@ export default {
this.tableMaterial = response.data.rows
})
},
// 根据机床号-组号查询零件(包含借用件)
searchPartsByMachineGroup() {
this.tableData = []
this.partNum = []
if (this.radio === 1) { // 未编制
this.disabled = false
this.isShow1 = true
this.isShow2 = false
this.checked1 = true
getPartnames3(this.CraftmenValue, this.machine_Group_part).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.partNum.push({
label: response.data[i].零件图号,
value: response.data[i].工艺计划流水号,
machine: response.data[i].机床图号,
group: response.data[i].组号
})
}
})
} else { // 已编制
this.isShow = true
this.isShow1 = false
this.isShow2 = true
this.disabled = true
this.checked1 = false
getPartnames4(this.CraftmenValue, this.machine_Group_part).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.partNum.push({
label: response.data[i].零件图号,
value: response.data[i].工艺计划流水号,
machine: response.data[i].机床图号,
group: response.data[i].组号
})
}
})
}
},
searchParts() { // 根据条件查零件号
this.tableData = []
this.partNum = []
@@ -1457,6 +1503,7 @@ export default {
this.spec = ''
this.newNum = ''
this.searchParts()
this.searchPartsByMachineGroup()
this.$message.success('保存成功')
})
}

View File

@@ -0,0 +1,169 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<el-col style="width: 330px">
<span style="margin-left: 10px">原材料名称:</span>
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="small" clearable/>
</el-col>
<el-col style="width: 200px">
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageCurrent=1;searchTableData()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
</el-col>
</el-row>
</el-card>
<el-card style="margin-top: 15px">
<el-table :data="tableData" style="width: 100%;min-height: 500px" height="500" size="mini" highlight-current-row border>
<el-table-column align="center" label="原材料名称">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<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, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row>
<el-form-item label="原材料名称" prop="RawMaterialName">
<el-input v-model="form.RawMaterialName" placeholder="原材料名称" size="small" clearable/>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel('form')">取消</el-button>
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchTableData, addData, editData, deleteCategory } from '@/api/ManufacturingCenter/RawMaterialsMaintenance'
export default {
data() {
return {
RawMaterialNumber: '',
RawMaterialName: '',
param: 0,
tableData: [],
pageCurrent: 1,
pageSize: 10,
total: null,
dialogFormVisible: false,
title: '',
form: {
RawMaterialName: ''
},
rules: {
RawMaterialName: [{ required: true, message: '请输入物料名称', trigger: 'blur' }]
}
}
},
created() {
this.searchTableData()
},
methods: {
// 获取原材料
searchTableData() {
searchTableData(this.RawMaterialName, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = parseInt(response.data.total)
})
},
// 增加
handleAdd() {
this.addForm('form', [this.dialogFormVisible = true, this.title = '增加'])
},
// 提交增加
submitAdd() {
this.addTable(addData, [this.form.RawMaterialName], 'form', function() {
this.dialogFormVisible = false
this.pageCurrent = 1
this.searchTableData()
})
},
// 编辑
handleEdit(row) {
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible = true])
this.form.RawMaterialName = row.原材料名称
this.RawMaterialNumber = row.原材料流水号
},
// 提交编辑
submitEdit() {
this.editTable(editData, [this.RawMaterialNumber, this.form.RawMaterialName], 'form', function() {
this.searchTableData()
this.dialogFormVisible = false
})
},
// 取消
cancel() {
this.dialogFormVisible = false
},
handleDelete(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteCategory(row.原材料流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
if (this.tableData && this.tableData.length === 1 && this.pageCurrent > 1) { // 判断删除的是否是最后一页最后一行,如果是且不是第一页,页数减一
this.pageCurrent--
}
this.searchTableData()
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTableData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTableData()
}
}
}
</script>
<style scoped>
span {
margin: 10px 0px 10px 10px;
}
.el-select{
width:190px
}
.el-input{
width:190px
}
</style>

View File

@@ -0,0 +1,294 @@
<template>
<div>
<el-card>
<el-row>
<span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<!--<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>-->
<!--<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">自家备料确认</el-button>-->
<!--<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>-->
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="零件名称" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" width="240px">
<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="重量(kg)" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.重量" size="mini"/>
</template>
</el-table-column>
<el-table-column label="单价(元)" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.单价" size="mini"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="150px" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleChange1(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>
<span>零件图号:</span>
<el-input v-model="partName2" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="total2=0;pageSize2=10; pageCurrent2=1;searchTable2()">查询</el-button>
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">外购备料确认</el-button>
</el-card>
<el-card>
<el-table v-loading="loading2" :data="tableData2" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table-column label="零件名称" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" width="240px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="重量" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.重量1 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注1 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading2"
: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>
</div>
</template>
<script>
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { mapGetters } from 'vuex'
export default {
data() {
return {
editTime: '',
bianliang1: [],
bianliang2: [],
num: 0,
arrest: [],
all: false,
partName: '',
loading: false,
tableData: [], // 表格数据
total: null, // 总条数
pageSize: 10, // 每页显示条数
pageCurrent: 1, // 后台获取页
loading2: false,
partName2: '',
tableData2: [], // 表格数据
total2: null, // 总条数
pageSize2: 10, // 每页显示条数
pageCurrent2: 1 // 后台获取页
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id'
])
},
created() {
this.searchTable()
this.searchTable2()
},
methods: {
// 查询表格数据
searchTable() {
this.loading = true
this.tableData = []
this.Data = []
if (this.partName !== '' && this.partName !== null) {
this.partNamecheck = true
} else {
this.partNamecheck = false
}
searchtable(this.partNamecheck, this.partName, !this.all, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
this.Data = response.data.rows
this.total = response.data.total
}
}).then(() => {
for (let i = 0; i < this.Data.length; i++) {
searchtable2(this.Data[i].工艺计划流水号).then(response => {
this.tableData.push({
工艺计划流水号: this.Data[i].工艺计划流水号,
零件名称: this.Data[i].零件名称,
零件图号: this.Data[i].零件图号,
备料到货: this.Data[i].备料到货,
工艺要求: response.data[0].工艺要求,
工序流水号: response.data[0].工序流水号,
重量: response.data[0].重量,
单价: 0
})
})
this.loading = false
}
})
},
zeroFill(i) {
if (i >= 0 && i <= 9) {
return '0' + i
} else {
return i
}
},
// 自家备料确认
handleChange1(row) {
if (row.重量 === '' || row.重量 === null) {
this.$message.error('请输入重量')
} else if (row.单价 === '' || row.单价 === null) {
this.$message.error('请输入单价')
} else {
var date = new Date()
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
this.editTime = date.getFullYear() + '-' + month + '-' + day
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
handlechange(row.工序流水号, '0000').then(response => {
handlechange2(row.工序流水号, this.form.完成时间)
})
}).then(response => {
this.searchTable()
})
}
},
handleSelectionChange(val) {
this.arrest = val
},
searchTable2() {
this.loading2 = true
this.tableData2 = []
this.Data2 = []
if (this.partName2 !== '' && this.partName2 !== null) {
this.partNamecheck2 = 1
} else {
this.partNamecheck2 = 0
}
searchtable3(this.partNamecheck2, this.partName2, this.pageCurrent2, this.pageSize2).then(response => {
if (response.data.total === 0) {
this.loading2 = false
} else {
this.Data2 = response.data.rows
this.total2 = response.data.total
}
}).then(() => {
for (let i = 0; i < this.Data2.length; i++) {
searchtable2(this.Data2[i].工艺计划流水号).then(response => {
this.tableData2.push({
工艺计划流水号: this.Data2[i].工艺计划流水号,
零件名称: this.Data2[i].零件名称,
零件图号: this.Data2[i].零件图号,
重量1: this.Data2[i].重量1,
单价: this.Data2[i].单价,
备注1: this.Data2[i].备注1,
工序流水号: response.data[0].工序流水号
})
})
this.loading2 = false
}
})
},
edit() {
this.bianliang1 = []
this.bianliang2 = []
if (this.arrest.length === 0) {
this.$message.warning('请选择零件')
} else {
for (let i = 0; i < this.arrest.length; i++) {
this.bianliang1.push(this.arrest[i].工艺计划流水号)
this.bianliang2.push(this.arrest[i].工序流水号)
}
change2(this.bianliang2, '0000', this.bianliang1).then(response => {
this.searchTable2()
})
}
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
},
handleSizeChange2(val) {
this.pageCurrent2 = 1
this.pageSize2 = val
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,130 @@
<template>
<div class="app-container">
<el-card style="margin-top: 5px">
<el-row>
<el-col :span="7">
<span>原材料名称:</span>
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="mini" clearable style="width: 120px"/>
<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 10px" @click="pageCurrent=1;searchTableData()">查询</el-button>
<el-table :data="tableData" style="margin-top: 15px;width: 100%" height="500" size="mini" border @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column align="center" label="原材料名称">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="16" style="margin-left: 20px">
<span>原材料名称:</span>
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="mini" clearable style="width: 120px"/>
<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 10px" @click="pageCurrent=1;searchTableData()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="mini" @click="handleAdd()">增加</el-button>
<el-table :data="tableData" style="margin-top: 15px;width: 100%" height="500" size="mini" highlight-current-row border>
<el-table-column align="center" label="原材料名称">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 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-col>
</el-row>
<el-row style="margin-top: 10px">
<el-table :data="tableData" style="width: 100%" height="500" size="mini" highlight-current-row border>
<el-table-column align="center" label="原材料名称">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 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-row>
</el-card>
</div>
</template>
<script>
import { searchTableData } from '@/api/ManufacturingCenter/SparePartsPurchase'
export default {
data() {
return {
RawMaterialNumber: '',
RawMaterialName: '',
param: 0,
tableData: [],
pageCurrent: 1,
pageSize: 10,
total: null,
dialogFormVisible: false,
title: '',
form: {
RawMaterialName: ''
},
rules: {
RawMaterialName: [{ required: true, message: '请输入物料名称', trigger: 'blur' }]
}
}
},
created() {
this.searchTableData()
},
methods: {
// 获取原材料
searchTableData() {
searchTableData(this.RawMaterialName, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = parseInt(response.data.total)
})
},
// tabledata分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTableData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTableData()
},
// 多选
handleSelectionChange(val) {
this.materielGroup = []
for (let i = 0; i < val.length; i++) {
this.materielGroup.push(val[i].物料流水号)
}
}
}
}
</script>
<style scoped>
span {
margin: 10px 0px 10px 10px;
}
.el-select{
width:190px
}
.el-input{
width:190px
}
</style>

View File

@@ -50,28 +50,28 @@
<el-table
v-loading="loading0"
:data="tableData"
style="width: 100%;max-height: 600px"
height="600"
style="width: 100%;max-height: 610px"
height="610"
size="mini"
highlight-current-row
border>
<el-table-column align="center" label="序号" type="index" width="60px"/>
<el-table-column align="center" label="机床图号" width="170px">
<el-table-column align="center" label="序号" type="index" width="50px"/>
<el-table-column align="center" label="机床图号" width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" width="140px">
<el-table-column align="center" label="组号" width="60px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件图号" width="200px">
<el-table-column align="center" label="零件图号" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称" width="180px">
<el-table-column align="center" label="零件名称" width="100px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
@@ -81,17 +81,17 @@
{{ scope.row.投产总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="投产时间" width="130px">
<el-table-column align="center" label="投产时间" width="100px">
<template slot-scope="scope">
{{ scope.row.传递时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件状态" width="750px">
<el-table-column align="center" label="零件状态" min-width="960px">
<template slot-scope="scope">
<el-steps :active="scope.row.考核状态" finish-status="success" simple>
<el-steps id="StatusQuery" :active="scope.row.考核状态" finish-status="success" simple>
<el-step title="投产" />
<el-step title="工艺" />
<el-step title="定额" />
<el-step title="工艺定额" />
<!--<el-step title="定额" />-->
<el-step title="平衡" />
<el-step title="完成" />
<el-step title="入库" />
@@ -491,3 +491,8 @@ export default {
margin: 10px 0 10px 10px;
}
</style>
<style>
#StatusQuery {
padding: 8px 30px;
}
</style>