Commit 436bf37e by 前端

Merge branch 'v4.22.1' into 'master'

V4.22.1

See merge request !7
2 parents 64dd26f9 2041285a
import { http } from '@/main'
// 分页查询库存管理-权益卡
const getListApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.stock.vdCard.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 统计库存管理-权益卡
const getStockVdCard = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.stock.vdCard.count`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 库存管理-权益卡导出)
const exportExcel = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smartcarlife.stock.vdCard.export`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getListApi, getStockVdCard, exportExcel }
...@@ -35,4 +35,7 @@ cursor: pointer; ...@@ -35,4 +35,7 @@ cursor: pointer;
background: url(../../images/shoppingCarIcon.webp) no-repeat; background: url(../../images/shoppingCarIcon.webp) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
margin-right: 4px; margin-right: 4px;
}
.txt-blue {
color: #5850ff
} }
\ No newline at end of file \ No newline at end of file
<template>
<div class="equity">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<div>
总数量:
<span class="txt-blue">{{ stockData.count }}</span>
,待激活数量:
<span class="txt-blue">{{ stockData.waitActivationCount }}</span>
,已激活数量:
<span class="txt-blue">{{ stockData.activatedCount }}</span>
</div>
<el-button size="small" @click="exportExcel">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="equityRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'equity',
data() {
return {
stockData: {},
size: 'small',
url: url,
searchForm: {
vdCardCodeLike: '',
businessCodeLike: '',
deliveryNumberLike: '',
merchantName: '',
activationBusinessCodeLike: '',
cardStatus: '',
activationMerchantName: '',
activationCustomerName: '',
activationCustomerPhoneLike: ''
},
showFormData: [
{
label: '卡号',
name: 'vdCardCodeLike',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '关联业务单号',
name: 'businessCodeLike',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '关联发货单号',
name: 'deliveryNumberLike',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '所属商户',
name: 'merchantName',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '激活业务单号',
name: 'activationBusinessCodeLike',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '状态',
name: 'cardStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'cardStatusList'
},
{
label: '激活门店',
name: 'activationMerchantName',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '激活客户',
name: 'activationCustomerName',
type: 'input',
isClear: true
},
{
label: '客户手机号',
name: 'activationCustomerPhoneLike',
type: 'input',
isClear: true
}
],
// 表格
getListApi: this.$apis.equity.getListApi,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '卡号',
prop: 'vdCardCode',
width: 180
},
{
label: '入库时间',
prop: 'warehouseTime',
formatter: cellValue => {
return dayjs(cellValue.warehouseTime).format('YYYY-MM-DD HH:mm:ss')
},
width: 180
},
{
label: '关联业务单号',
prop: 'businessCode',
width: 150,
line: 1
},
{
label: '关联发货单号',
prop: 'deliveryNumber',
width: 150,
line: 1
},
{
label: '所属商户',
prop: 'merchantName',
width: 150,
line: 1
},
{
label: '状态',
prop: 'cardStatus',
width: 100,
formatter: cellValue => {
return this.baseData.cardStatusList.find(item => item.confId === cellValue.cardStatus?.toString())?.confLabel
}
},
{
label: '激活业务单号',
prop: 'activationBusinessCode',
width: 150
},
{
label: '激活时间',
prop: 'activationTime',
formatter: cellValue => {
return cellValue.activationTime ? dayjs(cellValue.activationTime).format('YYYY-MM-DD HH:mm:ss') : '--'
},
width: 180
},
{
label: '激活门店',
prop: 'activationMerchantName',
width: 120,
line: 1
},
{
label: '激活客户',
prop: 'activationCustomerName',
line: 1
},
{
label: '客户手机号',
prop: 'activationCustomerPhone',
formatter: cellValue => {
return cellValue.activationCustomerPhone || '-'
},
width: 120
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据
baseData: {
cardStatusList: [
{
confId: '1',
confLabel: '待激活'
},
{
confId: '2',
confLabel: '已激活'
}
]
}
}
},
created() {
this.getStockVdCard()
this.getOptionsList('showFormData')
},
methods: {
getStockVdCard() {
var params = this.searchForm
this.$apis.equity.getStockVdCard(params).then(res => {
this.stockData = res
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.equityRef.data.length ? (this.$refs.equityRef.tableHeightValues = '') : this.$refs.equityRef.setTableHeightFun()
},
exportExcel() {
var params = this.searchForm
this.$apis.equity.exportExcel(params).then(res => {
window.location.href = res.replace(/https?:/, '')
})
},
handleSearch() {
this.$refs.equityRef.refreshTable()
this.getStockVdCard()
},
handleReset() {
this.searchForm = {
vdCardCode: '',
businessCode: '',
deliveryNumber: '',
merchantName: '',
activationBusinessCode: '',
cardStatus: '',
activationMerchantName: '',
activationCustomerName: '',
activationCustomerPhone: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped lang="scss">
@import '@/assets/css/mixin.scss';
.equity {
background: #fff;
padding: 20px;
.table-header {
@include space-between_center;
margin-bottom: 10px;
h2 {
font-weight: 600;
font-size: 16px;
color: #333;
}
}
}
</style>
<!-- 盘点详情弹窗弹窗 --> <!-- 盘点详情弹窗弹窗 -->
<template> <template>
<GLDialog bigTitle="详细信息" :visible.sync="allocationDetailVisible" class="inventoryDetailDailog" mode="big" okText="关闭" <GLDialog bigTitle="详细信息" :visible.sync="allocationDetailVisible" class="inventoryDetailDailog" mode="big" okText="关闭"
@onCancel="handleClose" @onOk="handleClose"> @onCancel="handleClose" @onOk="handleClose" :before-close="handleClose" :hasFooter="false">
<div> <div>
<div class="d2-container-content"> <div class="d2-container-content">
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" <GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams"
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
</GLTable> </GLTable>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <!-- <span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleClose">关闭</el-button> <el-button type="primary" size="small" @click="handleClose">关闭</el-button>
</span> </span> -->
</GLDialog> </GLDialog>
</template> </template>
......
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
<div class="table-header"> <div class="table-header">
<h2>调拨列表</h2> <h2>调拨列表</h2>
<div> <div>
<GLButton type="primary" size="small" plain @click="handleAdd" fn="创建调拨">创建调拨</GLButton> <GLButton type="primary" plain size="small" @click="handleAdd" fn="创建调拨">创建调拨</GLButton>
<!-- <el-button type="primary" size="small" @click="handleAdd">创建调拨</el-button> --> <!-- <el-button type="primary" size="small" @click="handleAdd">创建调拨</el-button> -->
<el-button size="small" @click="exportExcel">导出</el-button>
<el-button size="small" @click="exportExcel">导出</el-button>
</div> </div>
</div> </div>
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
<div class="table-header"> <div class="table-header">
<h2>盘点列表</h2> <h2>盘点列表</h2>
<div> <div>
<GLButton type="primary" size="small" plain @click="handleAdd" fn="创建盘点">创建盘点</GLButton> <GLButton type="primary" plain size="small" @click="handleAdd" fn="创建盘点">创建盘点</GLButton>
<!-- <el-button type="primary" size="small" @click="handleAdd">创建盘点</el-button> -->
<el-button size="small" @click="exportExcel">导出</el-button> <el-button size="small" @click="exportExcel">导出</el-button>
</div> </div>
</div> </div>
......
<!-- 盘点详情弹窗弹窗 --> <!-- 盘点详情弹窗弹窗 -->
<template> <template>
<GLDialog bigTitle="详细信息" :visible.sync="inventoryDetailVisible" :before-close="handleClose" <GLDialog bigTitle="详细信息" :visible.sync="inventoryDetailVisible" :hasFooter="false" :before-close="handleClose"
class="inventoryDetailDailog" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose"> class="inventoryDetailDailog" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose">
<div> <div>
<div class="header" slot="header" style="padding: 10px 20px"> <div class="header" slot="header" style="padding: 10px 20px">
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
</GLTable> </GLTable>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleClose">关闭</el-button>
</span>
</GLDialog> </GLDialog>
</template> </template>
......
...@@ -166,14 +166,16 @@ export default { ...@@ -166,14 +166,16 @@ export default {
prop: 'reduceStockNum', prop: 'reduceStockNum',
formatter: cellValue => { formatter: cellValue => {
return cellValue.reduceStockNum || cellValue.reduceStockNum == 0 ? parseFloat(cellValue.reduceStockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.reduceStockNum || cellValue.reduceStockNum == 0 ? parseFloat(cellValue.reduceStockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} },
width: 100
}, },
{ {
label: '出库金额', label: '出库金额',
prop: 'reduceStockMoney', prop: 'reduceStockMoney',
formatter: cellValue => { formatter: cellValue => {
return cellValue.reduceStockMoney ? '¥' + cellValue.reduceStockMoney.toFixed(2) : '-' return cellValue.reduceStockMoney ? '¥' + cellValue.reduceStockMoney.toFixed(2) : '-'
} },
width: 100
}, },
{ {
label: '出库类型', label: '出库类型',
...@@ -185,17 +187,20 @@ export default { ...@@ -185,17 +187,20 @@ export default {
}, },
{ {
label: '关联业务单号', label: '关联业务单号',
prop: 'businessCode' prop: 'businessCode',
width: 200
}, },
{ {
label: '出库仓库', label: '出库仓库',
prop: 'yqMerchantName', prop: 'yqMerchantName',
width: 200 width: 180,
line: 1
}, },
{ {
label: '出库门店', label: '出库门店',
prop: 'merchantName', prop: 'merchantName',
width: 200 width: 180,
line: 1
}, },
{ {
// label: '适用门店', // label: '适用门店',
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<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 size="small" @click="exportExcel">导出</el-button> <el-button
size="small"
@click="exportExcel">导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
......
<!-- 库存明细弹窗 --> <!-- 库存明细弹窗 -->
<template> <template>
<GLDialog bigTitle="库存明细" <GLDialog bigTitle="库存明细" :visible.sync="dialogVisible" class="stockMonthDailog" width="50%" mode="big" :destroy-on-close="true" :close-on-click-modal="false" okText="关闭" :before-close="handleClose" :hasFooter="false" @onOk="handleClose" @onCancel="handleClose">
:visible.sync="dialogVisible"
class="stockMonthDailog"
width="30%"
mode="big"
:destroy-on-close="true"
:close-on-click-modal="false"
okText="关闭"
@onOk="handleClose"
@onCancel="handleClose">
<div> <div>
<div class="d2-container-content"> <div class="d2-container-content">
<GLTable ref="recordTable" <GLTable ref="recordTable" :get-list-api="getListApi" :search-form="searchForm" :table-params="tableParams" :pageConf="pageConf"></GLTable>
:get-list-api="getListApi"
:search-form="searchForm"
:table-params="tableParams"
:pageConf="pageConf">
</GLTable>
</div> </div>
</div> </div>
<span slot="footer" <!-- <span slot="footer"
class="dialog-footer"> class="dialog-footer">
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="handleClose">关闭</el-button> @click="handleClose">关闭</el-button>
</span> </span> -->
</GLDialog> </GLDialog>
</template> </template>
...@@ -43,7 +29,7 @@ export default { ...@@ -43,7 +29,7 @@ export default {
}, },
recordInfo: { recordInfo: {
type: Object, type: Object,
default: () => { } default: () => {}
} }
}, },
data() { data() {
...@@ -55,7 +41,8 @@ export default { ...@@ -55,7 +41,8 @@ export default {
upgradeGoodsId: '', upgradeGoodsId: '',
yqMerchantId: '' yqMerchantId: ''
}, },
getListApi: this.$apis.stockManage.merchantShopGoodsStockPage, tableData: [], getListApi: this.$apis.stockManage.merchantShopGoodsStockPage,
tableData: [],
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
...@@ -70,8 +57,8 @@ export default { ...@@ -70,8 +57,8 @@ export default {
label: '当前库存', label: '当前库存',
prop: 'stock', prop: 'stock',
// width: '' // width: ''
formatter: (cellValue) => { formatter: cellValue => {
return (cellValue.stock || cellValue.stock == 0) ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
} }
] ]
...@@ -90,7 +77,7 @@ export default { ...@@ -90,7 +77,7 @@ export default {
} }
}, },
mounted() { mounted() {
console.log('111'); console.log('111')
if (this.recordInfo) { if (this.recordInfo) {
this.searchForm.yqMerchantId = this.recordInfo.yqMerchantId this.searchForm.yqMerchantId = this.recordInfo.yqMerchantId
...@@ -99,14 +86,11 @@ export default { ...@@ -99,14 +86,11 @@ export default {
}, },
methods: { methods: {
handleClose() { handleClose() {
this.dialogVisible = false this.dialogVisible = false
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.count-txt { .count-txt {
......
<template> <template>
<GLDialog class="stock-dialog" <GLDialog class="stock-dialog" v-if="stockMonthVisible" :destroy-on-close="true" :before-close="handleClose" bigTitle="月度库存结算单" mode="big" okText="关闭" :visible.sync="stockMonthVisible" :close-on-click-modal="false" @onOk="handleClose" @onCancel="handleClose" :hasFooter="false">
v-if="stockMonthVisible" <div class="detail-content" v-if="stockMonthVisible">
:destroy-on-close="true" <el-form :inline="true" :model="searchForm" size="small">
:before-close="handleClose"
bigTitle="月度库存结算单"
mode="big"
okText="关闭"
:visible.sync="stockMonthVisible"
:close-on-click-modal="false"
@onOk="handleClose"
@onCancel="handleClose">
<div class="detail-content"
v-if="stockMonthVisible">
<el-form :inline="true"
:model="searchForm"
size="small">
<el-form-item label="年度:"> <el-form-item label="年度:">
<el-date-picker v-model="searchForm.year" <el-date-picker v-model="searchForm.year" type="year" placeholder="选择年" value-format="yyyy" format="yyyy" :clearable="false" :picker-options="pickerOption" @change="chooseYear"></el-date-picker>
type="year"
placeholder="选择年"
value-format="yyyy"
format="yyyy"
:clearable="false"
:picker-options="pickerOption"
@change="chooseYear"></el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="table-class"> <div class="table-class">
<GLTable ref="purchaseOrderDetailTable" <GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" :has-num="false" :hasPage="false" :tableData="tableData" :pageConf="pageConf"></GLTable>
:tableParams="tableParams"
:has-num="false"
:hasPage="false"
:tableData="tableData"
:pageConf="pageConf"></GLTable>
</div> </div>
<span class="btn-tips"> <span class="btn-tips">
<img src="@/images/icon-warn.png" /> <img src="@/images/icon-warn.png" />
说明:月平均加权单价=上月结存库存金额+本月采购金额/上月结存库存数量+本月采购数量 说明:月平均加权单价=上月结存库存金额+本月采购金额/上月结存库存数量+本月采购数量
</span> </span>
</div> </div>
<span slot="footer" <!-- <span slot="footer" class="dialog-footer">
class="dialog-footer"> <el-button type="primary" size="small" @click="handleClose">关闭</el-button>
<el-button type="primary" </span> -->
size="small"
@click="handleClose">关闭</el-button>
</span>
</GLDialog> </GLDialog>
</template> </template>
...@@ -59,7 +31,7 @@ export default { ...@@ -59,7 +31,7 @@ export default {
}, },
stockInfo: { stockInfo: {
type: Object, type: Object,
default: () => { } default: () => {}
} }
}, },
data() { data() {
......
...@@ -194,7 +194,8 @@ export default { ...@@ -194,7 +194,8 @@ export default {
{ {
label: '关联业务单号', label: '关联业务单号',
prop: 'businessCode', prop: 'businessCode',
minWidth: 150 width: 150,
line:1
}, },
{ {
label: '关联发货单号', label: '关联发货单号',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!