diff --git a/jshERP-web/src/views/bill/OtherInList.vue b/jshERP-web/src/views/bill/OtherInList.vue index 6f69703f..0656a68b 100644 --- a/jshERP-web/src/views/bill/OtherInList.vue +++ b/jshERP-web/src/views/bill/OtherInList.vue @@ -177,7 +177,7 @@ import { BillListMixin } from './mixins/BillListMixin' import JEllipsis from '@/components/jeecg/JEllipsis' import JDate from '@/components/jeecg/JDate' - import Vue from 'vue' + import { deleteAction } from '@/api/manage' export default { name: "OtherInList", mixins:[JeecgListMixin,BillListMixin], @@ -273,6 +273,54 @@ this.initWaitBillCount('入库', '采购,销售退货', '1,3') } }, + myHandleDelete(record) { + let that = this + if(record.status === '0') { + deleteAction(that.url.delete, {id: record.id}).then((res) => { + if(res.code === 200){ + that.loadData(1) + if(that.inOutManageFlag) { + that.initWaitBillCount('入库', '采购,销售退货', '1,3') + } + } else { + that.$message.warning(res.data.message); + } + }) + } else { + this.$message.warning("抱歉,只有未审核的单据才能删除,请先进行反审核!") + } + }, + batchDel: function () { + if (this.selectedRowKeys.length <= 0) { + this.$message.warning('请选择一条记录!') + } else { + let ids = "" + for (let i = 0; i < this.selectedRowKeys.length; i++) { + ids += this.selectedRowKeys[i] + "," + } + let that = this + this.$confirm({ + title: "确认删除", + content: "是否删除选中数据?", + onOk: function () { + that.loading = true + deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { + if(res.code === 200){ + that.loadData() + that.onClearSelected() + if(that.inOutManageFlag) { + that.initWaitBillCount('入库', '采购,销售退货', '1,3') + } + } else { + that.$message.warning(res.data.message) + } + }).finally(() => { + that.loading = false + }) + } + }) + } + }, //待入库 handleWaitBill() { this.$refs.batchWaitBill.show('入库', '采购,销售退货', "1,3") diff --git a/jshERP-web/src/views/bill/OtherOutList.vue b/jshERP-web/src/views/bill/OtherOutList.vue index 5c535d29..f2a583e9 100644 --- a/jshERP-web/src/views/bill/OtherOutList.vue +++ b/jshERP-web/src/views/bill/OtherOutList.vue @@ -177,7 +177,7 @@ import { BillListMixin } from './mixins/BillListMixin' import JEllipsis from '@/components/jeecg/JEllipsis' import JDate from '@/components/jeecg/JDate' - import Vue from 'vue' + import { deleteAction } from '@/api/manage' export default { name: "OtherOutList", mixins:[JeecgListMixin,BillListMixin], @@ -273,6 +273,54 @@ this.initWaitBillCount('出库', '销售,采购退货', '1,3') } }, + myHandleDelete(record) { + let that = this + if(record.status === '0') { + deleteAction(that.url.delete, {id: record.id}).then((res) => { + if(res.code === 200){ + that.loadData(1) + if(that.inOutManageFlag) { + that.initWaitBillCount('出库', '销售,采购退货', '1,3') + } + } else { + that.$message.warning(res.data.message); + } + }) + } else { + this.$message.warning("抱歉,只有未审核的单据才能删除,请先进行反审核!") + } + }, + batchDel: function () { + if (this.selectedRowKeys.length <= 0) { + this.$message.warning('请选择一条记录!') + } else { + let ids = "" + for (let i = 0; i < this.selectedRowKeys.length; i++) { + ids += this.selectedRowKeys[i] + "," + } + let that = this + this.$confirm({ + title: "确认删除", + content: "是否删除选中数据?", + onOk: function () { + that.loading = true + deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { + if(res.code === 200){ + that.loadData() + that.onClearSelected() + if(that.inOutManageFlag) { + that.initWaitBillCount('出库', '销售,采购退货', '1,3') + } + } else { + that.$message.warning(res.data.message) + } + }).finally(() => { + that.loading = false + }) + } + }) + } + }, //待出库 handleWaitBill() { this.$refs.batchWaitBill.show('出库', '销售,采购退货', "1,3") diff --git a/jshERP-web/src/views/bill/dialog/BatchWaitBillList.vue b/jshERP-web/src/views/bill/dialog/BatchWaitBillList.vue index 321bde65..ff577781 100644 --- a/jshERP-web/src/views/bill/dialog/BatchWaitBillList.vue +++ b/jshERP-web/src/views/bill/dialog/BatchWaitBillList.vue @@ -53,7 +53,7 @@
批量{{queryParam.type}} - 注意:序列号和批号商品不能批量{{queryParam.type}},需要到新增界面关联单据 + 注意:含有序列号、批号商品或部分入库状态不能批量{{queryParam.type}},需要到新增界面关联单据
{ - if(res.code === 200){ - that.$emit('ok') - }else{ - that.$message.warning(res.data.message) + this.$confirm({ + title: "确认批量操作", + content: "是否批量操作选中的单据?", + onOk: function () { + let ids = ""; + for (let i = 0; i < that.selectedRowKeys.length; i++) { + ids += that.selectedRowKeys[i] + ","; + } + that.confirmLoading = true + batchAddDepotHeadAndDetail({ 'ids': ids }).then((res) => { + if (res.code === 200) { + that.$emit('ok') + that.selectedRowKeys = [] + that.confirmLoading = false + that.close() + } else { + that.$message.warning(res.data.message) + that.confirmLoading = false + } + }) } - }).finally(() => { - that.confirmLoading = false - that.close() }) } } diff --git a/jshERP-web/src/views/bill/modules/OtherInModal.vue b/jshERP-web/src/views/bill/modules/OtherInModal.vue index 3577d195..d97c555e 100644 --- a/jshERP-web/src/views/bill/modules/OtherInModal.vue +++ b/jshERP-web/src/views/bill/modules/OtherInModal.vue @@ -230,6 +230,7 @@ this.billStatus = '0' this.currentSelectDepotId = '' this.rowCanEdit = true + this.materialTable.columns[1].type = FormTypes.popupJsh this.changeColumnHide() this.changeFormTypes(this.materialTable.columns, 'snList', 0) this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0) diff --git a/jshERP-web/src/views/bill/modules/OtherOutModal.vue b/jshERP-web/src/views/bill/modules/OtherOutModal.vue index 7b62f21a..35fa15da 100644 --- a/jshERP-web/src/views/bill/modules/OtherOutModal.vue +++ b/jshERP-web/src/views/bill/modules/OtherOutModal.vue @@ -230,6 +230,7 @@ this.billStatus = '0' this.currentSelectDepotId = '' this.rowCanEdit = true + this.materialTable.columns[1].type = FormTypes.popupJsh this.changeColumnHide() this.changeFormTypes(this.materialTable.columns, 'snList', 0) this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)