优化
This commit is contained in:
@@ -55,6 +55,14 @@ export function submit2(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function submit22(data) {
|
||||
return request({
|
||||
url: 'api/producetask/submit22',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDevices(params) {
|
||||
return request({
|
||||
url: 'api/producetask/getDevices',
|
||||
@@ -70,4 +78,4 @@ export function getCapacitytes(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, importExcel, getCapacitytes, submit, getDevices, submit2, submit3 }
|
||||
export default { add, edit, del, importExcel, getCapacitytes, submit, getDevices, submit2, submit3, submit22 }
|
||||
|
||||
@@ -150,6 +150,16 @@
|
||||
>
|
||||
预排
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="save2()"
|
||||
>
|
||||
按交期预排
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
|
||||
<!--表格渲染-->
|
||||
@@ -330,6 +340,25 @@ export default {
|
||||
this.crud.loading = false
|
||||
})
|
||||
},
|
||||
save2() {
|
||||
if(this.crud.query.captemplate_id === '' || this.crud.query.captemplate_id === undefined ){
|
||||
this.crud.notify('请先选择排产模板!')
|
||||
return false
|
||||
}
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
this.crud.loading = true
|
||||
producetask.submit22({ query: this.crud.query, rows: this.checkrows}).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.crud.loading = false
|
||||
this.querytable()
|
||||
}).catch(() => {
|
||||
this.crud.loading = false
|
||||
})
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user