Commit dbb829aa by 前端

Merge branch 'saas+v4.20.1' of http://192.168.3.233:8090/saas/scrm-micro-inventory into saas+v4.20.1

2 parents 1616c0f3 20a3d3e4
......@@ -261,5 +261,16 @@ export function inventoryWarningList(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, getServicemerchantrefList }
// 获取门店库存列表
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 }
......@@ -28,6 +28,8 @@
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>
</div>
</GLTable>
......@@ -38,6 +40,9 @@
:stockInfo="stockInfo"
v-if="stockMonthVisible"
@dialogClose="dialogClose" />
<stockDetailDialog :visible="stockDetailDialogVisible"
:stockInfo="stockInfo"
v-if="stockDetailDialog" />
</div>
</template>
......@@ -46,10 +51,12 @@ import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js'
import stockMonthDialog from './stockMonthDialog'
import stockDetailDialog from './stockDetailDialog'
export default {
name: 'warehousing',
components: {
stockMonthDialog
stockMonthDialog,
stockDetailDialog
},
data() {
return {
......@@ -66,6 +73,7 @@ export default {
tableSearchForm: {},
stockInfo: {},
stockMonthVisible: false,
stockDetailDialogVisible: false,
showFormData: [
{
label: '商品名称',
......@@ -191,6 +199,10 @@ export default {
resolve()
})
},
handleInventoryDetails(row) {
this.stockInfo = row
this.stockDetailDialogVisible = true
},
// 查看详情
handleDetail(row) {
this.stockInfo = row
......@@ -255,10 +267,12 @@ export default {
<style scoped lang="scss">
@import '@/assets/css/mixin.scss';
.purchase {
.table-header {
@include space-between_center;
margin-bottom: 10px;
h2 {
font-weight: 600;
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!