Commit e83bb7d7 by 张晓玮

Merge branch 'v4.26.0' into 'develop'

V4.26.0

See merge request !9
2 parents 7ddc4bfd da35bc61
......@@ -322,4 +322,16 @@ export function checkShipper(params) {
returnAll: true
})
}
export default { inventoryWarningList, exportaInventExcel, exportaAllocateExcel, exportCheckExcel, exportReduceExcel, exportMerchantExcel, exportExcel, saveStockAllocate, stockAllocateDetailPage, stockAllocatePage, yqRelatedList, saveStockCheck, stockRemainPage, stockCheckDetailPage, stockCheckPage, getMerchantGoodsStockCount, getMerchantGoodsStockReduceRecord, getReportByGoods, getyqMerchantList, getGoodsWarehousingCount, getGoodsWarehousingList, getMerchantGoodsStockMonthCount, getMerchantGoodsStockMonthReport, merchantShopGoodsStockPage, getServicemerchantrefList, checkShipper }
// 库存对账单导出
export function exportStatementOfAccount(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smartcarlife.merchantShopGoodsStock.statement.export`
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, getMerchantGoodsStockCount, getMerchantGoodsStockReduceRecord, getReportByGoods, getyqMerchantList, getGoodsWarehousingCount, getGoodsWarehousingList, getMerchantGoodsStockMonthCount, getMerchantGoodsStockMonthReport, merchantShopGoodsStockPage, getServicemerchantrefList, checkShipper, exportStatementOfAccount }
......@@ -10,7 +10,7 @@ html {
.purchase .container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
}
......
......@@ -295,7 +295,7 @@ export default {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.reduceDate) {
params.reduceStartDateStr = dayjs(this.searchForm.reduceDate[0]).format('YYYY-MM-DD HH:mm:ss')
params.reduceEndDateStr = dayjs(this.searchForm.reduceDate[0]).format('YYYY-MM-DD') + ' 23:59:59'
params.reduceEndDateStr = dayjs(this.searchForm.reduceDate[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.reduceDate
return params
......
......@@ -7,7 +7,10 @@
合计:当前库存
<span class="txt-blue">{{ totalInventory || '0' }}</span>
</div>
<el-button size="small" @click="exportExcel">导出</el-button>
<div>
<GLButton type="primary" plain size="small" @click="handleStatementOfAccount" fn="库存对账单">库存对账单</GLButton>
<el-button size="small" @click="exportExcel">导出</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
......@@ -22,6 +25,12 @@
<!-- 查看 -->
<stock-month-dialog :stock-month-visible="stockMonthVisible" :stockInfo="stockInfo" v-if="stockMonthVisible" @dialogClose="dialogClose" />
<stockDetailDialog :visible.sync="stockDetailDialogVisible" :recordInfo="stockInfo" v-if="stockDetailDialogVisible" />
<!-- 库存对账单 -->
<statementOfAccountDialog
:visible.sync="statementOfAccountDialogVisible"
v-if="statementOfAccountDialogVisible"
:yqMerchantList="baseData.yqMerchantList"
@handleRelateProConfirm="handleRelateProConfirm"></statementOfAccountDialog>
</div>
</template>
......@@ -31,11 +40,13 @@ import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js'
import stockMonthDialog from './stockMonthDialog'
import stockDetailDialog from './stockDetailDialog'
import statementOfAccountDialog from './statementOfAccountDialog'
export default {
name: 'warehousing',
components: {
stockMonthDialog,
stockDetailDialog
stockDetailDialog,
statementOfAccountDialog
},
data() {
return {
......@@ -54,6 +65,7 @@ export default {
stockInfo: {},
stockMonthVisible: false,
stockDetailDialogVisible: false,
statementOfAccountDialogVisible: false,
showFormData: [
{
label: '商品名称',
......@@ -171,7 +183,7 @@ export default {
// 获取当前登录账号可见的园区店列表
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.baseData.yqMerchantList = res || []
this.getOptionsList('showFormData')
})
this.getMerchantGoodsStockMonthCount()
......@@ -198,6 +210,18 @@ export default {
console.log(this.stockInfo)
this.stockDetailDialogVisible = true
},
// 库存对账单
handleStatementOfAccount() {
this.statementOfAccountDialogVisible = true
},
handleRelateProConfirm(data) {
this.exportLoading = true
var params = data
this.$apis.stockManage.exportStatementOfAccount(params).then(res => {
this.statementOfAccountDialogVisible = false
window.location.href = res
})
},
// 查看详情
handleDetail(row) {
this.stockInfo = row
......
<!-- 库存对账单弹窗 -->
<template>
<GLDialog title="库存对账单" :visible.sync="dialogVisible" class="statementOfAccountDialog" :destroy-on-close="true" :close-on-click-modal="false" :before-close="handleClose" @onOk="handleConfirm" @onCancel="handleClose">
<el-form ref="statementOfAccountForm" :model="dataForm" :rules="formRules" label-width="154px" size="small">
<el-form-item label="时间:" prop="dataMonthStr">
<el-date-picker
v-model="dataForm.dataMonthStr"
type="month"
:clearable="false"
value-format="yyyy-MM"
:append-to-body="false"
format="yyyy-MM"
class="form-node"
placeholder="选择时间"
popper-class="statement-of-account-month-picker"
:picker-options="beforeRangePickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="仓库:" prop="yqMerchantId">
<el-select v-model="dataForm.yqMerchantId" class="form-node" filterable @change="yqMerchantIdChange" placeholder="请选择仓库">
<el-option v-for="(subItem, subIndex) in stockList" :key="subIndex" :value="subItem.merchantNo" :label="subItem.merchantName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="门店:" prop="merchantId">
<el-select v-model="dataForm.merchantId" class="form-node" filterable placeholder="请选择门店">
<el-option v-for="(subItem, subIndex) in merchantList" :key="subIndex" :value="subItem.merchantId" :label="subItem.merchantName"></el-option>
</el-select>
</el-form-item>
</el-form>
</GLDialog>
</template>
<script>
import { beforeRangePickerOptions } from '@/components/glsx-combi-form/common'
import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'statementOfAccountDialog',
props: {
visible: {
type: Boolean,
default: false
},
yqMerchantList: {
type: Array,
default: () => []
}
},
data() {
return {
beforeRangePickerOptions,
dataForm: {
dataMonthStr: '',
yqMerchantId: '',
merchantId: ''
},
membraneTypeList: membraneTypeList,
formRules: {
dataMonthStr: [{ required: true, message: '请选择时间', trigger: 'change' }],
yqMerchantId: [{ required: true, message: '请选择仓库', trigger: 'change' }],
merchantId: [{ required: true, message: '请选择门店', trigger: 'change' }]
},
merchantList: []
}
},
computed: {
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
},
stockList: {
get() {
let list = this.$common.utils.deepClone(this.yqMerchantList) || []
if (list[0]?.merchantName == '全部') {
list.shift()
}
return list
}
}
},
mounted() {
this.$nextTick(() => {
this.$refs['statementOfAccountForm'] && this.$refs['statementOfAccountForm'].resetFields()
})
},
methods: {
// 门店
merchantSelectFocus() {
if (!this.dataForm?.yqMerchantId) return this.$message.error('请先选择仓库')
},
// 仓库
yqMerchantIdChange(e) {
this.dataForm.merchantId = ''
this.merchantList = []
this.$nextTick(() => {
this.$refs['statementOfAccountForm'].clearValidate()
})
let _headOffice = {}
_headOffice = this.stockList.find(item => item.merchantNo === e)
_headOffice.merchantId = _headOffice.merchantNo
// 获取仓库下的门店列表
this.$apis.stockManage.getServicemerchantrefList({
yqMerchantId: e
}).then(res => {
this.merchantList = res || []
this.merchantList.push(_headOffice) // 园区店可选择自己
})
},
handleClose() {
this.dialogVisible = false
},
handleConfirm() {
this.$refs['statementOfAccountForm'].validate(valid => {
if (valid) {
this.$emit('handleRelateProConfirm', this.dataForm)
}
})
}
}
}
</script>
<style scoped lang="scss">
.statementOfAccountDialog{
.form-node{
width: 432px;
}
}
</style>
<style lang="scss">
.statement-of-account-month-picker {
.el-picker-panel__body-wrapper .el-picker-panel__body .el-picker-panel__content .el-month-table td.current:not(.disabled) .cell {
color: #fff;
background: #5850ff;
border-radius: 18px;
}
.el-month-table td.today .cell{
color: #5850ff;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!