|
@@ -50,6 +50,8 @@
|
|
|
<a-card :bordered="false" style="marginTop:10px;">
|
|
|
<div class="table-operator">
|
|
|
<a-button type="primary" @click="addFabric" icon="plus">新增</a-button>
|
|
|
+ <a-button type="primary" @click="bitchSubmitList" icon="plus">批量提交</a-button>
|
|
|
+ <a-button type="primary" @click="bitchCancelSubmitList" icon="plus">批量取消提交</a-button>
|
|
|
<a-button type="primary" @click="push" icon="export">推送</a-button>
|
|
|
</div>
|
|
|
|
|
@@ -125,7 +127,7 @@ import moment from 'moment'
|
|
|
import addFabricDrawer from '@views/packing-list/packinglist-fabrics/addFabricDrawer.vue'
|
|
|
import detailsFabricDrawer from '@views/packing-list/packinglist-fabrics/detailsFabricDrawer.vue'
|
|
|
import editFabricDrawer from '@views/packing-list/packinglist-fabrics/editFabricDrawer.vue'
|
|
|
-import { fabricList,fabricListId,deleteFabricList,submitList,cancelSubmit} from '@api/document/packing-list/packinglist-fabrics'
|
|
|
+import { fabricList,fabricListId,deleteFabricList,submitList,cancelSubmit,bitchSubmit,bitchCancelSubmit} from '@api/document/packing-list/packinglist-fabrics'
|
|
|
|
|
|
export default {
|
|
|
name: 'FabricList', // 装箱单-面料
|
|
@@ -410,6 +412,49 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ //批量提交
|
|
|
+ bitchSubmitList(){
|
|
|
+ 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()
|
|
|
+ bitchSubmit({ids : ids}).then(res =>{
|
|
|
+ if (res.success) {
|
|
|
+ this.getFabricList()
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ this.$message.success('提交成功');
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ //批量取消推送
|
|
|
+ bitchCancelSubmitList(){
|
|
|
+ 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()
|
|
|
+ bitchCancelSubmit({ids : ids}).then(res =>{
|
|
|
+ if (res.success) {
|
|
|
+ this.getFabricList()
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ this.$message.success('取消提交成功');
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
// 操作 删除
|
|
|
handleDelete(id) {
|
|
|
this.$nextTick(() => {
|