备料到货“

This commit is contained in:
zhangdingyu
2018-12-29 22:21:52 +08:00
parent ba40c3396f
commit 6f77a6601a
2 changed files with 20 additions and 9 deletions

View File

@@ -7,6 +7,7 @@
<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>
@@ -55,10 +56,12 @@
</template>
<script>
import { searchtable, searchtable2, edit, handlechange } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { searchtable, searchtable2, change } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
export default {
data() {
return {
bianliang1: [],
bianliang2: [],
num: 0,
arrest: [],
all: false,
@@ -115,15 +118,12 @@ export default {
this.$message.warning('请选择零件')
} else {
for (let i = 0; i < this.arrest.length; i++) {
edit(this.arrest[i].工艺计划流水号).then(() => {
handlechange(this.arrest[i].工序流水号, '0000').then(response => {
this.num = this.num + response.data[0].result
})
})
if (this.num === this.arrest.length) {
this.searchTable()
}
this.bianliang1.push(this.arrest[i].工艺计划流水号)
this.bianliang2.push(this.arrest[i].工序流水号)
}
change(this.bianliang2, '0000', this.bianliang1).then(() => {
this.searchTable()
})
}
},
// 分页