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 e6238208
authored
Aug 10, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
库存对账单联调
1 parent
7ddc4bfd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
183 additions
and
4 deletions
src/api/modules/stockManage.js
src/views/stock/index.vue
src/views/stock/statementOfAccountDialog.vue
src/api/modules/stockManage.js
View file @
e623820
...
...
@@ -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
}
src/views/stock/index.vue
View file @
e623820
...
...
@@ -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
...
...
src/views/stock/statementOfAccountDialog.vue
0 → 100644
View file @
e623820
<!-- 库存对账单弹窗 -->
<
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
()
})
// 获取仓库下的门店列表
this
.
$apis
.
stockManage
.
getServicemerchantrefList
({
yqMerchantId
:
e
}).
then
(
res
=>
{
this
.
merchantList
=
res
||
[]
})
},
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
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