|
@@ -89,6 +89,8 @@
|
|
|
<div class="table-operator">
|
|
|
<a-button type="primary" @click="openClothesAdd" icon="plus">新增</a-button>
|
|
|
<a-button type="primary" @click="push" icon="export">推送</a-button>
|
|
|
+ <a-button type="primary" @click="bitchSubmit" icon="export">批量提交</a-button>
|
|
|
+ <a-button type="primary" @click="bitchCanelSubmit" icon="export">批量取消提交</a-button>
|
|
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" >
|
|
|
<a-button type="primary" icon="import">导入</a-button>
|
|
|
</a-upload>
|
|
@@ -163,7 +165,7 @@
|
|
|
<a-dropdown>
|
|
|
<a class="ant-dropdown-link">更多<a-icon type="down"/></a>
|
|
|
<a-menu slot="overlay" v-if="record.status == '0' || record.status == null">
|
|
|
- <a-menu-item><a @click="submit(record)">提交</a></a-menu-item>
|
|
|
+ <!-- <a-menu-item><a @click="submit(record)">提交</a></a-menu-item> -->
|
|
|
<a-menu-item><a @click="details(record)">详情</a></a-menu-item>
|
|
|
<a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
|
|
|
<a-menu-item>
|
|
@@ -179,11 +181,11 @@
|
|
|
<a @click="details(record)">详情</a>
|
|
|
</a-menu-item>
|
|
|
|
|
|
- <a-menu-item>
|
|
|
+ <!-- <a-menu-item>
|
|
|
<a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancelSubmit(record)">
|
|
|
<a href="javascript:void(0);" style="color:red;">取消提交</a>
|
|
|
</a-popconfirm>
|
|
|
- </a-menu-item>
|
|
|
+ </a-menu-item> -->
|
|
|
<!-- <a-menu-item>
|
|
|
<a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push(record)">
|
|
|
<a href="javascript:void(0);" style="color:green;">推送</a>
|
|
@@ -212,7 +214,7 @@ import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import clothesAddDrawer from '@views/packing-list/packinglist-clothes/clothesAddDrawer.vue'
|
|
|
import detailsClothesDrawer from '@views/packing-list/packinglist-clothes/detailsClothesDrawer.vue'
|
|
|
import editClothesDrawer from '@views/packing-list/packinglist-clothes/editClothesDrawer.vue'
|
|
|
-import { spltList,deleteSpltList,spltListId,SubmitList,cancelSubmitList} from '@api/document/packing-list/packinglist-clothes'
|
|
|
+import { spltList,deleteSpltList,spltListId,SubmitList,cancelSubmitList,bitchSubmitList,bitchCancelSubmitList} from '@api/document/packing-list/packinglist-clothes'
|
|
|
|
|
|
|
|
|
export default {
|
|
@@ -525,6 +527,49 @@ export default {
|
|
|
},
|
|
|
// 推送
|
|
|
push() {},
|
|
|
+
|
|
|
+ //批量提交
|
|
|
+ bitchSubmit(){
|
|
|
+ for(var i =0;i<this.selectedRows.length;i++){
|
|
|
+ var tickRow = this.selectedRows[i]
|
|
|
+ if(tickRow.status === '1'){
|
|
|
+ this.$message.error("部分数据是已提交,请勿重复提交!");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var ids = this.selectedRowKeys.toString()
|
|
|
+ bitchSubmitList({ids : ids}).then(res =>{
|
|
|
+ if (res.success) {
|
|
|
+ this.getSpltList()
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ this.$message.success('提交成功');
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ //批量取消提交
|
|
|
+ bitchCanelSubmit(){
|
|
|
+ for(var i =0;i<this.selectedRows.length;i++){
|
|
|
+ var tickRow = this.selectedRows[i]
|
|
|
+ if(tickRow.status === '0'){
|
|
|
+ this.$message.error("含未提交数据,请重新选择!");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var ids = this.selectedRowKeys.toString()
|
|
|
+ bitchCancelSubmitList({ids : ids}).then(res =>{
|
|
|
+ if (res.success) {
|
|
|
+ this.getSpltList()
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ this.$message.success('取消提交成功');
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
// 导入
|
|
|
importData() {},
|
|
|
// 新增
|