更新
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<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-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit2()">自家备料确认</el-button>
|
||||
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="back()">打回</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange2">
|
||||
@@ -90,7 +91,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable, searchtable2, searchtable3, change2, change3 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||
import { searchtable, searchtable2, searchtable3, change2, change3, edit } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
@@ -99,6 +100,7 @@ export default {
|
||||
editTime: '',
|
||||
bianliang1: [],
|
||||
bianliang2: [],
|
||||
bianliang3: [],
|
||||
num: 0,
|
||||
arrest: [],
|
||||
all: false,
|
||||
@@ -183,6 +185,24 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
back() {
|
||||
if (this.arrest2.length === 0) {
|
||||
this.$message.warning('请选择零件')
|
||||
} else {
|
||||
this.a = 0
|
||||
for (let i = 0; i < this.arrest2.length; i++) {
|
||||
edit(this.arrest2[i].工艺计划流水号).then(response => {
|
||||
this.a += parseInt(response.data[0].result)
|
||||
if (this.a === this.arrest2.length) {
|
||||
this.$message.success('打回成功')
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('打回失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
zeroFill(i) {
|
||||
if (i >= 0 && i <= 9) {
|
||||
return '0' + i
|
||||
|
||||
Reference in New Issue
Block a user