|
@@ -154,6 +154,7 @@
|
|
|
:init-load="false"
|
|
:init-load="false"
|
|
|
:datasource="datasourceList"
|
|
:datasource="datasourceList"
|
|
|
:selection.sync="selection"
|
|
:selection.sync="selection"
|
|
|
|
|
+ row-key="code"
|
|
|
>
|
|
>
|
|
|
<template v-slot:default>
|
|
<template v-slot:default>
|
|
|
<div class="tool">
|
|
<div class="tool">
|
|
@@ -165,6 +166,12 @@
|
|
|
size="medium"
|
|
size="medium"
|
|
|
>下发采购计划</el-button
|
|
>下发采购计划</el-button
|
|
|
>
|
|
>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="isAllChecked"
|
|
|
|
|
+ size="medium"
|
|
|
|
|
+ >一键勾选缺料</el-button
|
|
|
|
|
+ >
|
|
|
</div>
|
|
</div>
|
|
|
<div class="tool_r">
|
|
<div class="tool_r">
|
|
|
<el-form
|
|
<el-form
|
|
@@ -673,6 +680,16 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ isAllChecked() {
|
|
|
|
|
+ let datasourceList = this.datasourceList.filter(
|
|
|
|
|
+ (el) => el.finalStateText == '缺料' && !el.hasIssued
|
|
|
|
|
+ );
|
|
|
|
|
+ if (datasourceList.length) {
|
|
|
|
|
+ this.$refs.table.setSelectedRowKeys(
|
|
|
|
|
+ datasourceList.map((el) => el.code)
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.table.reload({ page: 1, where });
|
|
this.$refs.table.reload({ page: 1, where });
|