This commit is contained in:
chenjianan
2018-12-24 19:19:21 +08:00
8 changed files with 196 additions and 88 deletions

View File

@@ -68,3 +68,14 @@ export function searchTable1(check, entryNameValue, check1, machine, check2, gro
} }
}) })
} }
export function processingStatus(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_成组配套加工进度_查询数据',
param: '工艺计划流水号=' + num
}
})
}

View File

@@ -72,7 +72,6 @@ export function searchManufactor(name) {
} }
}) })
} }
// 确定价格
export function spareParts(processNum, single) { export function spareParts(processNum, single) {
return request({ return request({
url: '', url: '',
@@ -204,3 +203,14 @@ export function getPrice(Number, money, money1, money2, money3) {
} }
}) })
} }
export function handlechange(Number, code) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_工作者',
param: '工序流水号=' + Number + '&工作者考勤编号=' + code
}
})
}

View File

@@ -36,7 +36,8 @@
v-loading="listLoading2" v-loading="listLoading2"
:data="tableData2" :data="tableData2"
style="width: 100%;max-height: 400px;" style="width: 100%;max-height: 400px;"
height="400" size="mini"
height="300"
highlight-current-row highlight-current-row
border border
@row-click="searchSpareParts"> @row-click="searchSpareParts">
@@ -97,7 +98,8 @@
v-loading="listLoading" v-loading="listLoading"
:data="tableData" :data="tableData"
style="width: 100%;max-height: 400px;" style="width: 100%;max-height: 400px;"
height="400" size="mini"
height="300"
highlight-current-row highlight-current-row
border border
@row-click="searchProcedure"> @row-click="searchProcedure">
@@ -153,7 +155,8 @@
v-loading="listLoading1" v-loading="listLoading1"
:data="tableData1" :data="tableData1"
style="width: 100%;max-height: 400px;" style="width: 100%;max-height: 400px;"
height="400" size="mini"
height="300"
highlight-current-row highlight-current-row
border> border>
<el-table-column align="center" label="工序顺序" width="100"> <el-table-column align="center" label="工序顺序" width="100">
@@ -361,7 +364,6 @@ export default {
this.check3 = 0 this.check3 = 0
} }
searchTable(this.entryNameValue, this.machineValue, this.check2, this.GroupNumValue, this.check3, this.PartDrawingNumber, this.pageCurrent, this.pageSize).then(response => { searchTable(this.entryNameValue, this.machineValue, this.check2, this.GroupNumValue, this.check3, this.PartDrawingNumber, this.pageCurrent, this.pageSize).then(response => {
console.log(response)
this.tableData = response.data.rows this.tableData = response.data.rows
this.total = response.data.total this.total = response.data.total
this.listLoading = false this.listLoading = false

View File

@@ -91,6 +91,11 @@
{{ scope.row.入库时间 }} {{ scope.row.入库时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="processingStatus(scope.row)">查看加工进度</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div class="block" style="margin-top: 10px;"> <div class="block" style="margin-top: 10px;">
<el-pagination <el-pagination
@@ -339,11 +344,49 @@
<el-button type="primary" @click="submitGroup">提交</el-button> <el-button type="primary" @click="submitGroup">提交</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogFormVisible4" title="零件加工进度" center style="min-height: 300px">
<el-table
:data="tableData5"
style="width: 100%;max-height: 400px;"
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>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { initProject, searchTable, searchmachine, searchgroup, searchPurchaseTable, searchTable1 } from '@/api/ManufacturingCenter/GroupMatching' import { initProject, searchTable, searchmachine, searchgroup, searchPurchaseTable, searchTable1, processingStatus } from '@/api/ManufacturingCenter/GroupMatching'
export default { export default {
data() { data() {
return { return {
@@ -371,6 +414,7 @@ export default {
tableData6: [], tableData6: [],
tableData: [], tableData: [],
tableData1: [], tableData1: [],
tableData5: [],
state: null, state: null,
listLoading1: false, listLoading1: false,
listLoading2: false, listLoading2: false,
@@ -382,6 +426,7 @@ export default {
title: '', title: '',
dialogFormVisible2: false, dialogFormVisible2: false,
dialogFormVisible3: false, dialogFormVisible3: false,
dialogFormVisible4: false,
check: null, check: null,
check1: null, check1: null,
check2: null, check2: null,
@@ -511,6 +556,17 @@ export default {
} }
}) })
}, },
processingStatus(row) {
this.dialogFormVisible4 = true
processingStatus(row.工艺计划流水号).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].计划日期 !== '' && response.data[i].计划日期 !== null) {
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
}
}
this.tableData5 = response.data
})
},
empty() { empty() {
this.machineToolNumber = '' this.machineToolNumber = ''
this.groupNumber = '' this.groupNumber = ''

View File

@@ -100,11 +100,6 @@
{{ scope.row.零件数量 }} {{ scope.row.零件数量 }}
</template> </template>
</el-table-column> </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"> <el-table-column label="备注" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件备注 }} {{ scope.row.零件备注 }}
@@ -135,11 +130,6 @@
{{ scope.row.零件数量 }} {{ scope.row.零件数量 }}
</template> </template>
</el-table-column> </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"> <el-table-column label="备注" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
@@ -170,11 +160,6 @@
{{ scope.row.零件数量 }} {{ scope.row.零件数量 }}
</template> </template>
</el-table-column> </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"> <el-table-column label="备注" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
@@ -393,13 +378,13 @@
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:visible.sync="dialogFormVisible1" :visible.sync="dialogFormVisible1"
:row-style="tableRowClassName"
title="基本件打回信息" title="基本件打回信息"
center center
width="70%" width="70%"
style="min-height: 400px"> style="min-height: 400px">
<el-table <el-table
:data="tableData9" :data="tableData9"
:row-class-name="tableRowClassName"
size="mini" size="mini"
style="width: 97%;max-height: 300px" style="width: 97%;max-height: 300px"
height="400" height="400"
@@ -432,7 +417,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="机床编号"> <el-table-column align="center" label="机床编号">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床 }} {{ scope.row.机床 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="组号"> <el-table-column align="center" label="组号">
@@ -461,13 +446,13 @@
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:visible.sync="dialogFormVisible2" :visible.sync="dialogFormVisible2"
:row-style="tableRowClassName"
title="外购件和标准件打回信息" title="外购件和标准件打回信息"
center center
width="70%" width="70%"
style="min-height: 400px"> style="min-height: 400px">
<el-table <el-table
:data="tableData10" :data="tableData10"
:row-class-name="tableRowClassName"
size="mini" size="mini"
style="width: 97%;max-height: 300px" style="width: 97%;max-height: 300px"
height="400" height="400"
@@ -500,7 +485,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="机床编号"> <el-table-column align="center" label="机床编号">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床 }} {{ scope.row.机床 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="组号"> <el-table-column align="center" label="组号">
@@ -615,7 +600,7 @@ export default {
if (response.data[i].退回时间 !== '') { if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0] response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
} }
if (response.data[i].是否确认 === '0') { if (response.data[i].是否确认 === 0) {
this.value += 1 this.value += 1
} }
} }
@@ -626,7 +611,7 @@ export default {
if (response.data[i].退回时间 !== '') { if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0] response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
} }
if (response.data[i].是否确认 === '0') { if (response.data[i].是否确认 === 0) {
this.value1 += 1 this.value1 += 1
} }
} }
@@ -649,7 +634,7 @@ export default {
if (response.data[i].退回时间 !== '') { if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0] response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
} }
if (response.data[i].是否确认 === '0') { if (response.data[i].是否确认 === 0) {
this.value += 1 this.value += 1
} }
} }
@@ -670,7 +655,7 @@ export default {
if (response.data[i].退回时间 !== '') { if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0] response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
} }
if (response.data[i].是否确认 === '0') { if (response.data[i].是否确认 === 0) {
this.value1 += 1 this.value1 += 1
} }
} }
@@ -682,52 +667,75 @@ export default {
}) })
}, },
Delete(row) { Delete(row) {
Delete(row.基本件流水号).then(response => { this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
this.value = 0 confirmButtonText: '确定',
if (response.data[0].result === '1') { cancelButtonText: '取消',
this.$message.success('删除成功') type: 'warning'
PartCallbackInformation().then(response => { }).then(() => {
for (let i = 0; i < response.data.length; i++) { Delete(row.基本件流水号).then(response => {
if (response.data[i].退回时间 !== '') { this.value = 0
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0] if (response.data[0].result === '1') {
this.$message.success('删除成功')
PartCallbackInformation().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === 0) {
this.value += 1
}
} }
if (response.data[i].是否确认 === '0') { this.tableData9 = response.data
this.value += 1 })
} } else {
} this.$message.error('删除失败')
this.tableData9 = response.data }
}) })
} else { }).catch(() => {
this.$message.error('删除失败') this.$message({
} type: 'info',
message: '已取消删除'
})
}) })
}, },
Delete1(row) { Delete1(row) {
Delete1(row.标准件和外购件流水号).then(response => { this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
this.value1 = 0 confirmButtonText: '确定',
if (response.data[0].result === '1') { cancelButtonText: '取消',
this.$message.success('删除成功') type: 'warning'
PartCallbackInformation1().then(response => { }).then(() => {
for (let i = 0; i < response.data.length; i++) { Delete1(row.标准件和外购件流水号).then(response => {
if (response.data[i].退回时间 !== '') { this.value1 = 0
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0] if (response.data[0].result === '1') {
this.$message.success('删除成功')
PartCallbackInformation1().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === 0) {
this.value1 += 1
}
} }
if (response.data[i].是否确认 === '0') { this.tableData10 = response.data
this.value1 += 1 })
} } else {
} this.$message.error('删除失败')
this.tableData10 = response.data }
}) })
} else { }).catch(() => {
this.$message.error('删除失败') this.$message({
} type: 'info',
message: '已取消删除'
})
}) })
}, },
tableRowClassName({ row }) { tableRowClassName({ row }) {
if (row.是否确认 === '0') { console.log(row.是否确认)
return 'background: #ffff66' if (row.是否确认 === 0) {
return 'NotThrough'
} else { } else {
return '' return 'adopt'
} }
}, },
projectChange() { projectChange() {
@@ -1197,3 +1205,11 @@ export default {
margin-right: 40px; margin-right: 40px;
} }
</style> </style>
<style>
.el-table .NotThrough{
background: palevioletred;
}
.el-table .adopt{
background: limegreen;
}
</style>

View File

@@ -3,7 +3,7 @@
<el-card> <el-card>
<el-row> <el-row>
<span>项目名称:</span> <span>项目名称:</span>
<el-select v-model="project" size="small" filterable clearable placeholder="项目名称" @change="getMachine"> <el-select v-model="project" size="small" filterable clearable placeholder="项目名称" style="width: 180px;" @change="getMachine">
<el-option <el-option
v-for="item in projects" v-for="item in projects"
:key="item.value" :key="item.value"
@@ -11,7 +11,7 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>机床号:</span> <span>机床号:</span>
<el-select v-model="Machine" size="small" clearable placeholder="机床号" @change="getGroup"> <el-select v-model="Machine" size="small" clearable placeholder="机床号" style="width: 180px;" @change="getGroup">
<el-option <el-option
v-for="item in Machines" v-for="item in Machines"
:key="item.value" :key="item.value"
@@ -19,7 +19,7 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>组号:</span> <span>组号:</span>
<el-select v-model="Group" size="small" clearable placeholder="组号"> <el-select v-model="Group" size="small" clearable placeholder="组号" style="width: 180px;">
<el-option <el-option
v-for="item in Groups" v-for="item in Groups"
:key="item.value" :key="item.value"
@@ -28,16 +28,15 @@
</el-select> </el-select>
</el-row> </el-row>
<el-row> <el-row>
<span>是否外协:</span> <el-select v-show="false" v-model="part" size="small" placeholder="是否外协">
<el-select v-model="part" size="small" placeholder="是否外协">
<el-option <el-option
v-for="item in parts" v-for="item in parts"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>零件号:</span> <span>零件:</span>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 200px;"/> <el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button> <el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
<span>进度颜色</span> <span>进度颜色</span>
<span style="background-color: red">拖期</span> <span style="background-color: red">拖期</span>

View File

@@ -213,11 +213,6 @@
{{ scope.row.发票号 }} {{ scope.row.发票号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开票金额" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column label="接收人" align="center" width="180px"> <el-table-column label="接收人" align="center" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.接收人 }} {{ scope.row.接收人 }}
@@ -228,6 +223,11 @@
{{ scope.row.开户行 }} {{ scope.row.开户行 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开票金额" align="center" width="150px" prop="开票金额">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column label="开票日期" align="center"> <el-table-column label="开票日期" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.开票时间 }} {{ scope.row.开票时间 }}
@@ -426,12 +426,11 @@ export default {
}, },
methods: { methods: {
getSummaries(param) { getSummaries(param) {
console.log(param)
const { columns, data } = param const { columns, data } = param
const sums = [] const sums = []
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 0) { if (index === 0) {
sums[index] = '总' sums[index] = '总金额'
return return
} }
const values = data.map(item => Number(item[column.property])) const values = data.map(item => Number(item[column.property]))
@@ -446,7 +445,7 @@ export default {
}, 0) }, 0)
sums[index] += ' 元' sums[index] += ' 元'
} else { } else {
sums[index] = 'N/A' sums[index] = ''
} }
}) })
return sums return sums

