给商品库存和进销存统计增加库存分布的查看功能
This commit is contained in:
@@ -81,6 +81,9 @@
|
||||
:scroll="scroll"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="showMaterialDepotStockList(record)">{{record.id?'分布':''}}</a>
|
||||
</span>
|
||||
<span slot="customTitle">
|
||||
<a-popover trigger="click" placement="right">
|
||||
<template slot="content">
|
||||
@@ -142,11 +145,13 @@
|
||||
</a-row>
|
||||
</section>
|
||||
<!-- table区域-end -->
|
||||
<material-depot-stock-list-with-time ref="materialDepotStockListWithTime" @ok="modalFormOk"></material-depot-stock-list-with-time>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
<script>
|
||||
import MaterialDepotStockListWithTime from './modules/MaterialDepotStockListWithTime'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import {queryMaterialCategoryTreeList} from '@/api/api'
|
||||
@@ -158,6 +163,7 @@
|
||||
name: "InOutStockReport",
|
||||
mixins:[JeecgListMixin],
|
||||
components: {
|
||||
MaterialDepotStockListWithTime,
|
||||
JEllipsis
|
||||
},
|
||||
data () {
|
||||
@@ -192,7 +198,7 @@
|
||||
totalCountMoneyStr: '0',
|
||||
pageName: 'inOutStockReport',
|
||||
// 默认索引
|
||||
defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','unitName','unitPrice',
|
||||
defDataIndex:['rowIndex','action','barCode','materialName','materialStandard','materialModel','unitName','unitPrice',
|
||||
'prevSum','inSum','outSum','thisSum','thisAllPrice'],
|
||||
// 默认列
|
||||
defColumns: [
|
||||
@@ -202,6 +208,9 @@
|
||||
return (t !== '合计') ? (parseInt(index) + 1) : t
|
||||
}
|
||||
},
|
||||
{title: '库存详情', dataIndex: 'action', align:"center", width: 60,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
},
|
||||
{title: '图片', dataIndex: 'pic', width: 45, scopedSlots: { customRender: 'customPic' }},
|
||||
{title: '条码', dataIndex: 'barCode', sorter: (a, b) => a.barCode - b.barCode, width: 100},
|
||||
{title: '名称', dataIndex: 'materialName', width: 120, ellipsis:true},
|
||||
@@ -312,6 +321,15 @@
|
||||
this.getTotalCountMoney();
|
||||
}
|
||||
},
|
||||
showMaterialDepotStockList(record) {
|
||||
let depotIds = ''
|
||||
if(this.depotSelected && this.depotSelected.length>0) {
|
||||
depotIds = this.depotSelected.join()
|
||||
}
|
||||
this.$refs.materialDepotStockListWithTime.show(record, depotIds, this.queryParam.beginTime, this.queryParam.endTime);
|
||||
this.$refs.materialDepotStockListWithTime.title = "查看进销存统计库存分布(条码:" + record.barCode + ",名称:" + record.materialName + ")";
|
||||
this.$refs.materialDepotStockListWithTime.disableSubmit = false;
|
||||
},
|
||||
exportExcel() {
|
||||
let list = []
|
||||
let mpStr = getMpListShort(Vue.ls.get('materialPropertyList'))
|
||||
|
||||
@@ -111,6 +111,8 @@
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="showMaterialInOutList(record)">{{record.id?'流水':''}}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="showMaterialDepotStockList(record)">{{record.id?'分布':''}}</a>
|
||||
</span>
|
||||
<template slot="customPic" slot-scope="text, record">
|
||||
<a-popover placement="right" trigger="click">
|
||||
@@ -148,12 +150,14 @@
|
||||
</section>
|
||||
<!-- table区域-end -->
|
||||
<material-in-out-list ref="materialInOutList" @ok="modalFormOk"></material-in-out-list>
|
||||
<material-depot-stock-list ref="materialDepotStockList" @ok="modalFormOk"></material-depot-stock-list>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
<script>
|
||||
import MaterialInOutList from './modules/MaterialInOutList'
|
||||
import MaterialDepotStockList from './modules/MaterialDepotStockList'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import {queryMaterialCategoryTreeList} from '@/api/api'
|
||||
@@ -166,6 +170,7 @@
|
||||
mixins:[JeecgListMixin],
|
||||
components: {
|
||||
MaterialInOutList,
|
||||
MaterialDepotStockList,
|
||||
JEllipsis
|
||||
},
|
||||
data () {
|
||||
@@ -207,7 +212,7 @@
|
||||
return (t !== '合计') ? (parseInt(index) + 1) : t
|
||||
}
|
||||
},
|
||||
{title: '库存流水', dataIndex: 'action', align:"center", width: 60,
|
||||
{title: '库存详情', dataIndex: 'action', align:"center", width: 80,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
},
|
||||
{title: '图片', dataIndex: 'pic', width: 45, scopedSlots: { customRender: 'customPic' }},
|
||||
@@ -317,6 +322,15 @@
|
||||
this.$refs.materialInOutList.title = "查看商品库存流水";
|
||||
this.$refs.materialInOutList.disableSubmit = false;
|
||||
},
|
||||
showMaterialDepotStockList(record) {
|
||||
let depotIds = ''
|
||||
if(this.depotSelected && this.depotSelected.length>0) {
|
||||
depotIds = this.depotSelected.join()
|
||||
}
|
||||
this.$refs.materialDepotStockList.show(record, depotIds);
|
||||
this.$refs.materialDepotStockList.title = "查看商品库存分布(条码:" + record.mBarCode + ",名称:" + record.name + ")";
|
||||
this.$refs.materialDepotStockList.disableSubmit = false;
|
||||
},
|
||||
exportExcel() {
|
||||
let list = []
|
||||
let head = '条码,名称,规格,型号,颜色,品牌,制造商,类别,单位,成本价,初始库存,库存,库存金额,重量'
|
||||
|
||||
126
jshERP-web/src/views/report/modules/MaterialDepotStockList.vue
Normal file
126
jshERP-web/src/views/report/modules/MaterialDepotStockList.vue
Normal file
@@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<div ref="container">
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="800"
|
||||
:visible="visible"
|
||||
:getContainer="() => $refs.container"
|
||||
:maskStyle="{'top':'93px','left':'154px'}"
|
||||
:wrapClassName="wrapClassNameInfo()"
|
||||
:mask="isDesktop()"
|
||||
:maskClosable="false"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭"
|
||||
style="top:100px;height: 80%;">
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="handleCancel">取消(ESC)</a-button>
|
||||
</template>
|
||||
<!-- table区域-begin -->
|
||||
<a-table
|
||||
bordered
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:components="handleDrag(columns)"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
</a-table>
|
||||
<!-- table区域-end -->
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
|
||||
export default {
|
||||
name: "MaterialDepotStockList",
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
JEllipsis
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
visible: false,
|
||||
disableMixinCreated: true,
|
||||
toFromType: '',
|
||||
currentMaterialId: '',
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
depotIds: '',
|
||||
materialId:'',
|
||||
},
|
||||
ipagination:{
|
||||
pageSizeOptions: ['10', '20', '30', '100', '200']
|
||||
},
|
||||
tabKey: "1",
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'rowIndex',
|
||||
width:40,
|
||||
align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{ title: '仓库名称', dataIndex: 'depotName', width: 200},
|
||||
{ title: '库存数量', dataIndex: 'currentNumber', width: 100},
|
||||
{ title: '成本价', dataIndex: 'unitPrice', width: 100},
|
||||
{ title: '库存金额', dataIndex: 'allPrice', width: 100}
|
||||
],
|
||||
labelCol: {
|
||||
xs: { span: 1 },
|
||||
sm: { span: 2 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 10 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
url: {
|
||||
list: "/material/getMaterialDepotStock"
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
getQueryParams() {
|
||||
let param = Object.assign({}, this.queryParam, this.isorter)
|
||||
param.field = this.getQueryField()
|
||||
param.materialId = this.currentMaterialId
|
||||
param.currentPage = this.ipagination.current
|
||||
param.pageSize = this.ipagination.pageSize
|
||||
return param
|
||||
},
|
||||
show(record, depotIds) {
|
||||
this.model = Object.assign({}, record);
|
||||
this.currentMaterialId = record.id
|
||||
this.visible = true;
|
||||
this.queryParam.depotIds = depotIds
|
||||
this.queryParam.materialId = record.id
|
||||
this.loadData(1)
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
onDateOk(value) {
|
||||
console.log(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<div ref="container">
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="800"
|
||||
:visible="visible"
|
||||
:getContainer="() => $refs.container"
|
||||
:maskStyle="{'top':'93px','left':'154px'}"
|
||||
:wrapClassName="wrapClassNameInfo()"
|
||||
:mask="isDesktop()"
|
||||
:maskClosable="false"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭"
|
||||
style="top:100px;height: 80%;">
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="handleCancel">取消(ESC)</a-button>
|
||||
</template>
|
||||
<!-- table区域-begin -->
|
||||
<a-table
|
||||
bordered
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:components="handleDrag(columns)"
|
||||
pagination="false"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
</a-table>
|
||||
<!-- table区域-end -->
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
|
||||
export default {
|
||||
name: "MaterialDepotStockListWithTime",
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
JEllipsis
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
visible: false,
|
||||
disableMixinCreated: true,
|
||||
toFromType: '',
|
||||
currentMaterialId: '',
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
depotIds: '',
|
||||
materialId:'',
|
||||
unitPrice:'',
|
||||
beginTime:'',
|
||||
endTime:'',
|
||||
},
|
||||
ipagination:{
|
||||
pageSizeOptions: ['10', '20', '30', '100', '200']
|
||||
},
|
||||
tabKey: "1",
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'rowIndex',
|
||||
width:40,
|
||||
align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{ title: '仓库名称', dataIndex: 'depotName', width: 200},
|
||||
{ title: '库存数量', dataIndex: 'currentNumber', width: 100},
|
||||
{ title: '成本价', dataIndex: 'unitPrice', width: 100},
|
||||
{ title: '库存金额', dataIndex: 'allPrice', width: 100}
|
||||
],
|
||||
labelCol: {
|
||||
xs: { span: 1 },
|
||||
sm: { span: 2 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 10 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
url: {
|
||||
list: "/depotItem/getMaterialDepotStockByParam"
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
getQueryParams() {
|
||||
let param = Object.assign({}, this.queryParam, this.isorter)
|
||||
param.field = this.getQueryField()
|
||||
param.materialId = this.currentMaterialId
|
||||
param.currentPage = this.ipagination.current
|
||||
param.pageSize = this.ipagination.pageSize
|
||||
return param
|
||||
},
|
||||
show(record, depotIds, beginTime, endTime) {
|
||||
this.model = Object.assign({}, record);
|
||||
this.currentMaterialId = record.id
|
||||
this.visible = true;
|
||||
this.queryParam.depotIds = depotIds
|
||||
this.queryParam.materialId = record.id
|
||||
this.queryParam.unitPrice = record.unitPrice
|
||||
this.queryParam.beginTime = beginTime
|
||||
this.queryParam.endTime = endTime
|
||||
this.loadData(1)
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
onDateOk(value) {
|
||||
console.log(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
</style>
|
||||
Reference in New Issue
Block a user