Commit 11a86e2e by 张立顺

代码冲突解决

2 parents 0c49f075 a452899e
......@@ -103,7 +103,8 @@ const stockCheckDetailPage = params => {
// 商品库存列表(创建盘点、调拨时展示)
const stockRemainPage = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path3}stock.remain.page`
// params.routerMethod = `${path3}stock.remain.page`
params.routerMethod = `${path}merchantShopGoodsStock.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
......@@ -261,7 +262,7 @@ export function inventoryWarningList(params) {
})
}
// 获取门店库存列表
export function merchantShopGoodsStockPage(data) {
export function merchantShopGoodsStockPage(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}merchantShopGoodsStock.page`
// return request(data, RequestMethods.POST)
......@@ -272,4 +273,17 @@ export function merchantShopGoodsStockPage(data) {
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 }
// 是否有发货主体
export function checkShipper(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseOrder.checkShipper`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { inventoryWarningList, exportaInventExcel, exportaAllocateExcel, exportCheckExcel, exportReduceExcel, exportMerchantExcel, exportExcel, saveStockAllocate, stockAllocateDetailPage, stockAllocatePage, yqRelatedList, saveStockCheck, stockRemainPage, stockCheckDetailPage, stockCheckPage, getMerchantGoodsStockReduceRecord, getReportByGoods, getyqMerchantList, getGoodsWarehousingList, getMerchantGoodsStockMonthReport, merchantShopGoodsStockPage, getServicemerchantrefList, checkShipper }
......@@ -368,7 +368,8 @@
</div>
</el-row>
</template>
<span v-else>{{ item.name ? formData[item.name] : item.value }}</span>
<!-- <span v-else>{{ item.name ? formData[item.name] : item.value }}</span> -->
<span v-else></span>
</el-form-item>
<div v-show="item.tips"
class="item-tips">
......@@ -461,7 +462,7 @@ export default {
name: 'D2Form',
data() {
return {
userInfo:{detail:{}},
userInfo: { detail: {} },
warrantyProList,
merchantDisable: false,
storeSearchForm: {
......
......@@ -89,7 +89,7 @@ export default {
name: 'callOutYqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqRelatedMerchantList',
changeAttr: (value, targetItem) => {
......@@ -113,7 +113,7 @@ export default {
name: 'callInYqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqRelatedMerchantList',
changeAttr: (value, targetItem) => {
......@@ -148,21 +148,40 @@ export default {
{
label: '调拨时间',
prop: 'allocateTime',
width: 170,
formatter: cellValue => {
return dayjs(cellValue.allocateTime).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '调拨人',
prop: 'operator'
prop: 'operator',
width: 100
},
{
label: '调出仓库',
prop: 'callOutYqMerchantName',
width: 150
}, {
label: '调出门店',
prop: 'callOutYqMerchantName'
},
{
prop: 'callOutMerchantName',
width: 150
}, {
label: '调入仓库',
prop: 'callInYqMerchantName',
width: 150
}, {
label: '调入门店',
prop: 'callInYqMerchantName'
prop: 'callInMerchantName',
width: 150
}, {
label: '承运单号',
prop: 'deliveryNumber',
width: 150
}, {
label: '承运公司',
prop: 'deliveryCompany',
width: 150
},
{
label: '备注',
......@@ -186,7 +205,11 @@ export default {
mounted() {
//调入门店
this.$apis.stockManage.yqRelatedList({}).then(res => {
// this.$apis.stockManage.yqRelatedList({}).then(res => {
// this.baseData.yqRelatedMerchantList = res
// this.getOptionsList('showFormData')
// })
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqRelatedMerchantList = res
this.getOptionsList('showFormData')
})
......@@ -218,14 +241,14 @@ export default {
if (type == 'out') {//调出门店
this.baseData.outMerchantList = res || []
//总店
_headOffice = this.baseData.yqRelatedMerchantList.find(item => item.merchantId === merchantId)
_headOffice = this.baseData.yqRelatedMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.outMerchantList.push(_headOffice)
} else if (type == 'in') {//调入门店
this.baseData.inMerchantList = res || []
//总店
_headOffice = this.baseData.yqRelatedMerchantList.find(item => item.merchantId === merchantId)
_headOffice = this.baseData.yqRelatedMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.inMerchantList.push(_headOffice)
......@@ -291,8 +314,15 @@ export default {
callOutMerchantId: '',
callInMerchantId: ''
}
this.showFormData[this.findFormIdx('callOutMerchantId')].optionList = []
this.showFormData[this.findFormIdx('callInMerchantId')].optionList = []
this.handleSearch()
},
findFormIdx(name) {
return this.showFormData.findIndex(item => item.name === name)
},
handleEnlargeImg(url) {
if (url) {
this.previewImgUrl = url
......
......@@ -24,7 +24,6 @@
prop="merchantId">
<el-select v-model="editCheckForm.merchantId"
@change="changeMerchant(editCheckForm.merchantId)"
filterable
style="width: 300px">
<el-option v-for="item in merchantList"
:key="item.merchantId"
......@@ -43,7 +42,7 @@
size="small"
inline="true">
<el-form-item label="">
<el-input v-model="searchForm.searchName"
<el-input v-model="searchForm.upgradeGoodsNameOrSeries"
style="width: 200px"
placeholder="请输入商品名称/系列"
maxlength="20"
......@@ -126,12 +125,14 @@ export default {
return {
membraneTypeList: membraneTypeList,
searchForm: {
searchName: ''
upgradeGoodsNameOrSeries: ''
},
searchFormSearch: {},
searchSelectObj: {},
getListApi: this.$apis.stockManage.stockRemainPage,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// getListApi: this.$apis.stockManage.stockRemainPage,
getListApi: null,
tableData: [],
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
......@@ -139,7 +140,7 @@ export default {
tableColumns: [
{
label: '商品名称',
prop: 'goodsName'
prop: 'upgradeGoodsName'
},
{
label: '商品编码',
......@@ -148,7 +149,7 @@ export default {
},
{
label: '系列',
prop: 'sourceMaterialName'
prop: 'goodsSeries'
},
{
label: '所属分类',
......@@ -162,8 +163,12 @@ export default {
}
},
{
label: '所属门店',
label: '所属仓库',
prop: 'yqMerchantName'
},
{
label: '所属门店',
prop: 'merchantName'
}
]
},
......@@ -174,8 +179,7 @@ export default {
tableColumns: [
{
label: '商品名称',
prop: 'goodsName',
width: '160px'
prop: 'goodsName'
},
{
label: '商品编码',
......@@ -184,13 +188,11 @@ export default {
},
{
label: '系列',
prop: 'sourceMaterialName',
width: '250px'
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName',
width: '250px'
prop: 'goodsTypeName'
},
{
label: '系统库存',
......@@ -212,9 +214,12 @@ export default {
addHtml: 'profitAndLoss'
},
{
label: '所属仓库',
prop: 'yqMerchantName'
},
{
label: '所属门店',
prop: 'yqMerchantName',
width: '200px'
prop: 'merchantName'
}
]
},
......@@ -271,28 +276,57 @@ export default {
},
yqMerchantIdList: [],//盘点仓库
merchantList: [],//盘点门店
oldyqMerchantId: '',//之前选择的仓库
oldMerchantId: '',//之前选择的门店
}
},
watch: {
'editCheckForm.yqMerchantId'(val, oldval) {
console.log(val, oldval, "监听yqMerchantId");
this.getListApi = this.$apis.stockManage.stockRemainPage
if (this.yqMerchantIdList.length == 1) {//当只有一个选项时不弹提示框
this.$refs.recordTable.refreshTable()
} else {
if (val != this.oldyqMerchantId) {//与之前的选项不一样
this.editCheckForm.merchantId = ''
this.switchData(val, oldval, 'yqMerchant')
}
}
},
'editCheckForm.merchantId'(val, oldval2) {
console.log(val, oldval2, "监听merchantId");
this.getListApi = this.$apis.stockManage.stockRemainPage
if (this.merchantList.length == 1) {
this.$refs.recordTable.refreshTable()
} else {
if (val != this.oldMerchantId) {//与之前的选项不一样
this.switchData(val, oldval2, 'merchant')
}
}
}
},
mounted() {
// 获取当前登录账号可见的园区店列表
this.$apis.stockManage.getyqMerchantList({}).then(res => {
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.yqMerchantIdList = res
if (this.yqMerchantIdList && this.yqMerchantIdList.length == 1) {
this.editCheckForm.yqMerchantId = this.yqMerchantIdList[0].merchantNo
this.getServicemerchantrefList(this.editCheckForm.yqMerchantId)
// this.changeYqMerchant(this.editCheckForm.yqMerchantId)
}
})
},
methods: {
changeYqMerchant(merchantId) {
this.switchData(merchantId, 'yqMerchant')
// this.switchData(merchantId, 'yqMerchant')
},
changeMerchant(merchantId) {
this.switchData(merchantId, 'merchant')
// this.switchData(merchantId, 'merchant')
},
// 获取仓库门店
......@@ -303,6 +337,7 @@ export default {
this.merchantList = res || []
//总店
let _headOffice = this.yqMerchantIdList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.merchantList.push(_headOffice)
if (this.merchantList && this.merchantList.length == 1) {
......@@ -311,27 +346,30 @@ export default {
})
},
switchData(merchantId, type) {
// let _flag = false
switchData(val, oldval, type) {
this.$confirm('切换盘点仓库和盘点门店,自动重置已盘点内容;是否确定切换?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
// _flag = true
if (type == 'yqMerchant') {
this.getServicemerchantrefList(merchantId)
this.getServicemerchantrefList(val)
}
//更新盘存数据以及清空盘存确认单数据
this.$refs.recordTable.refreshTable()
this.chooseDataList = []
})
.catch(err => {
// _flag = false
console.log(err)
if (type == 'yqMerchant') {
this.editCheckForm.yqMerchantId = oldval
this.oldyqMerchantId = oldval
} else if (type == 'merchant') {
this.editCheckForm.merchantId = oldval
this.oldMerchantId = oldval
}
})
// return _flag
},
beforeSearchFn() {
......@@ -360,6 +398,7 @@ export default {
},
handleSearch() {
this.getListApi = this.$apis.stockManage.stockRemainPage
this.$refs.recordTable.refreshTable()
},
......@@ -381,11 +420,21 @@ export default {
dialogClose(chooseData) {
this.inventoryNumVisible = !this.inventoryNumVisible
console.log('chooseData', chooseData);
if (chooseData) {
chooseData = this.fieldConvert(chooseData)
this.chooseDataList.push(chooseData)
}
},
//选择的数据与提交数据之间的字段转换
fieldConvert(obj) {
obj.goodsId = obj.upgradeGoodsId
obj.goodsName = obj.upgradeGoodsName
obj.sourceMaterialName = obj.goodsSeries
return obj
},
// 取消
cancelInventory(row, index) {
this.chooseDataList.splice(index, 1)
......@@ -409,7 +458,10 @@ export default {
if (data.remark) {
params.remark = data.remark
}
// return console.log(params);
params = {
...params,
...this.editCheckForm
}
this.$confirm('盘点单保存后,系统自动按照盘点实际库存进行库存更新;是否确定保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......
......@@ -117,6 +117,7 @@ export default {
label: '盘点门店',
name: 'merchantId',
type: 'select',
noDataText: '请先选择盘点仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
......@@ -176,7 +177,7 @@ export default {
mounted() {
// 获取当前登录账号可见的园区店列表
this.$apis.stockManage.getyqMerchantList({}).then(res => {
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.getOptionsList('showFormData')
})
......@@ -270,8 +271,14 @@ export default {
yqMerchantId: '',
merchantId: ''
}
this.showFormData[this.findFormIdx('merchantId')].optionList = []
this.handleSearch()
},
findFormIdx(name) {
return this.showFormData.findIndex(item => item.name === name)
},
handleEnlargeImg(url) {
if (url) {
this.previewImgUrl = url
......
......@@ -2,17 +2,33 @@
<template>
<div class="purchase">
<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">
<h2>预警列表</h2>
<div>
<el-button type="primary" size="small" @click="gotoReplenishment">去补货</el-button>
<el-button type="primary" size="small" @click="exportExcel">导出</el-button>
<el-button type="primary"
size="small"
@click="gotoReplenishment">去补货</el-button>
<el-button type="primary"
size="small"
@click="exportExcel">导出</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="earlyWarningRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="earlyWarningRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -31,6 +47,7 @@ export default {
searchForm: {
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
goodsSeries: '',
productCode: ''
......@@ -69,13 +86,29 @@ export default {
optionsName: 'productTypeList'
},
{
label: '所属门店',
label: '所属仓库',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList'
optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value)
: (this.baseData.merchantIdList = [])
this.searchForm.merchantId = ''
this.getOptionsList('showFormData')
}
}, {
label: '所属门店',
name: 'merchantId',
type: 'select',
noDataText: '请先选择所属仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantIdList'
}
],
// 表格
......@@ -88,7 +121,7 @@ export default {
label: '商品名称',
prop: 'upgradeGoodsName'
},
{
{
label: '商品编码',
prop: 'productCode'
},
......@@ -115,8 +148,12 @@ export default {
}
},
{
label: '所属门店',
label: '所属仓库',
prop: 'yqMerchantName'
},
{
label: '所属门店',
prop: 'merchantName'
}
]
},
......@@ -124,7 +161,8 @@ export default {
// 基本数据
baseData: {
productTypeList: [],
yqMerchantList: []
yqMerchantList: [],
merchantIdList: []
}
}
},
......@@ -136,7 +174,7 @@ export default {
})
// 获取当前登录账号可见的园区店列表
this.$apis.stockManage.getyqMerchantList({}).then(res => {
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.getOptionsList('showFormData')
})
......@@ -149,6 +187,20 @@ export default {
resolve()
})
},
// 获取仓库门店
getServicemerchantrefList(merchantId) {
this.$apis.stockManage.getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList('showFormData')
})
},
// 查看详情
handleDetail(row) {
this.stockInfo = row
......@@ -195,8 +247,29 @@ export default {
})
},
//去补货
gotoReplenishment() {
this.$history.push(`/purchase/purchaseOrder/add`)
// gotoReplenishment() {
// this.$history.push(`/purchase/purchaseOrder/add`)
// },
async gotoReplenishment() {
let result = await this.checkShipper()
console.log(result)
if (result) this.$history.push(`/purchase/purchaseOrder/add`)
},
checkShipper() {
return new Promise(resolve => {
this.$apis.stockManage.checkShipper({}).then(res => {
console.log(res)
if (res.code == -1) {
this.$message({
type: 'error',
message: res.message
})
resolve(false)
} else {
resolve(true)
}
})
})
},
handleSearch() {
this.$refs.earlyWarningRef.refreshTable()
......@@ -206,12 +279,18 @@ export default {
this.searchForm = {
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
goodsSeries: '',
productCode: ''
}
this.showFormData[this.findFormIdx('merchantId')].optionList = []
this.handleSearch()
},
findFormIdx(name) {
return this.showFormData.findIndex(item => item.name === name)
}
}
}
......
......@@ -2,17 +2,28 @@
<template>
<div class="purchase">
<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">
<h2>出库列表</h2>
<el-button type="primary" size="small" @click="exportExcel">导出</el-button>
<el-button type="primary"
size="small"
@click="exportExcel">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="outboundRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="outboundRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -34,6 +45,7 @@ export default {
eventType: '',
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: '',
......@@ -74,15 +86,30 @@ export default {
isClear: true
},
{
label: '出库门店',
label: '出库仓库',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList'
optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value)
: (this.baseData.merchantIdList = [])
this.searchForm.merchantId = ''
this.getOptionsList('showFormData')
}
}, {
label: '出库门店',
name: 'merchantId',
type: 'select',
noDataText: '请先选择出库仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantIdList'
},
{
label: '使用门店',
name: 'storeUsage',
......@@ -177,11 +204,16 @@ export default {
prop: 'businessCode'
},
{
label: '出库门店',
label: '出库仓库',
prop: 'yqMerchantName',
width: 200
},
{
label: '出库门店',
prop: 'merchantName',
width: 200
},
{
// label: '适用门店',
label: '使用门店',
prop: 'storeUsage',
......@@ -210,7 +242,8 @@ export default {
}
],
productTypeList: [],
yqMerchantList: []
yqMerchantList: [],
merchantIdList: []
}
}
},
......@@ -222,7 +255,7 @@ export default {
})
// 获取当前登录账号可见的园区店列表
this.$apis.stockManage.getyqMerchantList({}).then(res => {
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.getOptionsList('showFormData')
})
......@@ -244,6 +277,20 @@ export default {
resolve()
})
},
// 获取仓库门店
getServicemerchantrefList(merchantId) {
this.$apis.stockManage.getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList('showFormData')
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
......@@ -289,12 +336,18 @@ export default {
eventType: '',
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: '',
productCode: ''
}
this.showFormData[this.findFormIdx('merchantId')].optionList = []
this.handleSearch()
},
findFormIdx(name) {
return this.showFormData.findIndex(item => item.name === name)
}
}
}
......
......@@ -2,28 +2,47 @@
<template>
<div class="purchase">
<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">
<h2>库存列表</h2>
<el-button type="primary" size="small" @click="exportExcel">导出</el-button>
<el-button type="primary"
size="small"
@click="exportExcel">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<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">
<el-button type="text" @click="handleInventoryDetails(scope.scope)">库存明细</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
<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">
<el-button type="text"
@click="handleInventoryDetails(scope.scope)">库存明细</el-button>
<el-button type="text"
@click="handleDetail(scope.scope)">统计</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- 查看 -->
<stock-month-dialog :stock-month-visible="stockMonthVisible" :stockInfo="stockInfo" v-if="stockMonthVisible"
@dialogClose="dialogClose" />
<stockDetailDialog :visible="stockDetailDialogVisible" :stockInfo="stockInfo" v-if="stockDetailDialog" />
<stock-month-dialog :stock-month-visible="stockMonthVisible"
:stockInfo="stockInfo"
v-if="stockMonthVisible"
@dialogClose="dialogClose" />
<stockDetailDialog :visible.sync="stockDetailDialogVisible"
:recordInfo="stockInfo"
v-if="stockDetailDialogVisible" />
</div>
</template>
......@@ -77,7 +96,7 @@ export default {
isClear: true
},
{
label: '所属门店',
label: '所属仓库',
name: 'yqMerchantId',
type: 'select',
optionList: [],
......@@ -144,9 +163,13 @@ export default {
}
},
{
label: '所属门店',
label: '所属仓库',
prop: 'yqMerchantName',
width: 200
}, {
label: '所属商户',
prop: 'partnerMerchantName',
width: '200px'
}
]
},
......@@ -166,7 +189,7 @@ export default {
})
// 获取当前登录账号可见的园区店列表
this.$apis.stockManage.getyqMerchantList({}).then(res => {
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.getOptionsList('showFormData')
})
......@@ -180,8 +203,9 @@ export default {
resolve()
})
},
handleInventoryDetails() {
handleInventoryDetails(row) {
this.stockInfo = row
console.log(this.stockInfo);
this.stockDetailDialogVisible = true
},
// 查看详情
......
<!-- 库存明细弹窗 -->
<template>
<GLDialog bigTitle="库存明细" :is-visible="dialogVisible" class="stockMonthDailog" width="30%" :no-cancel="true" okText="关闭"
@onOk="handleClose" @onCancel="handleClose">
<GLDialog bigTitle="库存明细"
: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 class="d2-container-content">
<GLTable ref="recordTable" :get-list-api="getListApi" :search-form="searchForm" :table-params="tableParams"
:pageConf="pageConf">
<GLTable ref="recordTable"
:get-list-api="getListApi"
:search-form="searchForm"
:table-params="tableParams"
:pageConf="pageConf">
</GLTable>
</div>
</div>
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
size="small"
@click="handleClose">关闭</el-button>
</span>
</GLDialog>
</template>
......@@ -73,6 +90,8 @@ export default {
}
},
mounted() {
console.log('111');
if (this.recordInfo) {
this.searchForm.yqMerchantId = this.recordInfo.yqMerchantId
this.searchForm.upgradeGoodsId = this.recordInfo.upgradeGoodsId
......
<template>
<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">
<div class="detail-content" v-if="stockMonthVisible">
<el-form :inline="true" :model="searchForm" size="small">
<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">
<div class="detail-content"
v-if="stockMonthVisible">
<el-form :inline="true"
:model="searchForm"
size="small">
<el-form-item label="年度:">
<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>
<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>
</el-form-item>
</el-form>
<div class="table-class">
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" :has-num="false" :hasPage="false" :tableData="tableData" :pageConf="pageConf"></GLTable>
<GLTable ref="purchaseOrderDetailTable"
:tableParams="tableParams"
:has-num="false"
:hasPage="false"
:tableData="tableData"
:pageConf="pageConf"></GLTable>
</div>
<span class="btn-tips">
<img src="@/images/icon-warn.png" />
说明:月平均加权单价=上月结存库存金额+本月采购金额/上月结存库存数量+本月采购数量
</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleClose">关闭</el-button>
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
size="small"
@click="handleClose">关闭</el-button>
</span>
</GLDialog>
</template>
......@@ -31,7 +59,7 @@ export default {
},
stockInfo: {
type: Object,
default: () => {}
default: () => { }
}
},
data() {
......
......@@ -33,10 +33,12 @@ export default {
increaseStockType: '',
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: '',
productCode: ''
productCode: '',
deliveryNumber: ''
},
tableSearchForm: {},
paramsObj: {},
......@@ -73,15 +75,6 @@ export default {
isClear: true
},
{
label: '入库门店',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList'
},
{
label: '所属分类',
name: 'goodsType',
type: 'select',
......@@ -98,11 +91,42 @@ export default {
isClear: true
},
{
label: '发货单号',
name: 'deliveryNumber',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '系列',
name: 'goodsSeries',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '入库仓库',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value)
: (this.baseData.merchantIdList = [])
this.searchForm.merchantId = ''
this.getOptionsList('showFormData')
}
}, {
label: '入库门店',
name: 'merchantId',
type: 'select',
noDataText: '请先选择入库仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantIdList'
}
],
// 表格
......@@ -173,9 +197,19 @@ export default {
minWidth: 150
},
{
label: '入库门店',
label: '关联发货单号',
prop: 'deliveryNumber',
minWidth: 150
},
{
label: '入库仓库',
prop: 'yqMerchantName',
width: 200
},
{
label: '入库门店',
prop: 'merchantName',
width: 200
}
]
},
......@@ -201,7 +235,8 @@ export default {
}
],
productTypeList: [],
yqMerchantList: []
yqMerchantList: [],
merchantIdList: []
}
}
},
......@@ -213,7 +248,7 @@ export default {
})
// 获取当前登录账号可见的园区店列表
this.$apis.stockManage.getyqMerchantList({}).then(res => {
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.getOptionsList('showFormData')
})
......@@ -236,6 +271,21 @@ export default {
})
},
// 获取仓库门店
getServicemerchantrefList(merchantId) {
this.$apis.stockManage.getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList('showFormData')
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
......@@ -319,12 +369,19 @@ export default {
increaseStockType: '',
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: '',
productCode: ''
productCode: '',
deliveryNumber: ''
}
this.showFormData[this.findFormIdx('merchantId')].optionList = []
this.handleSearch()
},
findFormIdx(name) {
return this.showFormData.findIndex(item => item.name === name)
}
}
}
......@@ -344,4 +401,5 @@ export default {
color: #333;
}
}
}</style>
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!