从页面对接接口:批量新增入库或出库单据

This commit is contained in:
季圣华
2023-12-10 14:42:59 +08:00
parent 92e92f5a64
commit da847f0388
2 changed files with 19 additions and 2 deletions

View File

@@ -106,6 +106,7 @@ const findBySelectOrgan = (params)=>postAction("/supplier/findBySelect_organ",pa
//单据相关 //单据相关
const findBillDetailByNumber = (params)=>getAction("/depotHead/getDetailByNumber",params); const findBillDetailByNumber = (params)=>getAction("/depotHead/getDetailByNumber",params);
const waitBillCount = (params)=>getAction("/depotHead/waitBillCount",params); const waitBillCount = (params)=>getAction("/depotHead/waitBillCount",params);
const batchAddDepotHeadAndDetail = (params)=>postAction("/depotHead/batchAddDepotHeadAndDetail",params);
const findStockByDepotAndBarCode = (params)=>getAction("/depotItem/findStockByDepotAndBarCode",params); const findStockByDepotAndBarCode = (params)=>getAction("/depotItem/findStockByDepotAndBarCode",params);
const getBatchNumberList = (params)=>getAction("/depotItem/getBatchNumberList",params); const getBatchNumberList = (params)=>getAction("/depotItem/getBatchNumberList",params);
const findFinancialDetailByNumber = (params)=>getAction("/accountHead/getDetailByNumber",params); const findFinancialDetailByNumber = (params)=>getAction("/accountHead/getDetailByNumber",params);
@@ -196,6 +197,7 @@ export {
findBySelectOrgan, findBySelectOrgan,
findBillDetailByNumber, findBillDetailByNumber,
waitBillCount, waitBillCount,
batchAddDepotHeadAndDetail,
findStockByDepotAndBarCode, findStockByDepotAndBarCode,
getBatchNumberList, getBatchNumberList,
findFinancialDetailByNumber findFinancialDetailByNumber

View File

@@ -90,7 +90,7 @@
import BillDetail from './BillDetail' import BillDetail from './BillDetail'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import {mixinDevice} from '@/utils/mixin' import {mixinDevice} from '@/utils/mixin'
import { findBillDetailByNumber } from '@/api/api' import { findBillDetailByNumber, batchAddDepotHeadAndDetail } from '@/api/api'
export default { export default {
name: 'BatchWaitBillList', name: 'BatchWaitBillList',
mixins:[JeecgListMixin, mixinDevice], mixins:[JeecgListMixin, mixinDevice],
@@ -196,10 +196,25 @@
this.loadData(1); this.loadData(1);
}, },
handleBatchInOut() { handleBatchInOut() {
const that = this
if (this.selectedRowKeys.length <= 0) { if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!') this.$message.warning('请选择一条记录!')
} else { } else {
let ids = "";
for (let i = 0; i < this.selectedRowKeys.length; i++) {
ids += this.selectedRowKeys[i] + ",";
}
that.confirmLoading = true
batchAddDepotHeadAndDetail({'ids': ids}).then((res)=>{
if(res.code === 200){
that.$emit('ok')
}else{
that.$message.warning(res.data.message)
}
}).finally(() => {
that.confirmLoading = false
that.close()
})
} }
} }
} }