This commit is contained in:
liushuai
2019-02-27 19:26:33 +08:00
9 changed files with 365 additions and 33 deletions

View File

@@ -127,8 +127,8 @@ export function discharge(a) {
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '车间生产管理工艺_新排产算法_工序应完成时间_平均算法', name: '车间生产管理_能力平衡_循环执行',
param: '工艺计划流水号=' + a + '=int' param: '工艺计划流水号=' + a
} }
}) })
} }

View File

@@ -0,0 +1,54 @@
import request from '@/utils/request'
export function getProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改'
}
})
}
export function getCustomerName() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改'
}
})
}
export function getToolNum() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改'
}
})
}
export function searchtable(num1, num2, num3, num4, num5, num6, num7, num8, num9, num10, num11, num12, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '项目计划管理_项目总计划_查询数据',
param: `项目流水号_check=` + num1 + '&项目流水号=' + num2 + '&机床流水号_check=' + num3 + '&@机床流水号=' + num4 + '&客户名称_check=' + num5 + '&客户名称=' + num6 + '&签订日期_check=' + num7 + '&签订日期开始时间=' + num8 + '&签订日期结束时间=' + num9 + '&交货期_check=' + num10 + '&交货期开始时间=' + num11 + '&交货期结束时间=' + num12,
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function searchtable2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改'
}
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1551162791632" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1213" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M792.9 482.2H405.8c-11.4 0-21.2 9.8-21.2 21.2 0 11.4 9.8 21.2 21.2 21.2h387.1c11.4 0 21.2-9.8 21.2-21.2 0-13-9.8-21.2-21.2-21.2z m0 178.1H405.8c-11.4 0-21.2 9.8-21.2 21.2s9.8 21.2 21.2 21.2h387.1c11.4 0 21.2-9.8 21.2-21.2s-9.8-21.2-21.2-21.2zM904 248.7H626.3l-4.9-13.1c-32.7-91.5-96.4-114.3-143.7-116H118.4c-31 0-55.5 24.5-55.5 53.9v681.1c0 29.4 24.5 53.9 55.5 53.9H904c31 0 55.5-24.5 55.5-53.9v-552c0-29.4-24.5-53.9-55.5-53.9z m-785.6-50.6c0-42.5 14.7-35.9 76.8-35.9h222.1c94.7 0 119.2 21.2 137.2 52.3l13.1 32.7H118.4v-49.1z m788.8 597.7c0 62.1-21.2 63.7-73.5 63.7H191.9c-63.7 0-73.5-4.9-73.5-73.5V299.3h728.4c68.6 0 60.4 26.1 60.4 73.5v423z m-699-329.9h68.6v68.6h-68.6v-68.6z m0 181.3h68.6v68.6h-68.6v-68.6z m0 0" p-id="1214"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -5,14 +5,11 @@
<el-input v-model="Partpaint" clearable size="small" style="width:200px" /> <el-input v-model="Partpaint" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getCraftNumber()">查询</el-button> <el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getCraftNumber()">查询</el-button>
<el-button size="small" type="danger" icon="el-icon-remove-outline" style="margin: 0 0 0 10px" @click="Empty()">清空</el-button> <el-button size="small" type="danger" icon="el-icon-remove-outline" style="margin: 0 0 0 10px" @click="Empty()">清空</el-button>
<el-button type="primary" size="small" class="el-icon-success" style="margin: 0 0 0 10px" @click="Innumber">入库</el-button>
</el-card> </el-card>
<el-card> <el-card>
<el-table <el-table v-loading="listLoading" :data="tableData" border size="mini" style="width: 100%" height="650px">
v-loading="listLoading"
:data="tableData"
border
size="mini"
style="width: 100%;height: 650px" >
<el-table-column <el-table-column
label="序号" label="序号"
align="center" align="center"
@@ -33,7 +30,6 @@
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划数量" align="center" min-width="100"> <el-table-column label="计划数量" align="center" min-width="100">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-input v-model="tableData[scope.$index].plannumber" readonly size="small"/> <el-input v-model="tableData[scope.$index].plannumber" readonly size="small"/>
@@ -71,9 +67,8 @@
<el-input v-model="tableData[scope.$index].note" clearable size="small"/> <el-input v-model="tableData[scope.$index].note" clearable size="small"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="150"> <el-table-column label="操作" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button>
<el-button <el-button
:disabled="scope.row.是否禁用" :disabled="scope.row.是否禁用"
size="mini" size="mini"
@@ -82,10 +77,9 @@
@click="handleDelete(scope.$index, scope.row)">移除</el-button> @click="handleDelete(scope.$index, scope.row)">移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</div> </div>
</template> </template>
@@ -188,17 +182,21 @@ export default {
}, },
// 扫描查询 // 扫描查询
getscantable() { getscantable() {
if (this.partNumber === '') { if (this.partNumber === '' || this.partNumber === null) {
this.$message.error('请输入零件号') this.$message.error('请输入零件号')
} else { } else {
this.listLoading = true this.listLoading = true
searchTable(this.partNumber).then(response => { searchTable(this.partNumber).then(response => {
if (response.data.length === 0) { if (response.data.length === 0) {
this.listLoading = false this.listLoading = false
this.$message.warning('无此零件') this.$message.warning('该零件未加工完成')
} else if (response.data[0].剩余数量 === 0) { } else if (response.data[0].考核状态 === 8) {
this.$message.warning('该零件已入库完毕') this.listLoading = false
} else { this.$message.warning('该零件已入库')
} else if (response.data[0].考核状态 === 9) {
this.listLoading = false
this.$message.warning('该零件已出库')
} else if (response.data[0].考核状态 === 7) {
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) { if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {
this.ace = this.ace + 1 this.ace = this.ace + 1

View File

@@ -3,7 +3,7 @@
<el-card> <el-card>
<span>工位号:</span> <span>工位号:</span>
<el-select v-model="MachineValue" size="small" filterable placeholder="工位号" style="width: 180px;"> <el-select v-model="MachineValue" size="small" filterable placeholder="工位号" style="width: 180px;" @change="searchTable()">
<el-option <el-option
v-for="item in Machine" v-for="item in Machine"
:key="item.value" :key="item.value"
@@ -129,6 +129,11 @@ export default {
total: 0 total: 0
} }
}, },
watch: {
MachineValue(val) {
this.searchTable()
}
},
created() { created() {
this.Jurisdiction() this.Jurisdiction()
this.fetchData() this.fetchData()
@@ -145,6 +150,8 @@ export default {
value: response.data[i].MES终端号 value: response.data[i].MES终端号
}) })
} }
}).then(() => {
this.MachineValue = this.Machine[0].value
}) })
}, },
searchTable() { searchTable() {

View File

@@ -266,7 +266,7 @@
<el-dialog :visible.sync="dialogFormVisible2" title="工艺名称、工艺要求选择" center width="400px"> <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 ref="form2" :model="form2" label-position="left" label-width="125px" class="demo-ruleForm">
<el-form-item label="工艺名称分类"> <el-form-item label="工艺名称分类">
<el-select v-model="processNameClassValue" placeholder="分类" size="small" @change="cChange()"> <el-select v-model="processNameClassValue" filterable placeholder="分类" size="small" @change="cChange()">
<el-option <el-option
v-for="item in processNameClass" v-for="item in processNameClass"
:key="item.value" :key="item.value"
@@ -275,7 +275,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工艺名称"> <el-form-item label="工艺名称">
<el-select v-model="processNameValue" placeholder="名称" size="small" @change="nChange()"> <el-select v-model="processNameValue" filterable placeholder="名称" size="small" @change="nChange()">
<el-option <el-option
v-for="item in processName" v-for="item in processName"
:key="item.value" :key="item.value"

View File

@@ -32,7 +32,8 @@
<el-table <el-table
ref="multipleTable" ref="multipleTable"
:data="tableData" :data="tableData"
style="width: 100%;height: 550px;" style="width: 100%;"
height="580"
highlight-current-row highlight-current-row
border border
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">

View File

@@ -621,6 +621,7 @@ export default {
directives: { elDragDialog }, directives: { elDragDialog },
data() { data() {
return { return {
bianliang1: [],
count: 0, count: 0,
是否扫描: false, 是否扫描: false,
dataX1: [], // 图表1横坐标 dataX1: [], // 图表1横坐标
@@ -1437,19 +1438,15 @@ export default {
}, },
// 虚拟排产 // 虚拟排产
Discharge() { Discharge() {
this.result1 = 0
for (let i = 0; i < this.tableData1.length; i++) { for (let i = 0; i < this.tableData1.length; i++) {
discharge(this.tableData1[i].工艺计划流水号).then(response => { this.bianliang1.push(this.tableData1[i].工艺计划流水号)
this.result1 += parseInt(response.data[0].result)
if (this.result1 === this.tableData1.length) {
this.result1 = 0
this.total1 = 0
this.pageSize1 = 10
this.pageList1 = 1
this.Selection1()
}
})
} }
discharge(this.bianliang1).then(response => {
this.total1 = 0
this.pageSize1 = 10
this.pageList1 = 1
this.Selection1()
})
}, },
// 4.1 确定零件计划 // 4.1 确定零件计划
Plan() { Plan() {

View File

@@ -0,0 +1,274 @@
<template>
<div>
<el-card>
<el-row>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="项目名称" @change="typeChange()">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床名称:</span>
<el-select v-model="toolNumValue" clearable filterable size="small" style="margin-bottom:10px;width: 220px" placeholder="机床名称">
<el-option
v-for="item in toolNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>客户名称:</span>
<el-select v-model="CustomerNameValue" clearable filterable size="small" style="margin-bottom:10px;width: 220px" placeholder="客户名称">
<el-option
v-for="item in CustomerName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-row>
<el-row>
<span>签订日期:</span>
<el-date-picker v-model="time_SignStart" size="small" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>~
<el-date-picker v-model="time_SignFinish" size="small" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>
<span>交货期:</span>
<el-date-picker v-model="time_deliveryStart" size="small" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>~
<el-date-picker v-model="time_deliveryFinish" size="small" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>
<el-button size="small" icon="el-icon-search" 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
type="selection"
width="55"
align="center"/>
<el-table-column min-width="300px" label="项目编号" align="center" width="240px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.项目编号" class="edit-input" size="small"/>
</template>
<span v-else>{{ scope.row.项目编号 }}</span>
</template>
</el-table-column>
<!--<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="100px">
<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" 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">
<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="操作" width="300px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="success" size="small" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">保存</el-button>
<el-button v-else type="primary" size="small" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit">编辑</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>
</div>
</template>
<script>
import { getProject, getCustomerName, getToolNum, searchtable } from '@/api/ManufacturingCenter/ProjectPlanningManagement'
export default {
data() {
return {
time_SignStart: '', // 签订开始
time_SignFinish: '', // 签订结束
time_deliveryStart: '', // 交货开始
time_deliveryFinish: '', // 交货结束
projectValue: '',
project: [], // 项目名称
CustomerNameValue: '',
CustomerName: [], // 客户名称
toolNumValue: '',
toolNum: [], // 机床
loading: false,
tableData: [], // 表格数据
total: null, // 总条数
pageSize: 10, // 每页显示条数
pageCurrent: 1 // 后台获取页
}
},
created() {
this.fetchData()
this.getCustomerName()
this.searchTable()
},
methods: {
cancelEdit(row) {
row.title = row.originalTitle
row.edit = false
this.$message({
message: 'The title has been restored to the original value',
type: 'warning'
})
},
confirmEdit(row) {
row.edit = false
row.originalTitle = row.title
this.$message({
message: 'The title has been edited',
type: 'success'
})
},
fetchData() {
this.projectValue = ''
this.project = []
getProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.project.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
},
getCustomerName() {
this.CustomerNameValue = ''
this.CustomerName = []
getCustomerName().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.CustomerName.push({
label: response.data[i].客户名称,
value: response.data[i].客户流水号
})
}
})
},
typeChange() {
this.toolNumValue = ''
this.toolNum = []
getToolNum().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.toolNum.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
// 查询表格数据
searchTable() {
this.loading = true
this.tableData = []
if (this.projectValue !== '' && this.projectValue !== null) { this.projectValuecheck = 1 } else { this.projectValuecheck = 0 }
if (this.CustomerNameValue !== '' && this.CustomerNameValue !== null) { this.CustomerNameValuecheck = 1 } else { this.CustomerNameValuecheck = 0 }
if (this.toolNumValue !== '' && this.toolNumValue !== null) { this.toolNumValuecheck = 1 } else { this.toolNumValuecheck = 0 }
if (this.time_SignStart !== '' && this.time_SignStart !== null && this.time_SignFinish !== '' && this.time_SignFinish) { this.time_Signcheck = 1 } else { this.time_Signcheck = 0 }
if (this.time_deliveryStart !== '' && this.time_deliveryStart !== null && this.time_deliveryFinish !== '' && this.time_deliveryFinish) { this.time_deliverycheck = 1 } else { this.time_deliverycheck = 0 }
searchtable(this.projectValuecheck, this.projectValue, this.CustomerNameValuecheck, this.CustomerNameValue, this.toolNumValuecheck, this.toolNumValue, this.time_Signcheck, this.time_deliveryStart, this.time_deliveryFinish, this.time_deliverycheck, this.time_deliveryStart, this.time_deliveryFinish, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
this.tableData = response.data.rows
this.total = response.data.total
}
}).then(() => {
this.loading = false
})
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
</style>