备料
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user