This commit is contained in:
liushuai
2020-02-27 08:36:29 +08:00
14 changed files with 707 additions and 322 deletions

View File

@@ -4,8 +4,9 @@
<div style="white-space: nowrap">
<el-card>
<el-row>
<span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:180px;margin: 3px 0"/>
<el-button size="small" icon="el-icon-search" type="primary" plain style="margin-left: 10px" @click="pageSize=100; pageCurrent=1;searchTable()">查询</el-button>
<el-button size="small" icon="el-icon-search" type="primary" plain style="margin-left: 10px" @click="pageSize=30; pageCurrent=1;searchTable()">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="已导出和未导出备料单" placement="top">
<el-checkbox v-model="all" size="small">查询全部</el-checkbox>
</el-tooltip>
@@ -31,11 +32,11 @@
v-loading="loading"
:data="tableData"
:header-cell-style="{fontFamily:'YouYuan',fontSize:'14px',fontWeight:200}"
:row-class-name="tableRowClassName1"
height="760"
style="width: 1110px; margin: 3px 0"
size="mini"
border
stripe
sortable
highlight-current-row
element-loading-text="拼命加载中"
@@ -161,7 +162,7 @@ export default {
Data: [],
tableData: [], // 表格数据
total: null, // 总条数
pageSize: 100, // 每页显示条数
pageSize: 30, // 每页显示条数
pageCurrent: 1, // 后台获取页
ordername: '',
order: ''
@@ -228,6 +229,27 @@ export default {
// })
this.tableData = response.data.rows
this.total = response.data.total
<<<<<<< HEAD
=======
}
}).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].备料打印,
是否外购备料: this.Data[i].是否外购备料,
工艺要求: response.data[0].工艺要求,
材料: this.Data[i].材料,
重量: this.Data[i].重量,
批次数量: this.Data[i].批次数量,
备料任务接受时间: this.Data[i].备料任务接受时间,
备料任务分配时间: this.Data[i].备料任务分配时间
})
})
>>>>>>> 0b6cb6f55ad7cb26c02017b256ea0ec59eca150f
this.loading = false
}
})
@@ -287,12 +309,6 @@ export default {
this.pageCurrent = val
this.searchTable()
},
tableRowClassName1({ row }) {
console.log(row)
if (row.是否加急 === '1') {
return 'isUrgentItem'
}
},
exportExcel() {
if (this.partName !== '' && this.partName !== null) {
this.partNamecheck = true
@@ -346,8 +362,4 @@ export default {
}
}
</style>
<style>
.el-table .isUrgentItem{
background: #FF9797;
}
</style>

View File

@@ -22,7 +22,7 @@
</el-select>
<el-input v-model="Partpaint" placeholder="零件号" clearable size="small" style="width: 180px;margin:0px 10px;"/>
<el-button type="primary" plain class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 50;getTableData()">查询</el-button>
<el-button :disabled="Name===0" type="success" plain class="el-icon-finished" size="small" style="margin-left: 220px" @click="submit">完成</el-button>
<el-button :disabled="Name===1" type="success" plain class="el-icon-finished" size="small" style="margin-left: 220px" @click="submit">完成</el-button>
</el-card>
<el-row>
<el-card style="width: 850px; margin-left: 0px;display: inline-block;" >
@@ -283,7 +283,6 @@ export default {
this.processSerialNumber = ''
this.radio = true
this.tableData1 = []
this.Name = 0
this.row2 = row
gettabledata1(row.工艺计划流水号).then(response => {
if (response.data.length !== 0) {
@@ -346,9 +345,7 @@ export default {
},
getRow(row) {
this.processSerialNumber = row.工序流水号
console.log(row.完成日期, 222)
row.完成日期 ? this.Name = 0 : this.Name = 1
console.log(this.Name, 111)
row.完成日期 ? this.Name = 1 : this.Name = 0
},
handleSizeChange(val) {
this.pageSize = val

View File

@@ -12,7 +12,7 @@
style="width:250px;margin-left: 5px;margin-top: 10px;margin-bottom: 10px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button size="small" type="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="pageCurrent=1;pageSize=50;searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
</el-card>
<el-card>
@@ -82,7 +82,7 @@
{{ scope.row.操作时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" width="100px">
<el-table-column align="center" label="备注" width="200px" show-overflow-tooltip="">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
@@ -122,7 +122,7 @@
{{ scope.row.设计者 }}
</template>
</el-table-column>
<el-table-column align="center" label="材料" width="100px">
<el-table-column align="center" label="材料" width="150px">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
@@ -189,9 +189,10 @@ export default {
this.loading = true
searchTable(this.startTime[0], this.startTime[1], this.orderName, this.order, this.pageCurrent, this.pageSize).then(response => {
response.data.rows.map(v => {
this.$set(v, '工时比值', v.计划工时 === 0 ? 0 : Math.round(v.扫码工时 / v.计划工时 * 100) / 100.00)
this.$set(v, '工时比值', parseInt(v.计划工时) === 0 ? 0 : (Math.round(parseInt(v.扫码工时) / parseInt(v.计划工时) * 100) / 100.00))
})
this.tableData = response.data.rows
console.log(this.tableData)
this.total = response.data.total
this.loading = false
})

View File

@@ -28,16 +28,7 @@
<el-row>
<el-col style="width: 37%">
<el-card>
<el-table
v-loading="loading2"
:data="tableData1"
:row-class-name="tableRowClassName1"
class="table"
style="max-height: 830px"
highlight-current-row
empty-text=" "
border
@row-click="getRow">
<el-table v-loading="loading2" :data="tableData1" :row-class-name="tableRowClassName1" class="table" style="max-height: 830px" highlight-current-row empty-text=" " border @row-click="getRow">
<el-table-column type="index" label="序号" width="50"/>
<el-table-column align="center" label="工艺名" show-overflow-tooltip min-width="70">
<template slot-scope="scope">
@@ -69,16 +60,7 @@
</el-col>
<el-col style="width: 63%">
<el-card>
<el-table
v-loading="loading"
ref="singleTable"
:data="tableData"
:row-class-name="tableRowClassName"
class="table"
highlight-current-row
border
height="630"
@row-click="getCurrentRow">
<el-table v-loading="loading" ref="singleTable" :data="tableData" :row-class-name="tableRowClassName" class="table" highlight-current-row border height="630" @row-click="getCurrentRow">
<el-table-column align="center" label="零件图号" show-overflow-tooltip width="200">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
@@ -89,11 +71,6 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="加工数" width="70">
<template slot-scope="scope">
{{ scope.row.加工数 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划数" width="70">
<template slot-scope="scope">
{{ scope.row.投产数量 }}
@@ -101,12 +78,12 @@
</el-table-column>
<el-table-column align="center" label="加工完成" width="100">
<template slot-scope="scope">
{{ scope.row.完成日期 }}
{{ scope.row.机加工实际完成时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划完成" width="100">
<template slot-scope="scope">
{{ scope.row.计划结束时间 }}
{{ scope.row.机加工结束时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="用户名称" show-overflow-tooltip min-width="110">
@@ -359,7 +336,7 @@ export default {
if (this.index === -1) {
console.log(-1)
} else {
if (this.index !== 0) {
if (this.index !== 0 && this.isDisabled === false) {
this.index = this.index - 1
console.log(this.index)
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
@@ -372,7 +349,7 @@ export default {
if (this.index === -1) {
console.log(-1)
} else {
if (this.index + 1 !== this.tableData.length) {
if (this.index + 1 !== this.tableData.length && this.isDisabled === false) {
this.index = this.index + 1
console.log(this.index)
this.$refs.singleTable.setCurrentRow(this.tableData[this.index])
@@ -535,40 +512,12 @@ export default {
this.tableData1 = []
this.isDisabled = true
this.loading = true
if (this.Machine === '') {
this.checkbox_Machine = 0
} else {
this.checkbox_Machine = 1
}
if (this.Group === '') {
this.checkbox_Group = 0
} else {
this.checkbox_Group = 1
}
if (this.number === '') {
this.checkbox_number = 0
} else {
this.checkbox_number = 1
}
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.rows.length !== 0) {
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].完成数量, // MES里采集 现在没有
投产数量: response.data.rows[i].批次数量,
完成日期: response.data.rows[i].机加工实际完成时间 ? response.data.rows[i].机加工实际完成时间.split(' ')[0] : '', // 排产时间
计划结束时间: response.data.rows[i].机加工结束时间 ? response.data.rows[i].机加工结束时间.split(' ')[0] : '',
客户名称: response.data.rows[i].客户名称 // 客户名
})
}
}
this.total = response.data.total
this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount)
this.loading = false
})
},
@@ -695,6 +644,8 @@ export default {
row.index = rowIndex
if (parseInt(row.考核状态) > 6) {
return 'CompleteColor'
} else if (parseInt(row.考核状态) <= 6 && parseInt(row.状态) === 1) {
return 'disCompleteColor'
}
},
// 工序状态变色
@@ -725,4 +676,7 @@ export default {
.CompleteColor{
background: #9bd7fc !important;
}
.disCompleteColor{
background: rgb(233,240,250) !important;
}
</style>