Commit 9503659f by 张立顺

库存列表明细

1 parent 1834f280
...@@ -251,5 +251,16 @@ export function inventoryWarningList(params) { ...@@ -251,5 +251,16 @@ export function inventoryWarningList(params) {
sign: true sign: true
}) })
} }
export default { inventoryWarningList, exportaInventExcel, exportaAllocateExcel, exportCheckExcel, exportReduceExcel, exportMerchantExcel, exportExcel, saveStockAllocate, stockAllocateDetailPage, stockAllocatePage, yqRelatedList, saveStockCheck, stockRemainPage, stockCheckDetailPage, stockCheckPage, getMerchantGoodsStockReduceRecord, getReportByGoods, getyqMerchantList, getGoodsWarehousingList, getMerchantGoodsStockMonthReport }
\ No newline at end of file \ No newline at end of file
// 获取门店库存列表
export function merchantShopGoodsStockPage(data) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}merchantShopGoodsStock.page`
// return request(data, RequestMethods.POST)
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { inventoryWarningList, exportaInventExcel, exportaAllocateExcel, exportCheckExcel, exportReduceExcel, exportMerchantExcel, exportExcel, saveStockAllocate, stockAllocateDetailPage, stockAllocatePage, yqRelatedList, saveStockCheck, stockRemainPage, stockCheckDetailPage, stockCheckPage, getMerchantGoodsStockReduceRecord, getReportByGoods, getyqMerchantList, getGoodsWarehousingList, getMerchantGoodsStockMonthReport,merchantShopGoodsStockPage }
\ No newline at end of file \ No newline at end of file
...@@ -2,22 +2,28 @@ ...@@ -2,22 +2,28 @@
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>库存列表</h2> <h2>库存列表</h2>
<el-button type="primary" size="small" @click="exportExcel">导出</el-button> <el-button type="primary" size="small" @click="exportExcel">导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="stockRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="stockRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleInventoryDetails(scope.scope)">库存明细</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 查看 --> <!-- 查看 -->
<stock-month-dialog :stock-month-visible="stockMonthVisible" :stockInfo="stockInfo" v-if="stockMonthVisible" @dialogClose="dialogClose" /> <stock-month-dialog :stock-month-visible="stockMonthVisible" :stockInfo="stockInfo" v-if="stockMonthVisible"
@dialogClose="dialogClose" />
<stockDetailDialog :visible="stockDetailDialogVisible" :stockInfo="stockInfo" v-if="stockDetailDialog" />
</div> </div>
</template> </template>
...@@ -26,10 +32,12 @@ import * as dayjs from 'dayjs' ...@@ -26,10 +32,12 @@ import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js' import { membraneTypeList } from '@/utils/constants.js'
import stockMonthDialog from './stockMonthDialog' import stockMonthDialog from './stockMonthDialog'
import stockDetailDialog from './stockDetailDialog'
export default { export default {
name: 'warehousing', name: 'warehousing',
components: { components: {
stockMonthDialog stockMonthDialog,
stockDetailDialog
}, },
data() { data() {
return { return {
...@@ -46,6 +54,7 @@ export default { ...@@ -46,6 +54,7 @@ export default {
tableSearchForm: {}, tableSearchForm: {},
stockInfo: {}, stockInfo: {},
stockMonthVisible: false, stockMonthVisible: false,
stockDetailDialogVisible: false,
showFormData: [ showFormData: [
{ {
label: '商品名称', label: '商品名称',
...@@ -171,6 +180,10 @@ export default { ...@@ -171,6 +180,10 @@ export default {
resolve() resolve()
}) })
}, },
handleInventoryDetails() {
this.stockInfo = row
this.stockDetailDialogVisible = true
},
// 查看详情 // 查看详情
handleDetail(row) { handleDetail(row) {
this.stockInfo = row this.stockInfo = row
...@@ -235,10 +248,12 @@ export default { ...@@ -235,10 +248,12 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/mixin.scss'; @import '@/assets/css/mixin.scss';
.purchase { .purchase {
.table-header { .table-header {
@include space-between_center; @include space-between_center;
margin-bottom: 10px; margin-bottom: 10px;
h2 { h2 {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
......
<!-- 库存明细弹窗 -->
<template>
<GLDialog bigTitle="库存明细" :is-visible="dialogVisible" class="stockMonthDailog" width="30%" :no-cancel="true" okText="关闭"
@onOk="handleClose" @onCancel="handleClose">
<div>
<div class="d2-container-content">
<GLTable ref="recordTable" :get-list-api="getListApi" :search-form="searchForm" :table-params="tableParams"
:pageConf="pageConf">
</GLTable>
</div>
</div>
</GLDialog>
</template>
<script>
// import { mapActions, mapState } from 'vuex'
// import { merchantShopGoodsStockPage } from '@api/stockManage'
import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'StockDetailDialog',
props: {
visible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
data() {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: membraneTypeList,
searchForm: {
upgradeGoodsId: '',
yqMerchantId: ''
},
getListApi: this.$apis.stockManage.merchantShopGoodsStockPage, tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// tableOption: false,
tableColumns: [
{
label: '门店',
prop: 'merchantName',
width: '200px'
},
{
label: '当前库存',
prop: 'stock',
// width: ''
formatter: (cellValue) => {
return (cellValue.stock || cellValue.stock == 0) ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
}
]
}
}
},
computed: {
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
mounted() {
if (this.recordInfo) {
this.searchForm.yqMerchantId = this.recordInfo.yqMerchantId
this.searchForm.upgradeGoodsId = this.recordInfo.upgradeGoodsId
}
},
methods: {
handleClose() {
this.dialogVisible = false
}
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.stockMonthDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
.stockMonthDailog .btn-tips img {
width: 18px;
height: 15px;
margin-right: 9px;
vertical-align: bottom;
}
.stockMonthDailog .btn-tips {
display: inline-block;
font-size: 12px;
height: 14px;
line-height: 14px;
background-color: #fff2e5;
color: #999999;
margin-right: 24px;
padding: 6.5px 10px;
}
.show-search {
margin-left: -65px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!