完善批量待入库和待出库界面

This commit is contained in:
季圣华
2023-12-10 23:31:55 +08:00
parent 5962e00b92
commit 4237ec555f
5 changed files with 121 additions and 17 deletions

View File

@@ -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")

View File

@@ -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")

View File

@@ -53,7 +53,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleBatchInOut" type="primary" icon="plus">批量{{queryParam.type}}</a-button>
<span style="padding-left:10px">注意:序列号批号商品不能批量{{queryParam.type}},需要到新增界面关联单据</span>
<span style="padding-left:10px">注意:含有序列号批号商品或部分入库状态不能批量{{queryParam.type}},需要到新增界面关联单据</span>
</div>
<!-- table区域-begin -->
<a-table
@@ -103,7 +103,6 @@
visible: false,
disableMixinCreated: true,
selectedRowKeys: [],
selectBillRows: [],
linkNumber: '',
organId: '',
remark: '',
@@ -200,20 +199,27 @@
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!')
} else {
this.$confirm({
title: "确认批量操作",
content: "是否批量操作选中的单据?",
onOk: function () {
let ids = "";
for (let i = 0; i < this.selectedRowKeys.length; i++) {
ids += this.selectedRowKeys[i] + ",";
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){
batchAddDepotHeadAndDetail({ 'ids': ids }).then((res) => {
if (res.code === 200) {
that.$emit('ok')
}else{
that.$message.warning(res.data.message)
}
}).finally(() => {
that.selectedRowKeys = []
that.confirmLoading = false
that.close()
} else {
that.$message.warning(res.data.message)
that.confirmLoading = false
}
})
}
})
}
}

View File

@@ -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)

View File

@@ -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)