|
@@ -180,6 +180,7 @@
|
|
|
<a-button type="primary" icon="download" @click="exportXlsShipment('出运明细列表')">出运明细导出</a-button>
|
|
|
<a-button type="primary" icon="check" @click="submit">批量提交</a-button>
|
|
|
<a-button type="primary" icon="close" @click="cancelSubmit">批量取消提交</a-button>
|
|
|
+ <a-button type="primary" icon="close" @click="batchDelete">批量删除</a-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- 子表 :row-key="record => record.id" :pagination="ipagination-->
|
|
@@ -349,7 +350,8 @@ import {
|
|
|
pushShipment,
|
|
|
rePushShipment,
|
|
|
exportXls,
|
|
|
- listExportXls
|
|
|
+ listExportXls,
|
|
|
+ deleteBatch
|
|
|
} from '@api/document/shipmentList'
|
|
|
|
|
|
export default {
|
|
@@ -1032,6 +1034,35 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ //批量删除
|
|
|
+ batchDelete(){
|
|
|
+ this.$nextTick(() => {
|
|
|
+ var grouyIdList = []
|
|
|
+ this.loading = true
|
|
|
+ this.shipmentListData.map(item =>{
|
|
|
+ this.selectedRowKeys.map(e=>{
|
|
|
+ if(item.itemIds == e){
|
|
|
+ grouyIdList.push(item.groupId)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ deleteBatch({ submitListId: this.selectedRowKeys ,grouyIdList:grouyIdList}).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ if (res.success) {
|
|
|
+ // console.log('提交成功,单据状态改为【已提交】')
|
|
|
+ // this.shipmentListData.submitStatus = '1'
|
|
|
+ this.selectedRowKeys =[]
|
|
|
+ this.judageAdd()
|
|
|
+ // 渲染 发运明细列表
|
|
|
+ this.$message.success('批量成功')
|
|
|
+ }else {
|
|
|
+ this.judageAdd()
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
// 推送
|
|
|
push(record) {
|