Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-inventory
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 11a86e2e
authored
May 18, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
代码冲突解决
2 parents
0c49f075
a452899e
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
695 additions
and
137 deletions
src/api/modules/stockManage.js
src/components/glsx-form/index.vue
src/views/allocation/add.vue
src/views/allocation/index.vue
src/views/check/add.vue
src/views/check/index.vue
src/views/earlyWarning/index.vue
src/views/outbound/index.vue
src/views/stock/index.vue
src/views/stock/stockDetailDialog.vue
src/views/stock/stockMonthDialog.vue
src/views/warehousing/index.vue
src/api/modules/stockManage.js
View file @
11a86e2
...
...
@@ -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
}
src/components/glsx-form/index.vue
View file @
11a86e2
...
...
@@ -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
:
{
...
...
src/views/allocation/add.vue
View file @
11a86e2
...
...
@@ -9,7 +9,8 @@
ref=
"editAllocationFormRef"
:rules=
"formRules"
class=
"demo-form-inline"
>
<el-form-item
label=
"调出门店:"
<el-form-item>
调出方
</el-form-item>
<el-form-item
label=
"调出仓库:"
prop=
"callOutYqMerchantId"
>
<el-select
v-model=
"editAllocationForm.callOutYqMerchantId"
style=
"width: 300px"
>
...
...
@@ -19,12 +20,34 @@
:value=
"item.merchantNo"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"调入门店:"
<el-form-item
label=
"调出门店:"
prop=
"callOutMerchantId"
>
<el-select
v-model=
"editAllocationForm.callOutMerchantId"
style=
"width: 300px"
>
<el-option
v-for=
"item in callOutMerchantList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
/>
</el-select>
</el-form-item>
<br
/>
<el-form-item>
调入方
</el-form-item>
<el-form-item
label=
"调入仓库:"
prop=
"callInYqMerchantId"
>
<el-select
v-model=
"editAllocationForm.callInYqMerchantId"
filterable
@
change=
"changeCallInYqMerchant(editAllocationForm.callInYqMerchantId)"
style=
"width: 300px"
>
<el-option
v-for=
"item in callInYqMerchantList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"调入门店:"
prop=
"callInMerchantId"
>
<el-select
v-model=
"editAllocationForm.callInMerchantId"
style=
"width: 300px"
>
<el-option
v-for=
"item in callInMerchantList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
/>
...
...
@@ -39,7 +62,7 @@
size=
"small"
:model=
"editAllocationForm"
>
<el-form-item
label=
""
>
<el-input
v-model=
"searchForm.
searchName
"
<el-input
v-model=
"searchForm.
upgradeGoodsNameOrSeries
"
style=
"width: 200px"
placeholder=
"请输入商品名称/系列"
maxlength=
"20"
...
...
@@ -80,6 +103,7 @@
</GLTable>
</div>
<glsx-form
ref=
"allocationForm"
:rules=
"allocationFormRules"
:origin-data=
"editData"
:form-list=
"editForm"
form-ref=
"inveFormRef"
...
...
@@ -104,10 +128,12 @@ export default {
data
()
{
return
{
callOutYqMerchantList
:
[],
membraneTypeList
:
membraneTypeList
,
callInYqMerchantList
:
[],
callOutMerchantList
:
[],
callInMerchantList
:
[],
membraneTypeList
:
membraneTypeList
,
searchForm
:
{
searchName
:
''
,
upgradeGoodsNameOrSeries
:
''
,
stockFlag
:
true
},
searchFormSearch
:
{},
...
...
@@ -116,14 +142,15 @@ export default {
{
// label: '商品名称/系列',
placeholder
:
'请输入商品名称/系列'
,
name
:
'
searchName
'
,
name
:
'
upgradeGoodsNameOrSeries
'
,
type
:
'input'
,
maxlength
:
'20'
,
isClear
:
true
}
],
getListApi
:
this
.
$apis
.
stockManage
.
stockRemainPage
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
// getListApi: this.$apis.stockManage.stockRemainPage,
getListApi
:
null
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
},
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
...
...
@@ -131,7 +158,7 @@ export default {
tableColumns
:
[
{
label
:
'商品名称'
,
prop
:
'
g
oodsName'
prop
:
'
upgradeG
oodsName'
},
{
label
:
'商品编码'
,
...
...
@@ -140,7 +167,7 @@ export default {
},
{
label
:
'系列'
,
prop
:
'
sourceMaterialName
'
prop
:
'
goodsSeries
'
},
{
label
:
'所属分类'
,
...
...
@@ -154,8 +181,12 @@ export default {
}
},
{
label
:
'所属
门店
'
,
label
:
'所属
仓库
'
,
prop
:
'yqMerchantName'
},
{
label
:
'所属门店'
,
prop
:
'merchantName'
}
]
},
...
...
@@ -205,18 +236,34 @@ export default {
{
formBlock
:
[
{
name
:
'deliveryNumber'
,
label
:
'承运单号'
,
type
:
'input'
,
maxlength
:
50
,
width
:
'300px'
},
{
name
:
'deliveryCompany'
,
label
:
'承运公司'
,
type
:
'input'
,
maxlength
:
20
,
width
:
'300px'
},
{
name
:
'remark'
,
label
:
'备注说明'
,
type
:
'textarea'
,
maxlength
:
100
}
}
,
]
}
],
editAllocationForm
:
{
callOutYqMerchantId
:
''
,
callInYqMerchantId
:
''
callOutYqMerchantId
:
''
,
//调出仓库
callOutMerchantId
:
''
,
//调出门店
callInYqMerchantId
:
''
,
//调入仓库
callInMerchantId
:
''
,
//调入门店
},
allocationNumVisible
:
false
,
...
...
@@ -226,6 +273,13 @@ export default {
callOutYqMerchantId
:
[
{
required
:
true
,
message
:
'请选择调出仓库'
,
trigger
:
'change'
}
],
callOutMerchantId
:
[
{
required
:
true
,
message
:
'请选择调出门店'
,
trigger
:
'change'
}
...
...
@@ -233,11 +287,36 @@ export default {
callInYqMerchantId
:
[
{
required
:
true
,
message
:
'请选择调入仓库'
,
trigger
:
'change'
}
],
callInMerchantId
:
[
{
required
:
true
,
message
:
'请选择调入门店'
,
trigger
:
'change'
}
]
}
},
allocationFormRules
:
{
deliveryNumber
:
[
{
required
:
true
,
message
:
'请输入承运单号'
,
trigger
:
'change'
}
],
deliveryCompany
:
[
{
required
:
true
,
message
:
'请输入承运公司'
,
trigger
:
'change'
}
]
},
oldyqMerchantId
:
''
,
//之前选择的调出仓库
oldMerchantId
:
''
,
//之前选择的调出门店
}
},
created
()
{
...
...
@@ -245,32 +324,134 @@ export default {
// this.callOutYqMerchantList = [{ merchantNo: this.$globalState.session.merchantId + '', merchantName: this.$globalState.session.merchantName }]
// }
},
watch
:
{
'editAllocationForm.callOutYqMerchantId'
(
val
,
oldval
)
{
console
.
log
(
val
,
oldval
,
"监听callOutYqMerchantId"
);
this
.
getListApi
=
this
.
$apis
.
stockManage
.
stockRemainPage
if
(
this
.
callOutYqMerchantList
.
length
==
1
)
{
//当只有一个选项时不弹提示框
this
.
$refs
.
allocationTable
.
refreshTable
()
}
else
{
if
(
val
!=
this
.
oldyqMerchantId
)
{
//与之前的选项不一样
this
.
editAllocationForm
.
callOutMerchantId
=
''
this
.
switchData
(
val
,
oldval
,
'yqMerchant'
)
}
}
},
'editAllocationForm.callOutMerchantId'
(
val
,
oldval
)
{
console
.
log
(
val
,
oldval
,
"监听callOutMerchantId"
);
this
.
getListApi
=
this
.
$apis
.
stockManage
.
stockRemainPage
if
(
this
.
callOutMerchantList
.
length
==
1
)
{
//当只有一个选项时不弹提示框
this
.
$refs
.
allocationTable
.
refreshTable
()
}
else
{
if
(
val
!=
this
.
oldMerchantId
)
{
//与之前的选项不一样
this
.
switchData
(
val
,
oldval
,
'merchant'
)
}
}
}
},
mounted
()
{
// this.editAllocationForm.callOutYqMerchantId = this.callOutYqMerchantList[0].merchantNo
// //调入门店
// 调出仓库
this
.
$apis
.
stockManage
.
getyqMerchantList
({
mainPartnerMerchant
:
true
}).
then
(
res
=>
{
this
.
callOutYqMerchantList
=
res
this
.
callInYqMerchantList
=
res
if
(
this
.
callOutYqMerchantList
&&
this
.
callOutYqMerchantList
.
length
==
1
)
{
this
.
editAllocationForm
.
callOutYqMerchantId
=
this
.
callOutYqMerchantList
[
0
].
merchantNo
this
.
getServicemerchantrefList
(
this
.
editAllocationForm
.
callOutYqMerchantId
,
'out'
)
}
if
(
this
.
callInYqMerchantList
&&
this
.
callInYqMerchantList
.
length
==
1
)
{
this
.
editAllocationForm
.
callInYqMerchantId
=
this
.
callInYqMerchantList
[
0
].
merchantNo
this
.
getServicemerchantrefList
(
this
.
editAllocationForm
.
callInYqMerchantId
,
'in'
)
}
})
//调入仓库
// this.$apis.stockManage.yqRelatedList({ includeSelf: false }).then(res => {
// this.callInYqMerchantList = res
// if (this.callInYqMerchantList && this.callInYqMerchantList.length == 1) {
// this.editAllocationForm.callInYqMerchantId = this.callInYqMerchantList[0].merchantId
// this.getServicemerchantrefList(this.editAllocationForm.callInYqMerchantId, 'in')
// }
// })
// 获取当前登录账号可见的园区店列表
this
.
$apis
.
stockManage
.
getyqMerchantList
({}).
then
(
res
=>
{
this
.
yqMerchantIdList
=
res
if
(
this
.
yqMerchantIdList
&&
this
.
yqMerchantIdList
.
length
==
1
)
{
this
.
editCheckForm
.
yqMerchantId
=
this
.
yqMerchantIdList
[
0
].
merchantNo
this
.
changeYqMerchant
(
this
.
editCheckForm
.
yqMerchantId
)
}
})
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
searchFormSearch
=
this
.
$common
.
utils
.
deepClone
(
this
.
searchForm
)
this
.
editAllocationForm
.
yqMerchantId
=
this
.
editAllocationForm
.
callOutYqMerchantId
this
.
editAllocationForm
.
merchantId
=
this
.
editAllocationForm
.
callOutMerchantId
let
_form
=
{
...
this
.
searchForm
,
...
this
.
editAllocationForm
}
this
.
searchFormSearch
=
this
.
$common
.
utils
.
deepClone
(
_form
)
resolve
()
})
},
handleSearch
()
{
this
.
getListApi
=
this
.
$apis
.
stockManage
.
stockRemainPage
this
.
$refs
.
allocationTable
.
refreshTable
()
},
// 获取仓库门店
getServicemerchantrefList
(
merchantId
,
type
)
{
this
.
$apis
.
stockManage
.
getServicemerchantrefList
({
yqMerchantId
:
merchantId
}).
then
(
res
=>
{
if
(
type
==
'out'
)
{
this
.
callOutMerchantList
=
res
||
[]
//总店
let
_headOffice
=
this
.
callOutYqMerchantList
.
find
(
item
=>
item
.
merchantNo
===
merchantId
)
_headOffice
.
merchantId
=
_headOffice
.
merchantNo
//门店选项中加入总店
this
.
callOutMerchantList
.
push
(
_headOffice
)
if
(
this
.
callOutMerchantList
&&
this
.
callOutMerchantList
.
length
==
1
)
{
this
.
editAllocationForm
.
callOutMerchantId
=
this
.
callOutMerchantList
[
0
].
merchantId
}
}
else
if
(
type
==
'in'
)
{
this
.
callInMerchantList
=
res
||
[]
//总店
let
_headOffice
=
this
.
callInYqMerchantList
.
find
(
item
=>
item
.
merchantNo
===
merchantId
)
_headOffice
.
merchantId
=
_headOffice
.
merchantNo
//门店选项中加入总店
this
.
callInMerchantList
.
push
(
_headOffice
)
if
(
this
.
callInMerchantList
&&
this
.
callInMerchantList
.
length
==
1
)
{
this
.
editAllocationForm
.
callInMerchantId
=
this
.
callOutMerchantList
[
0
].
merchantId
}
}
})
},
switchData
(
val
,
oldval
,
type
)
{
this
.
$confirm
(
'切换调出仓库和调出门店,自动重置已调拨内容;是否确定切换?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
if
(
type
==
'yqMerchant'
)
{
this
.
getServicemerchantrefList
(
val
,
'out'
)
}
//更新调拨数据以及清空调拨确认单数据
this
.
$refs
.
allocationTable
.
refreshTable
()
this
.
chooseDataList
=
[]
})
.
catch
(
err
=>
{
console
.
log
(
err
)
if
(
type
==
'yqMerchant'
)
{
//调出仓库
this
.
editAllocationForm
.
callOutYqMerchantId
=
oldval
this
.
oldyqMerchantId
=
oldval
}
else
if
(
type
==
'merchant'
)
{
//调出门店
this
.
editAllocationForm
.
callOutMerchantId
=
oldval
this
.
oldMerchantId
=
oldval
}
})
},
changeCallInYqMerchant
(
merchantId
)
{
this
.
editAllocationForm
.
callInMerchantId
=
''
this
.
getServicemerchantrefList
(
merchantId
,
'in'
)
},
// 调拨
allocation
(
row
)
{
...
...
@@ -292,16 +473,26 @@ export default {
this
.
allocationNumVisible
=
!
this
.
allocationNumVisible
console
.
log
(
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
},
// 取消
cancelAllocation
(
row
,
index
)
{
this
.
chooseDataList
.
splice
(
index
,
1
)
},
handleAddConfirm
(
data
)
{
this
.
$refs
.
editAllocationFormRef
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
chooseDataList
.
length
==
0
)
{
...
...
@@ -316,6 +507,8 @@ export default {
if
(
data
.
remark
)
{
params
.
remark
=
data
.
remark
}
params
.
deliveryNumber
=
data
.
deliveryNumber
params
.
deliveryCompany
=
data
.
deliveryCompany
params
=
{
...
params
,
...
this
.
editAllocationForm
...
...
src/views/allocation/index.vue
View file @
11a86e2
...
...
@@ -89,7 +89,7 @@ export default {
name
:
'callOutYqMerchantId'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'merchant
Id
'
,
optionId
:
'merchant
No
'
,
optionLabel
:
'merchantName'
,
optionsName
:
'yqRelatedMerchantList'
,
changeAttr
:
(
value
,
targetItem
)
=>
{
...
...
@@ -113,7 +113,7 @@ export default {
name
:
'callInYqMerchantId'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'merchant
Id
'
,
optionId
:
'merchant
No
'
,
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
.
merchant
Id
===
merchantId
)
_headOffice
=
this
.
baseData
.
yqRelatedMerchantList
.
find
(
item
=>
item
.
merchant
No
===
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
.
merchant
Id
===
merchantId
)
_headOffice
=
this
.
baseData
.
yqRelatedMerchantList
.
find
(
item
=>
item
.
merchant
No
===
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
...
...
src/views/check/add.vue
View file @
11a86e2
...
...
@@ -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
:
'
g
oodsName'
prop
:
'
upgradeG
oodsName'
},
{
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
:
'取消'
,
...
...
src/views/check/index.vue
View file @
11a86e2
...
...
@@ -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
...
...
src/views/earlyWarning/index.vue
View file @
11a86e2
...
...
@@ -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
)
}
}
}
...
...
src/views/outbound/index.vue
View file @
11a86e2
...
...
@@ -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
)
}
}
}
...
...
src/views/stock/index.vue
View file @
11a86e2
...
...
@@ -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
},
// 查看详情
...
...
src/views/stock/stockDetailDialog.vue
View file @
11a86e2
<!-- 库存明细弹窗 -->
<
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
...
...
src/views/stock/stockMonthDialog.vue
View file @
11a86e2
<
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
()
{
...
...
src/views/warehousing/index.vue
View file @
11a86e2
...
...
@@ -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
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment