增加批量待入库和批量待出库操作界面

This commit is contained in:
季圣华 2023-12-08 00:43:22 +08:00
parent 14dfa33982
commit bb1b20444d
5 changed files with 287 additions and 6 deletions

View File

@ -105,6 +105,7 @@ const findBySelectRetail = (params)=>postAction("/supplier/findBySelect_retail",
const findBySelectOrgan = (params)=>postAction("/supplier/findBySelect_organ",params);
//单据相关
const findBillDetailByNumber = (params)=>getAction("/depotHead/getDetailByNumber",params);
const waitBillCount = (params)=>getAction("/depotHead/waitBillCount",params);
const findStockByDepotAndBarCode = (params)=>getAction("/depotItem/findStockByDepotAndBarCode",params);
const getBatchNumberList = (params)=>getAction("/depotItem/getBatchNumberList",params);
const findFinancialDetailByNumber = (params)=>getAction("/accountHead/getDetailByNumber",params);
@ -194,6 +195,7 @@ export {
findBySelectRetail,
findBySelectOrgan,
findBillDetailByNumber,
waitBillCount,
findStockByDepotAndBarCode,
getBatchNumberList,
findFinancialDetailByNumber

View File

@ -52,7 +52,7 @@
<a-col :md="6" :sm="24">
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
<a-select-option v-for="(depot,index) in depotList" :value="depot.id">
<a-select-option v-for="(depot,index) in depotList" :key="index" :value="depot.id">
{{ depot.depotName }}
</a-select-option>
</a-select>
@ -92,6 +92,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="inOutManageFlag && btnEnableList.indexOf(1)>-1" @click="handleWaitBill" icon="link">待入库({{waitTotal}})</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="delete" @click="batchDel">删除</a-button>
<a-button v-if="checkFlag && btnEnableList.indexOf(2)>-1" icon="check" @click="batchSetStatus(1)">审核</a-button>
<a-button v-if="checkFlag && btnEnableList.indexOf(7)>-1" icon="stop" @click="batchSetStatus(0)">反审核</a-button>
@ -161,6 +162,7 @@
<other-in-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></other-in-modal>
<bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
<bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe>
<batch-wait-bill-list ref="batchWaitBill" @ok="modalFormOk" @close="waitModalFormClose"></batch-wait-bill-list>
</a-card>
</a-col>
</a-row>
@ -170,6 +172,7 @@
import OtherInModal from './modules/OtherInModal'
import BillDetail from './dialog/BillDetail'
import BillExcelIframe from '@/components/tools/BillExcelIframe'
import BatchWaitBillList from './dialog/BatchWaitBillList'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { BillListMixin } from './mixins/BillListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
@ -182,6 +185,7 @@
OtherInModal,
BillDetail,
BillExcelIframe,
BatchWaitBillList,
JEllipsis,
JDate
},
@ -201,6 +205,8 @@
remark: ""
},
prefixNo: 'QTRK',
//出入库管理开关适合独立仓管场景
inOutManageFlag: false,
labelCol: {
span: 5
},
@ -246,13 +252,36 @@
},
computed: {
},
created () {
created() {
this.initSystemConfig()
this.initSupplier()
this.getDepotData()
this.initUser()
this.initWaitBillCount('入库', '采购,销售退货', '1,3')
},
methods: {
searchQuery() {
this.loadData(1)
if(this.inOutManageFlag) {
this.initWaitBillCount('入库', '采购,销售退货', '1,3')
}
},
searchReset() {
this.queryParam = {}
this.loadData(1)
if(this.inOutManageFlag) {
this.initWaitBillCount('入库', '采购,销售退货', '1,3')
}
},
//待入库
handleWaitBill() {
this.$refs.batchWaitBill.show('入库', '采购,销售退货', "1,3")
this.$refs.batchWaitBill.title = "批量选择采购入库或销售退货"
},
waitModalFormClose() {
this.loadData()
this.initWaitBillCount('入库', '采购,销售退货', '1,3')
},
}
}
</script>

View File

@ -52,7 +52,7 @@
<a-col :md="6" :sm="24">
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
<a-select-option v-for="(depot,index) in depotList" :value="depot.id">
<a-select-option v-for="(depot,index) in depotList" :key="index" :value="depot.id">
{{ depot.depotName }}
</a-select-option>
</a-select>
@ -92,6 +92,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="inOutManageFlag && btnEnableList.indexOf(1)>-1" @click="handleWaitBill" icon="link">待出库({{waitTotal}})</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="delete" @click="batchDel">删除</a-button>
<a-button v-if="checkFlag && btnEnableList.indexOf(2)>-1" icon="check" @click="batchSetStatus(1)">审核</a-button>
<a-button v-if="checkFlag && btnEnableList.indexOf(7)>-1" icon="stop" @click="batchSetStatus(0)">反审核</a-button>
@ -161,6 +162,7 @@
<other-out-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></other-out-modal>
<bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
<bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe>
<batch-wait-bill-list ref="batchWaitBill" @ok="modalFormOk" @close="waitModalFormClose"></batch-wait-bill-list>
</a-card>
</a-col>
</a-row>
@ -170,6 +172,7 @@
import OtherOutModal from './modules/OtherOutModal'
import BillDetail from './dialog/BillDetail'
import BillExcelIframe from '@/components/tools/BillExcelIframe'
import BatchWaitBillList from './dialog/BatchWaitBillList'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { BillListMixin } from './mixins/BillListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
@ -182,6 +185,7 @@
OtherOutModal,
BillDetail,
BillExcelIframe,
BatchWaitBillList,
JEllipsis,
JDate
},
@ -201,6 +205,8 @@
remark: ""
},
prefixNo: 'QTCK',
//出入库管理开关适合独立仓管场景
inOutManageFlag: false,
labelCol: {
span: 5
},
@ -251,8 +257,31 @@
this.initCustomer()
this.getDepotData()
this.initUser()
this.initWaitBillCount('出库', '销售,采购退货', '1,3')
},
methods: {
searchQuery() {
this.loadData(1)
if(this.inOutManageFlag) {
this.initWaitBillCount('出库', '销售,采购退货', '1,3')
}
},
searchReset() {
this.queryParam = {}
this.loadData(1)
if(this.inOutManageFlag) {
this.initWaitBillCount('出库', '销售,采购退货', '1,3')
}
},
//待出库
handleWaitBill() {
this.$refs.batchWaitBill.show('出库', '销售,采购退货', "1,3")
this.$refs.batchWaitBill.title = "批量选择销售出库或采购退货"
},
waitModalFormClose() {
this.loadData()
this.initWaitBillCount('出库', '销售,采购退货', '1,3')
},
}
}
</script>

View File

@ -0,0 +1,211 @@
<template>
<div ref="container">
<a-modal
:title="title"
:width="1250"
:visible="visible"
:getContainer="() => $refs.container"
:maskStyle="{'top':'93px','left':'154px'}"
:wrapClassName="wrapClassNameInfo()"
:mask="isDesktop()"
:maskClosable="false"
@cancel="handleCancel"
style="top:20px;height: 95%;">
<template slot="footer">
<a-button key="back" @click="handleCancel">取消</a-button>
</template>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="24">
<a-form-item label="单据编号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="请输入单据编号查询" v-model="queryParam.number"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="商品信息" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="条码|名称|规格|型号" v-model="queryParam.materialParam"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker
style="width: 100%"
v-model="queryParam.createTimeRange"
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
@change="onDateChange"
@ok="onDateOk"
/>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<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>
</div>
<!-- table区域-begin -->
<a-table
bordered
ref="table"
size="middle"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="numberCustomRender" slot-scope="text, record">
<a v-if="!queryParam.purchaseStatus" @click="myHandleDetail(record)">{{record.number}}</a>
<span v-if="queryParam.purchaseStatus">{{record.number}}</span>
</span>
<template slot="customRenderStatus" slot-scope="text, record">
<template>
<a-tag v-if="record.status === '1'" color="green">已审核</a-tag>
<a-tag v-if="record.status === '3' && queryParam.type === '入库'" color="blue">部分入库</a-tag>
<a-tag v-if="record.status === '3' && queryParam.type === '出库'" color="blue">部分出库</a-tag>
</template>
</template>
</a-table>
<!-- table区域-end -->
<!-- 表单区域 -->
<bill-detail ref="billDetail"></bill-detail>
</a-modal>
</div>
</template>
<script>
import BillDetail from './BillDetail'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import {mixinDevice} from '@/utils/mixin'
import { findBillDetailByNumber } from '@/api/api'
export default {
name: 'BatchWaitBillList',
mixins:[JeecgListMixin, mixinDevice],
components: {
BillDetail
},
data () {
return {
title: "操作",
visible: false,
disableMixinCreated: true,
selectedRowKeys: [],
selectBillRows: [],
linkNumber: '',
organId: '',
remark: '',
queryParam: {
number: "",
materialParam: "",
type: "",
subType: "",
status: ""
},
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
// 表头
columns: [
{ title: '', dataIndex: 'organName',width:120, ellipsis:true},
{ title: '单据编号', dataIndex: 'number',width:130,
scopedSlots: { customRender: 'numberCustomRender' },
},
{ title: '商品信息', dataIndex: 'materialsList',width:280, ellipsis:true,
customRender:function (text,record,index) {
if(text) {
return text.replace(",","");
}
}
},
{ title: '单据日期', dataIndex: 'operTimeStr',width:145},
{ title: '操作员', dataIndex: 'userName',width:70},
{ title: '数量', dataIndex: 'materialCount',width:60},
{ title: '状态', dataIndex: 'status', width: 70, align: "center",
scopedSlots: { customRender: 'customRenderStatus' }
}
],
dataSource:[],
url: {
list: "/depotHead/waitBillList"
}
}
},
created() {
},
methods: {
show(type, subType, status) {
this.queryParam.type = type
this.queryParam.subType = subType
this.queryParam.status = status
this.columns[0].title = '供应商或客户'
this.model = Object.assign({}, {});
this.visible = true;
this.loadData(1)
},
myHandleDetail(record) {
findBillDetailByNumber({ number: record.number }).then((res) => {
if (res && res.code === 200) {
let type = res.data.depotHeadType
type = type.replace('其它','')
this.$refs.billDetail.show(res.data, type)
this.$refs.billDetail.title=type+"-详情"
}
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleCancel () {
this.close()
},
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
onDateChange: function (value, dateString) {
this.queryParam.beginTime=dateString[0];
this.queryParam.endTime=dateString[1];
},
onDateOk(value) {
console.log(value);
},
searchReset() {
this.queryParam = {
type: this.queryParam.type,
subType: this.queryParam.subType,
status: "1,3"
}
this.loadData(1);
},
handleBatchInOut() {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录')
} else {
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -1,7 +1,7 @@
import Vue from 'vue'
import {getAction } from '@/api/manage'
import { FormTypes } from '@/utils/JEditableTableUtil'
import {findBillDetailByNumber, findBySelectSup, findBySelectCus, findBySelectRetail, getUserList, getAccount,
import {findBillDetailByNumber, findBySelectSup, findBySelectCus, findBySelectRetail, getUserList, getAccount, waitBillCount,
getCurrentSystemConfig, getPlatformConfigByKey} from '@/api/api'
import { getCheckFlag } from "@/utils/util"
@ -12,6 +12,7 @@ export const BillListMixin = {
checkFlag: true,
/* 单据Excel是否开启 */
isShowExcel: false,
waitTotal: 0,
billExcelUrl: '',
supList: [],
cusList: [],
@ -121,6 +122,7 @@ export const BillListMixin = {
let multiBillType = res.data.multiBillType
let multiLevelApprovalFlag = res.data.multiLevelApprovalFlag
this.checkFlag = getCheckFlag(multiBillType, multiLevelApprovalFlag, this.prefixNo)
this.inOutManageFlag = res.data.inOutManageFlag==='1'?true:false
}
})
getPlatformConfigByKey({ "platformKey": "bill_excel_url" }).then((res) => {
@ -174,8 +176,16 @@ export const BillListMixin = {
initAccount() {
getAccount({}).then((res)=>{
if(res && res.code === 200) {
let list = res.data.accountList
this.accountList = list
this.accountList = res.data.accountList
}
})
},
initWaitBillCount(type, subType, status) {
waitBillCount({search: {
type: type, subType: subType, status: status
}}).then((res)=>{
if(res && res.code === 200) {
this.waitTotal = res.data.total
}
})
},