看板修改,物料回库分配规则修改
This commit is contained in:
@@ -32,8 +32,12 @@
|
||||
:data="tableData"
|
||||
size="small"
|
||||
style="width: 100%;"
|
||||
@selection-change="changeFun"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column v-if="false" prop="produce_uuid" label="生产标识"/>
|
||||
<el-table-column prop="produce_code" label="生产编码"/>
|
||||
<el-table-column prop="produce_status_name" label="生产状态" :formatter="formatStatusName"/>
|
||||
@@ -125,11 +129,11 @@ export default {
|
||||
this.notify('操作成功', 'success')
|
||||
},
|
||||
callMaterial() {
|
||||
if (this.tableData.length < 1) {
|
||||
this.notify('没有执行中的任务', 'info')
|
||||
if (this.$refs.table.selection.length === 0) {
|
||||
this.notify('请选中一条记录!', 'info')
|
||||
return
|
||||
}
|
||||
const data = this.tableData[0]
|
||||
const data = this.$refs.table.selection[0]
|
||||
crudProduceTask.callMaterial(data).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.queryId()
|
||||
@@ -138,11 +142,11 @@ export default {
|
||||
})
|
||||
},
|
||||
finish() {
|
||||
if (this.tableData.length < 1) {
|
||||
this.notify('没有执行中的任务', 'info')
|
||||
if (this.$refs.table.selection.length === 0) {
|
||||
this.notify('请选中一条记录!', 'info')
|
||||
return
|
||||
}
|
||||
const data = this.tableData[0]
|
||||
const data = this.$refs.table.selection[0]
|
||||
crudProduceTask.finish(data).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.queryId()
|
||||
@@ -151,11 +155,11 @@ export default {
|
||||
})
|
||||
},
|
||||
materialBack() {
|
||||
if (this.tableData.length < 1) {
|
||||
this.notify('没有执行中的任务', 'info')
|
||||
if (this.$refs.table.selection.length === 0) {
|
||||
this.notify('请选中一条记录!', 'info')
|
||||
return
|
||||
}
|
||||
const data = this.tableData[0]
|
||||
const data = this.$refs.table.selection[0]
|
||||
crudProduceTask.materialBack(data).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.queryId()
|
||||
@@ -176,6 +180,14 @@ export default {
|
||||
return this.$message.error('请选择一条信息操作')
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
}
|
||||
},
|
||||
|
||||
queryId() {
|
||||
const id = this.$route.params.id
|
||||
crudProduceTask.queryIdDevice(id).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user