|
@@ -76,6 +76,8 @@
|
|
<a-card :bordered="false" style="marginTop:10px;">
|
|
<a-card :bordered="false" style="marginTop:10px;">
|
|
<div class="table-operator">
|
|
<div class="table-operator">
|
|
<a-button type="primary" @click="addBookDrawer" icon="plus">新增</a-button>
|
|
<a-button type="primary" @click="addBookDrawer" icon="plus">新增</a-button>
|
|
|
|
+ <!-- <a-button type="primary" @click="batchSubmit()" icon="plus">批量提交</a-button>
|
|
|
|
+ <a-button type="primary" @click="batchCanaleSubmit()" icon="plus">批量取消提交</a-button> -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 子表 -->
|
|
<!-- 子表 -->
|
|
@@ -86,6 +88,7 @@
|
|
:loading="loading"
|
|
:loading="loading"
|
|
:scroll="{ y: 500 }"
|
|
:scroll="{ y: 500 }"
|
|
:pagination="pagination"
|
|
:pagination="pagination"
|
|
|
|
+ :row-key="record => record.id"
|
|
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
@change="handleTableChange"
|
|
@change="handleTableChange"
|
|
>
|
|
>
|
|
@@ -134,8 +137,8 @@
|
|
</a-card>
|
|
</a-card>
|
|
|
|
|
|
<!-- 抽屉 -->
|
|
<!-- 抽屉 -->
|
|
- <addBook-drawer ref="addBookDrawer" :father="aa" @ok="modalFormOk" @back="getBookList"></addBook-drawer>
|
|
|
|
- <detailsBook-drawer ref="detailsBookDrawer" :father="bb" @ok="modalFormOk"></detailsBook-drawer>
|
|
|
|
|
|
+ <addBook-drawer ref="addBookDrawer" @ok="modalFormOk" @back="getBookList"></addBook-drawer>
|
|
|
|
+ <detailsBook-drawer ref="detailsBookDrawer" @ok="modalFormOk"></detailsBook-drawer>
|
|
<!-- <editBook-drawer ref="editBookDrawer" :father="cc" @ok="modalFormOk"></editBook-drawer> -->
|
|
<!-- <editBook-drawer ref="editBookDrawer" :father="cc" @ok="modalFormOk"></editBook-drawer> -->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -253,6 +256,7 @@ export default {
|
|
],
|
|
],
|
|
bookListData: [],
|
|
bookListData: [],
|
|
id: '',
|
|
id: '',
|
|
|
|
+ selectedRowKeys:[],//选中行id
|
|
loading: false, // 表格加载
|
|
loading: false, // 表格加载
|
|
pagination:{},
|
|
pagination:{},
|
|
// 查询条件
|
|
// 查询条件
|
|
@@ -317,7 +321,7 @@ export default {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
submitPackingList({ id: record.id, type: '1' }).then(res => {
|
|
submitPackingList({ id: record.id, type: '1' }).then(res => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
- record.theDocumentsState = '1'
|
|
|
|
|
|
+ // record.theDocumentsState = '1'
|
|
this.getBookList()
|
|
this.getBookList()
|
|
this.$message.success('提交成功')
|
|
this.$message.success('提交成功')
|
|
}else {
|
|
}else {
|
|
@@ -326,6 +330,22 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // //批量提交
|
|
|
|
+ // batchSubmit(){
|
|
|
|
+ // this.$nextTick(() => {
|
|
|
|
+ // submitPackingList({ id: this.selectedRowKeys, type: '1' }).then(res => {
|
|
|
|
+ // if (res.success) {
|
|
|
|
+ // // record.theDocumentsState = '1'
|
|
|
|
+ // this.getBookList()
|
|
|
|
+ // this.$message.success('提交成功')
|
|
|
|
+ // this.selectedRowKeys = []
|
|
|
|
+ // }else {
|
|
|
|
+ // this.$message.error(res.message);
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+
|
|
|
|
+ // },
|
|
//取消提交
|
|
//取消提交
|
|
canaleSubmit(record) {
|
|
canaleSubmit(record) {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -340,6 +360,20 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ batchCanaleSubmit(){
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ submitPackingList({ id: this.selectedRowKeys, type: '2' }).then(res => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.$message.success('取消提交成功')
|
|
|
|
+ // record.theDocumentsState = '0'
|
|
|
|
+ this.getBookList()
|
|
|
|
+ this.selectedRowKeys = []
|
|
|
|
+ }else {
|
|
|
|
+ this.$message.error(res.message);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 操作 详情
|
|
// 操作 详情
|
|
details(record) {
|
|
details(record) {
|
|
this.$refs.detailsBookDrawer.visible = true
|
|
this.$refs.detailsBookDrawer.visible = true
|
|
@@ -402,9 +436,11 @@ export default {
|
|
this.queryParam.pageNo = pagination.current
|
|
this.queryParam.pageNo = pagination.current
|
|
this.getBookList()
|
|
this.getBookList()
|
|
},
|
|
},
|
|
- aa() {},
|
|
|
|
- bb() {},
|
|
|
|
- cc() {}
|
|
|
|
|
|
+ // 选中行
|
|
|
|
+ onSelectChange(keys) {
|
|
|
|
+ this.selectedRowKeys = keys
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
mounted() {}
|
|
mounted() {}
|