From b5336d2b37289fbcdbc3bd332a628f763724dca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Mon, 24 Jul 2023 16:35:12 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=BA=93=E5=AD=98=E4=BD=99=E9=A2=9D?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=90=AF=E7=94=A8=E5=8A=9F=E8=83=BD=E5=BC=80?= =?UTF-8?q?=E5=8F=91=EF=BC=8C=202=E3=80=81=E7=9B=98=E7=82=B9=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=9D=83=E9=99=90=EF=BC=8C=E5=88=9B=E5=BB=BA=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=B8=8E=E5=BD=93=E5=89=8D=E7=94=A8=E6=88=B7=E6=AF=94?= =?UTF-8?q?=E5=AF=B9=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Count/CountNote-msQuery.vue | 1 + .../InventoryQuery/InventoryBalance.vue | 42 ++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/fe/PC/src/views/inventoryManage/Count/CountNote-msQuery.vue b/fe/PC/src/views/inventoryManage/Count/CountNote-msQuery.vue index f4d4ef7ae..0e6a9ea39 100644 --- a/fe/PC/src/views/inventoryManage/Count/CountNote-msQuery.vue +++ b/fe/PC/src/views/inventoryManage/Count/CountNote-msQuery.vue @@ -77,6 +77,7 @@ export default { let data = true val.forEach(key => { if (this.propsData.adjusted == key) { + // if (this.propsData.adjusted == key && this.propsData.creatorId == this.$store.getters.name.id) { data = false } }) diff --git a/fe/PC/src/views/inventoryManage/InventoryQuery/InventoryBalance.vue b/fe/PC/src/views/inventoryManage/InventoryQuery/InventoryBalance.vue index 496fc9df6..b13a85389 100644 --- a/fe/PC/src/views/inventoryManage/InventoryQuery/InventoryBalance.vue +++ b/fe/PC/src/views/inventoryManage/InventoryQuery/InventoryBalance.vue @@ -9,7 +9,7 @@ :totalCount="totalCount" :multipleSelection="multipleSelection" :MaxResultCount="PageListParams.MaxResultCount" - @topbutton="topbutton" + @topbutton="topbuttonHandle" @inlineDialog="inlineDialog" @sortChange="sortChange" @alertoldSkipCount="alertoldSkipCount" @@ -22,6 +22,7 @@ :primarySearchOption="primarySearchOption" @overallSearchFormClick="overallSearchFormClick" :httpOverallSearchData="httpOverallSearchData" + :tableSelection="true" > @@ -106,6 +107,14 @@ export default { currenButtonData: [ this.defaultImportBtn(),//导入 this.defaultExportBtn(),//导出 + { + type: "success", + icon: "el-icon-check", + label: "批量启用", + name: "batch-active", + size: "mini", + background:"#31bb99" + }, this.defaultFieldSettingBtn(),//字段设置 this.defaultFreshBtn(),//刷新 this.defaultFilterBtn(),//筛选 @@ -198,6 +207,37 @@ export default { }); } }, + topbuttonHandle(val,item){ + // 批量操作 + if(val == 'batch-active'){ + if(!this.multipleSelection || this.multipleSelection.length <= 0){ + this.$warningMsg('请选择数据') + return + } + this.$confirm('此操作将启用已选 ('+this.multipleSelection.length+'条) 数据, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.Loading.tableLoading = true + let _ajaxs = [] + this.multipleSelection.forEach(item=>{ + _ajaxs.push(inventoryBalanceActive({id: item.id})) + }) + Promise.all(_ajaxs).then((allData) => { + this.$successMsg('启用成功!') + this.Loading.tableLoading = false + this.paging() + }).catch((err)=>{ + this.Loading.tableLoading = false + }) + }).catch((err) => { + console.log(err) + }); + }else{ + this.topbutton(val,item) + } + }, //抽屉下拉按钮操作 库存余额删除 只能删除库存数量为0的记录 // drawerHandle(val) { // if (val == 'delete') {