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 7ea4a4f1
authored
Dec 01, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_v4.32.0_1130' into 'develop'
Dev v4.32.0 1130 See merge request
!11
2 parents
e83bb7d7
4651f7eb
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
369 additions
and
370 deletions
src/setup/qiankun.js
src/views/allocation/add.vue
src/views/allocation/allocationDetailDialog.vue
src/views/check/add.vue
src/views/check/index.vue
src/views/check/inventoryDetailDialog.vue
src/views/earlyWarning/index.vue
src/views/outbound/index.vue
src/views/stock/index.vue
src/views/stock/statementOfAccountDialog.vue
src/views/stock/stockDetailDialog.vue
src/views/stock/stockMonthDialog.vue
src/views/warehousing/index.vue
src/setup/qiankun.js
View file @
7ea4a4f
...
...
@@ -11,17 +11,18 @@ let router = null
let
instance
=
null
Vue
.
use
(
ElementUI
)
Vue
.
use
(
GLTable
)
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
const
{
response
,
request
,
sign
,
secret
,
sign_common
,
request_common
,
purchaseType
}
=
await
fetchConfig
(
common
)
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
const
{
response
,
request
,
sign
,
secret
,
sign_common
,
request_common
,
membraneTypeList
}
=
await
fetchConfig
(
common
)
// console.log(purchaseType, 'purchaseType')
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$messageBox
=
messageBox
Vue
.
prototype
.
$
purchaseType
=
purchaseType
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
"md5"
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$
membraneTypeList
=
membraneTypeList
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
'md5'
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
routes
=
getRoutes
(
routesData
)
...
...
src/views/allocation/add.vue
View file @
7ea4a4f
<
template
>
<div
class=
"addWrap"
>
<div
class=
"d2-container-content gl-form-min"
style=
"padding: 10px 20px"
>
<el-form
:inline=
"true"
size=
"small"
:model=
"editAllocationForm"
ref=
"editAllocationFormRef"
:rules=
"formRules"
class=
"demo-form-inline"
>
<div
class=
"d2-container-content gl-form-min"
style=
"padding: 10px 20px"
>
<el-form
:inline=
"true"
size=
"small"
:model=
"editAllocationForm"
ref=
"editAllocationFormRef"
:rules=
"formRules"
class=
"demo-form-inline"
>
<el-form-item>
调出方
</el-form-item>
<el-form-item
label=
"调出仓库:"
prop=
"callOutYqMerchantId"
>
<el-select
v-model=
"editAllocationForm.callOutYqMerchantId"
style=
"width: 300px"
>
<el-option
v-for=
"item in callOutYqMerchantList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
/>
<el-form-item
label=
"调出仓库:"
prop=
"callOutYqMerchantId"
>
<el-select
v-model=
"editAllocationForm.callOutYqMerchantId"
style=
"width: 300px"
>
<el-option
v-for=
"item in callOutYqMerchantList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
/>
</el-select>
</el-form-item>
<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-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-form-item
label=
"调入仓库:"
prop=
"callInYqMerchantId"
>
<el-select
v-model=
"editAllocationForm.callInYqMerchantId"
@
change=
"changeCallInYqMerchant(editAllocationForm.callInYqMerchantId)"
style=
"width: 300px"
>
<el-option
v-for=
"item in callInYqMerchantList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
/>
@
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"
/>
<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"
/>
</el-select>
</el-form-item>
</el-form>
...
...
@@ -58,68 +36,41 @@
<div
class=
"d2-container-content"
>
<div
style=
"padding: 15px 0"
>
<div
class=
"gl-form-min"
>
<el-form
:inline=
"true"
size=
"small"
:model=
"editAllocationForm"
>
<el-form
:inline=
"true"
size=
"small"
:model=
"editAllocationForm"
>
<el-form-item
label=
""
>
<el-input
v-model=
"searchForm.upgradeGoodsNameOrSeries"
style=
"width: 200px"
placeholder=
"请输入商品名称/系列"
maxlength=
"20"
clearable
/>
<el-input
v-model=
"searchForm.upgradeGoodsNameOrSeries"
style=
"width: 200px"
placeholder=
"请输入商品名称/系列"
maxlength=
"20"
clearable
/>
</el-form-item>
<el-button
@
click=
"handleSearch"
size=
"small"
type=
"primary"
style=
"marginleft: 15px"
>
查询
</el-button>
<el-button
@
click=
"handleSearch"
size=
"small"
type=
"primary"
style=
"marginleft: 15px"
>
查询
</el-button>
</el-form>
</div>
</div>
<GLTable
ref=
"allocationTable"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
:searchForm=
"searchFormSearch"
:tableParams=
"tableParams"
:beforeSearchFn=
"beforeSearchFn"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"allocation(scope.scope)"
:disabled=
"setDisabled(scope.scope)"
>
选择
</el-button>
<GLTable
ref=
"allocationTable"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
:searchForm=
"searchFormSearch"
:tableParams=
"tableParams"
:beforeSearchFn=
"beforeSearchFn"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"allocation(scope.scope)"
:disabled=
"setDisabled(scope.scope)"
>
选择
</el-button>
</div>
</GLTable>
</div>
<div
class=
"d2-container-content"
>
<p
class=
"title"
>
调拨确认单
</p>
<GLTable
ref=
"allocationTable2"
:tableData=
"chooseDataList"
:tableParams=
"tableParams2"
:hasPage=
"false"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"cancelAllocation(scope.row, scope.$index)"
>
取消
</el-button>
<GLTable
ref=
"allocationTable2"
:tableData=
"chooseDataList"
:tableParams=
"tableParams2"
:hasPage=
"false"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"cancelAllocation(scope.row, scope.$index)"
>
取消
</el-button>
</div>
</GLTable>
</div>
<glsx-form
ref=
"allocationForm"
:rules=
"allocationFormRules"
:origin-data=
"editData"
:form-list=
"editForm"
form-ref=
"inveFormRef"
@
handleAddConfirm=
"handleAddConfirm"
@
handleClose=
"handleAddClose"
></glsx-form>
<glsx-form
ref=
"allocationForm"
:rules=
"allocationFormRules"
:origin-data=
"editData"
:form-list=
"editForm"
form-ref=
"inveFormRef"
@
handleAddConfirm=
"handleAddConfirm"
@
handleClose=
"handleAddClose"
></glsx-form>
<!-- 盘点 -->
<allocation-num-dialog
:allocation-num-visible=
"allocationNumVisible"
:allocation-info=
"allocationInfo"
v-if=
"allocationNumVisible"
@
dialogClose=
"dialogClose"
/>
<allocation-num-dialog
:allocation-num-visible=
"allocationNumVisible"
:allocation-info=
"allocationInfo"
v-if=
"allocationNumVisible"
@
dialogClose=
"dialogClose"
/>
</div>
</
template
>
<
script
>
import
allocationNumDialog
from
'./allocationNumDialog'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'allocationList'
,
components
:
{
...
...
@@ -131,7 +82,7 @@ export default {
callInYqMerchantList
:
[],
callOutMerchantList
:
[],
callInMerchantList
:
[],
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
searchForm
:
{
upgradeGoodsNameOrSeries
:
''
,
stockFlag
:
true
...
...
@@ -177,7 +128,7 @@ export default {
label
:
'库存'
,
prop
:
'stock'
,
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
)
?
'米'
:
'件'
)
:
'-'
}
},
{
...
...
@@ -187,6 +138,10 @@ export default {
{
label
:
'所属门店'
,
prop
:
'merchantName'
},
{
label
:
'膜卷号'
,
prop
:
'filmRollNo'
}
]
},
...
...
@@ -216,15 +171,19 @@ export default {
label
:
'库存'
,
prop
:
'stock'
,
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
)
?
'米'
:
'件'
)
:
'-'
}
},
{
label
:
'调拨库存'
,
prop
:
'allocateNumber '
,
formatter
:
cellValue
=>
{
return
cellValue
.
allocateNumber
||
cellValue
.
allocateNumber
==
0
?
parseFloat
(
cellValue
.
allocateNumber
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
allocateNumber
||
cellValue
.
allocateNumber
==
0
?
parseFloat
(
cellValue
.
allocateNumber
).
toFixed
(
2
)
+
(
this
.
$
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
}
},
{
label
:
'膜卷号'
,
prop
:
'filmRollNo'
}
]
},
...
...
@@ -254,16 +213,16 @@ export default {
label
:
'备注说明'
,
type
:
'textarea'
,
maxlength
:
100
}
,
}
]
}
],
editAllocationForm
:
{
callOutYqMerchantId
:
''
,
//调出仓库
callOutMerchantId
:
''
,
//调出门店
callInYqMerchantId
:
''
,
//调入仓库
callInMerchantId
:
''
,
//调入门店
callOutYqMerchantId
:
''
,
//调出仓库
callOutMerchantId
:
''
,
//调出门店
callInYqMerchantId
:
''
,
//调入仓库
callInMerchantId
:
''
//调入门店
},
allocationNumVisible
:
false
,
...
...
@@ -315,8 +274,8 @@ export default {
}
]
},
oldyqMerchantId
:
''
,
//之前选择的调出仓库
oldMerchantId
:
''
,
//之前选择的调出门店
oldyqMerchantId
:
''
,
//之前选择的调出仓库
oldMerchantId
:
''
//之前选择的调出门店
}
},
created
()
{
...
...
@@ -326,12 +285,14 @@ export default {
},
watch
:
{
'editAllocationForm.callOutYqMerchantId'
(
val
,
oldval
)
{
console
.
log
(
val
,
oldval
,
"监听callOutYqMerchantId"
);
console
.
log
(
val
,
oldval
,
'监听callOutYqMerchantId'
)
// this.getListApi = this.$apis.stockManage.stockRemainPage
if
(
this
.
callOutYqMerchantList
.
length
==
1
)
{
//当只有一个选项时不弹提示框
if
(
this
.
callOutYqMerchantList
.
length
==
1
)
{
//当只有一个选项时不弹提示框
// this.$refs.allocationTable.refreshTable()
}
else
{
if
(
val
!=
this
.
oldyqMerchantId
)
{
//与之前的选项不一样
if
(
val
!=
this
.
oldyqMerchantId
)
{
//与之前的选项不一样
this
.
editAllocationForm
.
callOutMerchantId
=
''
this
.
switchData
(
val
,
oldval
,
'yqMerchant'
)
}
...
...
@@ -339,12 +300,14 @@ export default {
},
'editAllocationForm.callOutMerchantId'
(
val
,
oldval
)
{
console
.
log
(
val
,
oldval
,
"监听callOutMerchantId"
);
console
.
log
(
val
,
oldval
,
'监听callOutMerchantId'
)
this
.
getListApi
=
this
.
$apis
.
stockManage
.
stockRemainPage
if
(
this
.
callOutMerchantList
.
length
==
1
)
{
//当只有一个选项时不弹提示框
if
(
this
.
callOutMerchantList
.
length
==
1
)
{
//当只有一个选项时不弹提示框
this
.
$refs
.
allocationTable
.
refreshTable
()
}
else
{
if
(
val
!=
this
.
oldMerchantId
)
{
//与之前的选项不一样
if
(
val
!=
this
.
oldMerchantId
)
{
//与之前的选项不一样
this
.
switchData
(
val
,
oldval
,
'merchant'
)
}
}
...
...
@@ -394,36 +357,38 @@ export default {
},
// 获取仓库门店
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
.
callInMerchantList
[
0
].
merchantId
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
.
callInMerchantList
[
0
].
merchantId
}
}
}
})
})
},
switchData
(
val
,
oldval
,
type
)
{
if
(
this
.
chooseDataList
&&
this
.
chooseDataList
.
length
>
0
)
{
//当盘存确认单有数据时提示
if
(
this
.
chooseDataList
&&
this
.
chooseDataList
.
length
>
0
)
{
//当盘存确认单有数据时提示
this
.
$confirm
(
'切换调出仓库和调出门店,自动重置已调拨内容;是否确定切换?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -432,7 +397,8 @@ export default {
.
then
(()
=>
{
if
(
type
==
'yqMerchant'
)
{
this
.
getServicemerchantrefList
(
val
,
'out'
)
}
else
{
//选择门店以后才更新盘存数据
}
else
{
//选择门店以后才更新盘存数据
this
.
$refs
.
allocationTable
.
refreshTable
()
}
//清空调拨确认单数据
...
...
@@ -440,10 +406,12 @@ export default {
})
.
catch
(
err
=>
{
console
.
log
(
err
)
if
(
type
==
'yqMerchant'
)
{
//调出仓库
if
(
type
==
'yqMerchant'
)
{
//调出仓库
this
.
editAllocationForm
.
callOutYqMerchantId
=
oldval
this
.
oldyqMerchantId
=
oldval
}
else
if
(
type
==
'merchant'
)
{
//调出门店
}
else
if
(
type
==
'merchant'
)
{
//调出门店
this
.
editAllocationForm
.
callOutMerchantId
=
oldval
this
.
oldMerchantId
=
oldval
}
...
...
@@ -451,7 +419,8 @@ export default {
}
else
{
if
(
type
==
'yqMerchant'
)
{
this
.
getServicemerchantrefList
(
val
,
'out'
)
}
else
{
//选择门店以后才更新盘存数据
}
else
{
//选择门店以后才更新盘存数据
this
.
$refs
.
allocationTable
.
refreshTable
()
}
}
...
...
@@ -572,5 +541,4 @@ export default {
display
:
inline-block
;
box-sizing
:
border-box
;
margin-right
:
10px
;
}
</
style
>
}
</
style
>
src/views/allocation/allocationDetailDialog.vue
View file @
7ea4a4f
...
...
@@ -5,8 +5,7 @@
<div>
<div
class=
"d2-container-content"
>
<GLTable
ref=
"recordTable"
:getListApi=
"getListApi"
:searchForm=
"searchFormSearch"
:tableParams=
"tableParams"
:beforeSearchFn=
"beforeSearchFn"
>
</GLTable>
:beforeSearchFn=
"beforeSearchFn"
></GLTable>
</div>
</div>
<!--
<span
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -16,12 +15,12 @@
</
template
>
<
script
>
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'allocationDetailDialog'
,
data
()
{
return
{
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
searchForm
:
{
id
:
''
},
...
...
@@ -40,7 +39,7 @@ export default {
},
{
label
:
'商品编码'
,
prop
:
'productCode'
,
prop
:
'productCode'
// width: 250
},
{
...
...
@@ -55,8 +54,12 @@ export default {
label
:
'调拨数量'
,
prop
:
'allocateNumber'
,
formatter
:
cellValue
=>
{
return
cellValue
.
allocateNumber
||
cellValue
.
allocateNumber
==
0
?
parseFloat
(
cellValue
.
allocateNumber
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
allocateNumber
||
cellValue
.
allocateNumber
==
0
?
parseFloat
(
cellValue
.
allocateNumber
).
toFixed
(
2
)
+
(
this
.
$
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
}
},
{
label
:
'膜卷号'
,
prop
:
'filmRollNo'
}
]
},
...
...
src/views/check/add.vue
View file @
7ea4a4f
<!-- 创建盘点 -->
<
template
>
<div
class=
"addWrap"
>
<div
class=
"d2-container-content gl-form-min"
style=
"padding: 10px 20px"
>
<el-form
:inline=
"true"
size=
"small"
:model=
"editCheckForm"
ref=
"editCheckFormRef"
:rules=
"formRules"
class=
"demo-form-inline"
>
<el-form-item
label=
"盘点仓库:"
prop=
"yqMerchantId"
>
<el-select
v-model=
"editCheckForm.yqMerchantId"
@
change=
"changeYqMerchant(editCheckForm.yqMerchantId)"
style=
"width: 300px"
>
<el-option
v-for=
"item in yqMerchantIdList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
/>
<div
class=
"d2-container-content gl-form-min"
style=
"padding: 10px 20px"
>
<el-form
:inline=
"true"
size=
"small"
:model=
"editCheckForm"
ref=
"editCheckFormRef"
:rules=
"formRules"
class=
"demo-form-inline"
>
<el-form-item
label=
"盘点仓库:"
prop=
"yqMerchantId"
>
<el-select
v-model=
"editCheckForm.yqMerchantId"
@
change=
"changeYqMerchant(editCheckForm.yqMerchantId)"
style=
"width: 300px"
>
<el-option
v-for=
"item in yqMerchantIdList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"盘点门店:"
prop=
"merchantId"
>
<el-select
v-model=
"editCheckForm.merchantId"
@
change=
"changeMerchant(editCheckForm.merchantId)"
style=
"width: 300px"
>
<el-option
v-for=
"item in merchantList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
/>
<el-form-item
label=
"盘点门店:"
prop=
"merchantId"
>
<el-select
v-model=
"editCheckForm.merchantId"
@
change=
"changeMerchant(editCheckForm.merchantId)"
style=
"width: 300px"
>
<el-option
v-for=
"item in merchantList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
/>
</el-select>
</el-form-item>
</el-form>
...
...
@@ -37,54 +24,33 @@
<p
class=
"title"
>
盘存
</p>
<div
style=
"padding: 15px 0"
>
<div
class=
"gl-form-min"
>
<el-form
ref=
"ruleForm"
:model=
"searchForm"
size=
"small"
inline=
"true"
>
<el-form
ref=
"ruleForm"
:model=
"searchForm"
size=
"small"
inline=
"true"
>
<el-form-item
label=
""
>
<el-input
v-model=
"searchForm.upgradeGoodsNameOrSeries"
style=
"width: 200px"
placeholder=
"请输入商品名称/系列"
maxlength=
"20"
clearable
/>
<el-input
v-model=
"searchForm.upgradeGoodsNameOrSeries"
style=
"width: 200px"
placeholder=
"请输入商品名称/系列"
maxlength=
"20"
clearable
/>
</el-form-item>
<el-button
@
click=
"handleSearch"
size=
"small"
type=
"primary"
>
查询
</el-button>
<el-button
@
click=
"handleSearch"
size=
"small"
type=
"primary"
>
查询
</el-button>
</el-form>
</div>
</div>
<p
class=
"title"
>
盘存
</p>
<GLTable
ref=
"recordTable"
:getListApi=
"getListApi"
:searchForm=
"searchFormSearch"
:tableParams=
"tableParams"
:beforeSearchFn=
"beforeSearchFn"
:pageConf=
"pageConf"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"inventory(scope.scope)"
:disabled=
"setDisabled(scope.scope)"
>
盘点
</el-button>
<GLTable
ref=
"recordTable"
:getListApi=
"getListApi"
:searchForm=
"searchFormSearch"
:tableParams=
"tableParams"
:beforeSearchFn=
"beforeSearchFn"
:pageConf=
"pageConf"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"inventory(scope.scope)"
:disabled=
"setDisabled(scope.scope)"
>
盘点
</el-button>
</div>
</GLTable>
</div>
<div
class=
"d2-container-content"
>
<p
class=
"title"
>
盘存确认单
</p>
<GLTable
ref=
"recordTable2"
:tableData=
"chooseDataList"
:tableParams=
"tableParams2"
:hasPage=
"false"
>
<template
slot=
"profitAndLoss"
slot-scope=
"scope"
>
<GLTable
ref=
"recordTable2"
:tableData=
"chooseDataList"
:tableParams=
"tableParams2"
:hasPage=
"false"
>
<template
slot=
"profitAndLoss"
slot-scope=
"scope"
>
<span
v-if=
"scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0"
>
<span
v-if=
"parseFloat(scope.scope.profitAndLoss) > 0"
style=
"color: blue"
>
{{
'+'
+
<span
v-if=
"parseFloat(scope.scope.profitAndLoss) > 0"
style=
"color: blue"
>
{{
'+'
+
parseFloat
(
scope
.
scope
.
profitAndLoss
).
toFixed
(
2
)
+
(
membraneTypeList
.
includes
(
scope
.
scope
.
goodsType
)
?
'米'
:
'件'
)
}}
</span>
<span
v-else-if=
"parseFloat(scope.scope.profitAndLoss)
< 0
"
style=
"color: red"
>
{{
<span
v-else-if=
"parseFloat(scope.scope.profitAndLoss)
< 0
"
style=
"color: red"
>
{{
parseFloat
(
scope
.
scope
.
profitAndLoss
).
toFixed
(
2
)
+
(
membraneTypeList
.
includes
(
scope
.
scope
.
goodsType
)
?
'米'
:
'件'
)
}}
</span>
<span
v-else
>
{{
parseFloat
(
scope
.
scope
.
profitAndLoss
).
toFixed
(
2
)
+
...
...
@@ -92,30 +58,22 @@
</span>
<span
v-else
>
-
</span>
</
template
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"cancelInventory(scope.row, scope.$index)"
>
取消
</el-button>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"cancelInventory(scope.row, scope.$index)"
>
取消
</el-button>
</div>
</GLTable>
</div>
<glsx-form
ref=
"addInventoryForm"
:origin-data=
"editData"
:form-list=
"editForm"
form-ref=
"inveFormRef"
@
handleAddConfirm=
"handleAddConfirm"
@
handleClose=
"handleAddClose"
></glsx-form>
<glsx-form
ref=
"addInventoryForm"
:origin-data=
"editData"
:form-list=
"editForm"
form-ref=
"inveFormRef"
@
handleAddConfirm=
"handleAddConfirm"
@
handleClose=
"handleAddClose"
></glsx-form>
<!-- 盘点 -->
<inventory-num-dialog
:inventory-num-visible=
"inventoryNumVisible"
:record-info=
"recordInfo"
v-if=
"inventoryNumVisible"
@
dialogClose=
"dialogClose"
/>
<inventory-num-dialog
:inventory-num-visible=
"inventoryNumVisible"
:record-info=
"recordInfo"
v-if=
"inventoryNumVisible"
@
dialogClose=
"dialogClose"
/>
</div>
</template>
<
script
>
import
inventoryNumDialog
from
'./inventoryNumDialog'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'InventoryList'
,
components
:
{
...
...
@@ -123,7 +81,7 @@ export default {
},
data
()
{
return
{
membraneTypeList
:
membraneTypeList
,
membraneTypeList
:
this
.
$
membraneTypeList
,
searchForm
:
{
upgradeGoodsNameOrSeries
:
''
},
...
...
@@ -159,7 +117,7 @@ export default {
label
:
'库存'
,
prop
:
'stock'
,
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
)
?
'米'
:
'件'
)
:
'-'
}
},
{
...
...
@@ -169,6 +127,10 @@ export default {
{
label
:
'所属门店'
,
prop
:
'merchantName'
},
{
label
:
'膜卷号'
,
prop
:
'filmRollNo'
}
]
},
...
...
@@ -198,14 +160,14 @@ export default {
label
:
'系统库存'
,
prop
:
'stock'
,
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
)
?
'米'
:
'件'
)
:
'-'
}
},
{
label
:
'盘点库存'
,
prop
:
'checkStock'
,
formatter
:
cellValue
=>
{
return
cellValue
.
checkStock
||
cellValue
.
checkStock
==
0
?
parseFloat
(
cellValue
.
checkStock
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
checkStock
||
cellValue
.
checkStock
==
0
?
parseFloat
(
cellValue
.
checkStock
).
toFixed
(
2
)
+
(
this
.
$
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
}
},
{
...
...
@@ -220,6 +182,10 @@ export default {
{
label
:
'所属门店'
,
prop
:
'merchantName'
},
{
label
:
'膜卷号'
,
prop
:
'filmRollNo'
}
]
},
...
...
@@ -274,21 +240,23 @@ export default {
}
]
},
yqMerchantIdList
:
[],
//盘点仓库
merchantList
:
[],
//盘点门店
oldyqMerchantId
:
''
,
//之前选择的仓库
oldMerchantId
:
''
,
//之前选择的门店
yqMerchantIdList
:
[],
//盘点仓库
merchantList
:
[],
//盘点门店
oldyqMerchantId
:
''
,
//之前选择的仓库
oldMerchantId
:
''
//之前选择的门店
}
},
watch
:
{
'editCheckForm.yqMerchantId'
(
val
,
oldval
)
{
console
.
log
(
val
,
oldval
,
"监听yqMerchantId"
);
console
.
log
(
val
,
oldval
,
'监听yqMerchantId'
)
// this.getListApi = this.$apis.stockManage.stockRemainPage
if
(
this
.
yqMerchantIdList
.
length
==
1
)
{
//当只有一个选项时不弹提示框
if
(
this
.
yqMerchantIdList
.
length
==
1
)
{
//当只有一个选项时不弹提示框
// this.$refs.recordTable.refreshTable()
}
else
{
if
(
val
!=
this
.
oldyqMerchantId
)
{
//与之前的选项不一样
if
(
val
!=
this
.
oldyqMerchantId
)
{
//与之前的选项不一样
this
.
editCheckForm
.
merchantId
=
''
this
.
switchData
(
val
,
oldval
,
'yqMerchant'
)
}
...
...
@@ -296,12 +264,13 @@ export default {
},
'editCheckForm.merchantId'
(
val
,
oldval2
)
{
console
.
log
(
val
,
oldval2
,
"监听merchantId"
);
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
)
{
//与之前的选项不一样
if
(
val
!=
this
.
oldMerchantId
)
{
//与之前的选项不一样
this
.
switchData
(
val
,
oldval2
,
'merchant'
)
}
}
...
...
@@ -320,7 +289,6 @@ export default {
},
methods
:
{
changeYqMerchant
(
merchantId
)
{
// this.switchData(merchantId, 'yqMerchant')
},
...
...
@@ -331,23 +299,26 @@ export default {
// 获取仓库门店
getServicemerchantrefList
(
merchantId
)
{
this
.
$apis
.
stockManage
.
getServicemerchantrefList
({
yqMerchantId
:
merchantId
}).
then
(
res
=>
{
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
)
{
this
.
editCheckForm
.
merchantId
=
this
.
merchantList
[
0
].
merchantId
}
})
this
.
$apis
.
stockManage
.
getServicemerchantrefList
({
yqMerchantId
:
merchantId
})
.
then
(
res
=>
{
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
)
{
this
.
editCheckForm
.
merchantId
=
this
.
merchantList
[
0
].
merchantId
}
})
},
switchData
(
val
,
oldval
,
type
)
{
if
(
this
.
chooseDataList
&&
this
.
chooseDataList
.
length
>
0
)
{
//当盘存确认单有数据时提示
if
(
this
.
chooseDataList
&&
this
.
chooseDataList
.
length
>
0
)
{
//当盘存确认单有数据时提示
this
.
$confirm
(
'切换盘点仓库和盘点门店,自动重置已盘点内容;是否确定切换?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -356,7 +327,8 @@ export default {
.
then
(()
=>
{
if
(
type
==
'yqMerchant'
)
{
this
.
getServicemerchantrefList
(
val
)
}
else
{
//选择门店以后才更新盘存数据
}
else
{
//选择门店以后才更新盘存数据
this
.
$refs
.
recordTable
.
refreshTable
()
}
//清空盘存确认单数据
...
...
@@ -375,7 +347,8 @@ export default {
}
else
{
if
(
type
==
'yqMerchant'
)
{
this
.
getServicemerchantrefList
(
val
)
}
else
{
//选择门店以后才更新盘存数据
}
else
{
//选择门店以后才更新盘存数据
this
.
$refs
.
recordTable
.
refreshTable
()
}
}
...
...
@@ -407,7 +380,7 @@ export default {
},
handleSearch
()
{
console
.
log
(
this
.
searchFormSearch
)
;
console
.
log
(
this
.
searchFormSearch
)
if
(
this
.
searchFormSearch
.
yqMerchantId
&&
this
.
searchFormSearch
.
merchantId
)
{
this
.
getListApi
=
this
.
$apis
.
stockManage
.
stockRemainPage
...
...
@@ -415,7 +388,7 @@ export default {
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
"请选择仓库和门店再查询数据"
message
:
'请选择仓库和门店再查询数据'
})
}
},
...
...
@@ -438,7 +411,7 @@ export default {
dialogClose
(
chooseData
)
{
this
.
inventoryNumVisible
=
!
this
.
inventoryNumVisible
console
.
log
(
'chooseData'
,
chooseData
)
;
console
.
log
(
'chooseData'
,
chooseData
)
if
(
chooseData
)
{
chooseData
=
this
.
fieldConvert
(
chooseData
)
this
.
chooseDataList
.
push
(
chooseData
)
...
...
@@ -531,5 +504,4 @@ export default {
display
:
inline-block
;
box-sizing
:
border-box
;
margin-right
:
10px
;
}
</
style
>
}
</
style
>
src/views/check/index.vue
View file @
7ea4a4f
<
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>
...
...
@@ -11,7 +12,9 @@
</div>
<!-- 表格区域 开始 -->
<GLTable
ref=
"checkRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"checkRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"img"
slot-scope=
"scope"
v-if=
"scope.scope.voucherPic"
>
<img
class=
"img-36"
:src=
"scope.scope.voucherPic"
@
click=
"handleEnlargeImg(scope.scope.voucherPic)"
/>
</div>
...
...
@@ -26,14 +29,15 @@
<img
width=
"100%"
:src=
"previewImgUrl"
alt=
"图片"
/>
</el-dialog>
<!-- 查看 -->
<inventory-detail-dialog
:inventory-detail-visible=
"inventoryDetailVisible"
:recordInfo=
"recordInfo"
v-if=
"inventoryDetailVisible"
@
dialogClose=
"dialogClose"
/>
<inventory-detail-dialog
:inventory-detail-visible=
"inventoryDetailVisible"
:recordInfo=
"recordInfo"
v-if=
"inventoryDetailVisible"
@
dialogClose=
"dialogClose"
/>
</div>
</
template
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
import
inventoryDetailDialog
from
'./inventoryDetailDialog'
export
default
{
name
:
'warehousing'
,
...
...
@@ -42,7 +46,7 @@ export default {
},
data
()
{
return
{
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
size
:
'small'
,
url
:
url
,
searchForm
:
{
...
...
@@ -271,15 +275,16 @@ export default {
<
style
scoped
lang=
"scss"
>
@import
'@/assets/css/mixin.scss'
;
.purchase
{
.table-header
{
@include
space-between_center;
margin-bottom
:
10px
;
h2
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#333
;
}
}
}
</
style
>
}
</
style
>
src/views/check/inventoryDetailDialog.vue
View file @
7ea4a4f
...
...
@@ -33,12 +33,12 @@
</template>
<
script
>
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'InventoryDetailDialog'
,
data
()
{
return
{
membraneTypeList
:
membraneTypeList
,
membraneTypeList
:
this
.
$
membraneTypeList
,
countObj
:
{},
searchForm
:
{
id
:
''
...
...
@@ -60,7 +60,7 @@ export default {
},
{
label
:
'商品编码'
,
prop
:
'productCode'
,
prop
:
'productCode'
// width: 250
},
{
...
...
@@ -75,14 +75,14 @@ export default {
label
:
'系统库存'
,
prop
:
'stock'
,
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
)
?
'米'
:
'件'
)
:
'-'
}
},
{
label
:
'盘点库存'
,
prop
:
'checkStock'
,
formatter
:
cellValue
=>
{
return
cellValue
.
checkStock
||
cellValue
.
checkStock
==
0
?
parseFloat
(
cellValue
.
checkStock
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
checkStock
||
cellValue
.
checkStock
==
0
?
parseFloat
(
cellValue
.
checkStock
).
toFixed
(
2
)
+
(
this
.
$
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
}
},
{
...
...
@@ -92,6 +92,10 @@ export default {
// formatter: (cellValue) => {
// return cellValue.checkTime ? Util.dateFormate(cellValue.checkTime, 'YYYY-MM-DD HH:mm:ss') : ''
// }
},
{
label
:
'膜卷号'
,
prop
:
'filmRollNo'
}
]
},
...
...
@@ -138,5 +142,4 @@ export default {
.inventoryDetailDailog
.el-dialog
{
margin-top
:
20vh
!important
;
min-width
:
700px
;
}
</
style
>
}
</
style
>
src/views/earlyWarning/index.vue
View file @
7ea4a4f
<
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>
...
...
@@ -11,7 +12,9 @@
</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>
...
...
@@ -19,12 +22,12 @@
<
script
>
import
url
from
'@/assets/empty.png'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'earlyWarning'
,
data
()
{
return
{
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
size
:
'small'
,
url
:
url
,
searchForm
:
{
...
...
@@ -119,21 +122,21 @@ export default {
label
:
'库存'
,
prop
:
'stock'
,
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
)
?
'米'
:
'件'
)
:
'-'
}
},
{
label
:
'最低库存'
,
prop
:
'warningValue'
,
formatter
:
cellValue
=>
{
return
cellValue
.
warningValue
||
cellValue
.
warningValue
==
0
?
parseFloat
(
cellValue
.
warningValue
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
warningValue
||
cellValue
.
warningValue
==
0
?
parseFloat
(
cellValue
.
warningValue
).
toFixed
(
2
)
+
(
this
.
$
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
}
},
{
label
:
'最高库存'
,
prop
:
'warningValueMax'
,
formatter
:
cellValue
=>
{
return
cellValue
.
warningValueMax
||
cellValue
.
warningValueMax
==
0
?
parseFloat
(
cellValue
.
warningValueMax
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
warningValueMax
||
cellValue
.
warningValueMax
==
0
?
parseFloat
(
cellValue
.
warningValueMax
).
toFixed
(
2
)
+
(
this
.
$
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
}
},
{
...
...
@@ -288,15 +291,16 @@ export default {
<
style
scoped
lang=
"scss"
>
@import
'@/assets/css/mixin.scss'
;
.purchase
{
.table-header
{
@include
space-between_center;
margin-bottom
:
10px
;
h2
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#333
;
}
}
}
</
style
>
}
</
style
>
src/views/outbound/index.vue
View file @
7ea4a4f
<
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"
>
<div>
合计:出库数量
...
...
@@ -13,7 +14,9 @@
</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>
...
...
@@ -22,12 +25,12 @@
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'warehousing'
,
data
()
{
return
{
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
size
:
'small'
,
totalObj
:
{},
url
:
url
,
...
...
@@ -139,6 +142,13 @@ export default {
optionId
:
'confId'
,
optionLabel
:
'confLabel'
,
optionsName
:
'upgradeFlagList'
},
{
label
:
'膜卷号'
,
name
:
'filmRollNo'
,
type
:
'input'
,
maxlength
:
'50'
,
isClear
:
true
}
],
// 表格
...
...
@@ -181,7 +191,7 @@ export default {
label
:
'出库数量'
,
prop
:
'reduceStockNum'
,
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
},
...
...
@@ -207,6 +217,11 @@ export default {
width
:
200
},
{
label
:
'膜卷号'
,
prop
:
'filmRollNo'
,
minWidth
:
150
},
{
label
:
'订单类型'
,
prop
:
''
,
formatter
:
cellValue
=>
{
...
...
@@ -400,8 +415,8 @@ export default {
color
:
#333
;
}
}
.txt-blue
{
color
:
#5850ff
;
}
}
</
style
>
}
</
style
>
src/views/stock/index.vue
View file @
7ea4a4f
<
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"
>
<div>
合计:当前库存
...
...
@@ -14,7 +15,9 @@
</div>
<!-- 表格区域 开始 -->
<GLTable
ref=
"stockRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<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>
...
...
@@ -23,21 +26,20 @@
<!-- 表格区域 end -->
</div>
<!-- 查看 -->
<stock-month-dialog
:stock-month-visible=
"stockMonthVisible"
:stockInfo=
"stockInfo"
v-if=
"stockMonthVisible"
@
dialogClose=
"dialogClose"
/>
<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>
<statementOfAccountDialog
:visible
.
sync=
"statementOfAccountDialogVisible"
v-if=
"statementOfAccountDialogVisible"
:yqMerchantList=
"baseData.yqMerchantList"
@
handleRelateProConfirm=
"handleRelateProConfirm"
>
</statementOfAccountDialog>
</div>
</
template
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
import
stockMonthDialog
from
'./stockMonthDialog'
import
stockDetailDialog
from
'./stockDetailDialog'
import
statementOfAccountDialog
from
'./statementOfAccountDialog'
...
...
@@ -50,7 +52,7 @@ export default {
},
data
()
{
return
{
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
size
:
'small'
,
totalInventory
:
''
,
url
:
url
,
...
...
@@ -137,7 +139,7 @@ export default {
label
:
'上月结存库存'
,
prop
:
'lastMonthRemainStock'
,
formatter
:
cellValue
=>
{
return
cellValue
.
lastMonthRemainStock
||
cellValue
.
lastMonthRemainStock
==
0
?
parseFloat
(
cellValue
.
lastMonthRemainStock
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
lastMonthRemainStock
||
cellValue
.
lastMonthRemainStock
==
0
?
parseFloat
(
cellValue
.
lastMonthRemainStock
).
toFixed
(
2
)
+
(
this
.
$
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
}
},
{
...
...
@@ -151,7 +153,7 @@ export default {
label
:
'当前库存'
,
prop
:
'stock'
,
formatter
:
cellValue
=>
{
return
cellValue
.
stock
||
cellValue
.
stock
==
0
?
parseFloat
(
cellValue
.
stock
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
==
1
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
stock
||
cellValue
.
stock
==
0
?
parseFloat
(
cellValue
.
stock
).
toFixed
(
2
)
+
(
this
.
$
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
==
1
?
'米'
:
'件'
)
:
'-'
}
},
{
...
...
@@ -299,8 +301,8 @@ export default {
color
:
#333
;
}
}
.txt-blue
{
color
:
#5850ff
;
}
}
</
style
>
}
</
style
>
src/views/stock/statementOfAccountDialog.vue
View file @
7ea4a4f
<!-- 库存对账单弹窗 -->
<
template
>
<GLDialog
title=
"库存对账单"
:visible
.
sync=
"dialogVisible"
class=
"statementOfAccountDialog"
:destroy-on-close=
"true"
:close-on-click-modal=
"false"
:before-close=
"handleClose"
@
onOk=
"handleConfirm"
@
onCancel=
"handleClose"
>
<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-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
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-option
v-for=
"(subItem, subIndex) in merchantList"
:key=
"subIndex"
:value=
"subItem.merchantId"
:label=
"subItem.merchantName"
></el-option>
</el-select>
</el-form-item>
</el-form>
...
...
@@ -32,7 +27,7 @@
<
script
>
import
{
beforeRangePickerOptions
}
from
'@/components/glsx-combi-form/common'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'statementOfAccountDialog'
,
...
...
@@ -54,7 +49,7 @@ export default {
yqMerchantId
:
''
,
merchantId
:
''
},
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
formRules
:
{
dataMonthStr
:
[{
required
:
true
,
message
:
'请选择时间'
,
trigger
:
'change'
}],
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择仓库'
,
trigger
:
'change'
}],
...
...
@@ -105,12 +100,14 @@ export default {
_headOffice
=
this
.
stockList
.
find
(
item
=>
item
.
merchantNo
===
e
)
_headOffice
.
merchantId
=
_headOffice
.
merchantNo
// 获取仓库下的门店列表
this
.
$apis
.
stockManage
.
getServicemerchantrefList
({
yqMerchantId
:
e
}).
then
(
res
=>
{
this
.
merchantList
=
res
||
[]
this
.
merchantList
.
push
(
_headOffice
)
// 园区店可选择自己
})
this
.
$apis
.
stockManage
.
getServicemerchantrefList
({
yqMerchantId
:
e
})
.
then
(
res
=>
{
this
.
merchantList
=
res
||
[]
this
.
merchantList
.
push
(
_headOffice
)
// 园区店可选择自己
})
},
handleClose
()
{
this
.
dialogVisible
=
false
...
...
@@ -126,9 +123,8 @@ export default {
}
</
script
>
<
style
scoped
lang=
"scss"
>
.statementOfAccountDialog
{
.form-node{
.statementOfAccountDialog
{
.form-node
{
width
:
432px
;
}
}
...
...
@@ -140,8 +136,8 @@ export default {
background
:
#5850ff
;
border-radius
:
18px
;
}
.el-month-table
td
.today
.cell
{
.el-month-table
td
.today
.cell
{
color
:
#5850ff
;
}
}
</
style
>
\ No newline at end of file
}
</
style
>
src/views/stock/stockDetailDialog.vue
View file @
7ea4a4f
<!-- 库存明细弹窗 -->
<
template
>
<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"
>
<GLDialog
bigTitle=
"库存明细"
:visible
.
sync=
"dialogVisible"
class=
"stockMonthDailog"
width=
"700px"
mode=
"big"
:destroy-on-close=
"true"
:close-on-click-modal=
"false"
okText=
"关闭"
:before-close=
"handleClose"
:hasFooter=
"false"
@
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>
<GLTable
ref=
"recordTable"
:get-list-api=
"getListApi"
:search-form=
"searchForm"
:table-params=
"tableParams"
:pageConf=
"pageConf"
></GLTable>
</div>
</div>
<!--
<span
slot=
"footer"
...
...
@@ -18,7 +21,7 @@
<
script
>
// import { mapActions, mapState } from 'vuex'
// import { merchantShopGoodsStockPage } from '@api/stockManage'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'StockDetailDialog'
,
...
...
@@ -29,14 +32,14 @@ export default {
},
recordInfo
:
{
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
}
},
data
()
{
return
{
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
},
// userInfo: this.$store.state.d2admin.user.info,
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
searchForm
:
{
upgradeGoodsId
:
''
,
yqMerchantId
:
''
...
...
@@ -56,10 +59,15 @@ export default {
{
label
:
'当前库存'
,
prop
:
'stock'
,
// width: ''
width
:
'150px'
,
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
)
?
'米'
:
'件'
)
:
'-'
}
},
{
label
:
'膜卷号'
,
prop
:
'filmRollNo'
// width: '200px'
}
]
}
...
...
@@ -124,5 +132,4 @@ export default {
.show-search
{
margin-left
:
-65px
;
}
</
style
>
}
</
style
>
src/views/stock/stockMonthDialog.vue
View file @
7ea4a4f
<
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"
:hasFooter=
"false"
>
<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"
>
<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"
/>
...
...
@@ -21,7 +25,7 @@
</
template
>
<
script
>
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'StockMonthDialog'
,
props
:
{
...
...
@@ -31,13 +35,13 @@ export default {
},
stockInfo
:
{
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
}
},
data
()
{
return
{
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
},
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
...
...
@@ -61,7 +65,7 @@ export default {
label
:
'本月采购数量'
,
prop
:
'purchaseNum'
,
formatter
:
cellValue
=>
{
return
cellValue
.
purchaseNum
||
cellValue
.
purchaseNum
==
0
?
parseFloat
(
cellValue
.
purchaseNum
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
purchaseNum
||
cellValue
.
purchaseNum
==
0
?
parseFloat
(
cellValue
.
purchaseNum
).
toFixed
(
2
)
+
(
this
.
$
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
}
},
{
...
...
@@ -83,7 +87,7 @@ export default {
label
:
'出库数量'
,
prop
:
'reduceStockNum'
,
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
)
?
'米'
:
'件'
)
:
'-'
}
},
{
...
...
@@ -98,7 +102,7 @@ export default {
label
:
'结存库存数量'
,
prop
:
'stock'
,
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
)
?
'米'
:
'件'
)
:
'-'
}
}
]
...
...
@@ -164,6 +168,7 @@ export default {
max-height
:
616px
;
}
}
.btn-tips
{
display
:
inline-block
;
font-size
:
12px
;
...
...
@@ -173,11 +178,11 @@ export default {
color
:
#999
;
margin-right
:
24px
;
padding
:
6.5px
10px
;
img
{
width
:
18px
;
height
:
15px
;
margin-right
:
9px
;
vertical-align
:
bottom
;
}
}
</
style
>
}
</
style
>
src/views/warehousing/index.vue
View file @
7ea4a4f
<
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"
>
<div>
<div>
...
...
@@ -15,7 +16,9 @@
</div>
<!-- 表格区域 开始 -->
<GLTable
ref=
"warehousingRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
></GLTable>
<GLTable
ref=
"warehousingRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
></GLTable>
<!-- 表格区域 end -->
</div>
</div>
...
...
@@ -24,12 +27,12 @@
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
//
import { membraneTypeList } from '@/utils/constants.js'
export
default
{
name
:
'warehousing'
,
data
()
{
return
{
membraneTypeList
:
membraneTypeList
,
//
membraneTypeList: membraneTypeList,
size
:
'small'
,
totalObj
:
{},
url
:
url
,
...
...
@@ -109,7 +112,8 @@ export default {
type
:
'input'
,
maxlength
:
'20'
,
isClear
:
true
},
{
},
{
label
:
'入库仓库'
,
name
:
'yqMerchantId'
,
type
:
'select'
,
...
...
@@ -118,13 +122,12 @@ export default {
optionLabel
:
'merchantName'
,
optionsName
:
'yqMerchantList'
,
changeAttr
:
(
value
,
targetItem
)
=>
{
value
?
this
.
getServicemerchantrefList
(
value
)
:
(
this
.
baseData
.
merchantIdList
=
[])
value
?
this
.
getServicemerchantrefList
(
value
)
:
(
this
.
baseData
.
merchantIdList
=
[])
this
.
searchForm
.
merchantId
=
''
this
.
getOptionsList
(
'showFormData'
)
}
},
{
},
{
label
:
'入库门店'
,
name
:
'merchantId'
,
type
:
'select'
,
...
...
@@ -142,6 +145,13 @@ export default {
optionId
:
'confId'
,
optionLabel
:
'confLabel'
,
optionsName
:
'upgradeFlagList'
},
{
label
:
'膜卷号'
,
name
:
'filmRollNo'
,
type
:
'input'
,
maxlength
:
'50'
,
isClear
:
true
}
],
// 表格
...
...
@@ -186,7 +196,7 @@ export default {
label
:
'入库数量'
,
prop
:
'increaseStockNum'
,
formatter
:
cellValue
=>
{
return
cellValue
.
increaseStockNum
||
cellValue
.
increaseStockNum
==
0
?
parseFloat
(
cellValue
.
increaseStockNum
).
toFixed
(
2
)
+
(
this
.
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
&&
cellValue
.
goodsType
!=
this
.
$purchaseType
?
'米'
:
'件'
)
:
'-'
return
cellValue
.
increaseStockNum
||
cellValue
.
increaseStockNum
==
0
?
parseFloat
(
cellValue
.
increaseStockNum
).
toFixed
(
2
)
+
(
this
.
$membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
'米'
:
'件'
)
:
'-'
},
width
:
120
},
...
...
@@ -218,8 +228,14 @@ export default {
minWidth
:
150
},
{
label
:
'膜卷号'
,
prop
:
'filmRollNo'
,
minWidth
:
150
},
{
label
:
'订单类型'
,
prop
:
''
,
minWidth
:
150
,
formatter
:
cellValue
=>
{
return
cellValue
.
increaseStockType
==
'4'
?
this
.
baseData
.
upgradeFlagList
.
find
(
item
=>
item
.
confId
===
cellValue
.
upgradeFlag
)?.
confLabel
:
'-'
}
...
...
@@ -313,17 +329,19 @@ 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'
)
})
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
)
{
...
...
@@ -443,8 +461,8 @@ export default {
color
:
#333
;
}
}
.txt-blue
{
color
:
#5850ff
;
}
}
</
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