View File

@@ -164,7 +164,7 @@
</template> </template>
<script> <script>
import { shouhuo, getTable, getData1, getTable1, getprocedure, searchManufactor, spareParts, addTable, editData, deleteData, insertParts, getParts, getPrice, editData1, deleteData1, getNumber } from '@/api/Outsourcing/OutsourcingTaskQuery' import { handlechange, shouhuo, getTable, getData1, getTable1, getprocedure, searchManufactor, spareParts, addTable, editData, deleteData, insertParts, getParts, getPrice, editData1, deleteData1, getNumber } from '@/api/Outsourcing/OutsourcingTaskQuery'
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel' import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
import { convertCurrency } from '@/vendor/int2Chinese' import { convertCurrency } from '@/vendor/int2Chinese'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@@ -176,6 +176,8 @@ export default {
}, },
data() { data() {
return { return {
wancheng: '',
gongxulsh: [],
bianliang: [], bianliang: [],
card: false, card: false,
费用: '', 费用: '',
@@ -292,12 +294,20 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
shouhuo(row.外协加工任务单流水号).then(response => { if (this.wancheng === 1) {
if (response.data[0].result === '1') { for (let i = 0; i < this.gongxulsh.length; i++) {
this.fetchData() handlechange(this.gongxulsh[i].工序流水号, '0000')
this.getList() if (i === this.gongxulsh.length - 1) {
console.log(1)
shouhuo(row.外协加工任务单流水号).then(response => {
if (response.data[0].result === '1') {
this.fetchData()
this.getList()
}
})
}
} }
}) }
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
@@ -365,6 +375,8 @@ export default {
}, },
// 查询 // 查询
searchProcess(row) { searchProcess(row) {
this.wancheng = ''
this.gongxulsh = []
this.任务单号 = row.表单号 this.任务单号 = row.表单号
this.任务下达日期 = row.任务下达日期 this.任务下达日期 = row.任务下达日期
this.外协厂家 = row.外协厂家 this.外协厂家 = row.外协厂家
@@ -478,11 +490,14 @@ export default {
for (let i = 0; i < this.returns.length; i++) { for (let i = 0; i < this.returns.length; i++) {
spareParts(this.returns[i].工艺计划流水号, this.returns[i].单件是否外协).then(response => { spareParts(this.returns[i].工艺计划流水号, this.returns[i].单件是否外协).then(response => {
for (let k = 0; k < response.data.length; k++) { for (let k = 0; k < response.data.length; k++) {
this.gongxulsh.push({
工序流水号: response.data[k].工序流水号
})
this.process[i][k] = response.data[k].工艺名称简称 this.process[i][k] = response.data[k].工艺名称简称
document.getElementsByClassName('tableData')[i].children[4].innerHTML += response.data[k].工艺名称简称 + '/' document.getElementsByClassName('tableData')[i].children[4].innerHTML += response.data[k].工艺名称简称 + '/'
} }
}).then(() => { }).then(() => {
// this.bianliang.push(this.returns[i]) this.wancheng = 1
}) })
} }
}).then(() => { }).then(() => {