Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
4e73947f
Commit
4e73947f
authored
Sep 27, 2021
by
季圣华
Browse files
优化分批出入库单据的展示
parent
de879898
Changes
5
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/bill/mixins/BillModalMixin.js
View file @
4e73947f
import
{
VALIDATE_NO_PASSED
,
validateFormAndTabl
es
}
from
'
@/utils/JEditableTableUtil
'
import
{
FormTyp
es
}
from
'
@/utils/JEditableTableUtil
'
import
{
findBySelectSup
,
findBySelectCus
,
findBySelectRetail
,
getMaterialByBarCode
,
findStockByDepotAndBarCode
,
getAccount
,
getPersonByNumType
}
from
'
@/api/api
'
import
{
getAction
,
putAction
}
from
'
@/api/manage
'
import
{
getMpListShort
,
getNowFormatDateTime
}
from
"
@/utils/util
"
...
...
@@ -68,6 +68,7 @@ export const BillModalMixin = {
this
.
accountIdList
=
[]
this
.
accountMoneyList
=
[]
this
.
manyAccountBtnStatus
=
false
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
sku
'
,
0
)
},
copyAddInit
(
amountNum
)
{
getAction
(
'
/sequence/buildNumber
'
).
then
((
res
)
=>
{
...
...
@@ -79,6 +80,36 @@ export const BillModalMixin = {
this
.
form
.
setFieldsValue
({
'
operTime
'
:
getNowFormatDateTime
()})
})
},
/** 查询某个tab的数据 */
requestSubTableData
(
url
,
params
,
tab
,
success
)
{
tab
.
loading
=
true
getAction
(
url
,
params
).
then
(
res
=>
{
if
(
res
&&
res
.
code
===
200
){
tab
.
dataSource
=
res
.
data
.
rows
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
sku
'
,
0
)
for
(
let
i
=
0
;
i
<
tab
.
dataSource
.
length
;
i
++
){
if
(
tab
.
dataSource
[
i
].
sku
)
{
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
sku
'
,
1
)
}
}
typeof
success
===
'
function
'
?
success
(
res
)
:
''
}
}).
finally
(()
=>
{
tab
.
loading
=
false
})
},
//改变字段的状态,1-显示 0-隐藏
changeFormTypes
(
columns
,
key
,
type
)
{
for
(
let
i
=
0
;
i
<
columns
.
length
;
i
++
){
if
(
columns
[
i
].
key
===
key
)
{
if
(
type
){
columns
[
i
].
type
=
FormTypes
.
input
//显示
}
else
{
columns
[
i
].
type
=
FormTypes
.
hidden
//隐藏
}
}
}
},
initSupplier
()
{
let
that
=
this
;
findBySelectSup
({}).
then
((
res
)
=>
{
...
...
@@ -205,6 +236,9 @@ export const BillModalMixin = {
let
mArr
=
values
for
(
let
i
=
0
;
i
<
mList
.
length
;
i
++
)
{
let
mInfo
=
mList
[
i
]
if
(
mInfo
.
sku
)
{
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
sku
'
,
1
)
}
let
mObj
=
this
.
parseInfoToObj
(
mInfo
)
mObj
.
depotId
=
mInfo
.
depotId
mObj
.
stock
=
mInfo
.
stock
...
...
@@ -223,6 +257,9 @@ export const BillModalMixin = {
let
mArr
=
[]
for
(
let
i
=
0
;
i
<
mList
.
length
;
i
++
)
{
let
mInfo
=
mList
[
i
]
if
(
mInfo
.
sku
)
{
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
sku
'
,
1
)
}
let
mObj
=
{
rowKey
:
row
.
id
,
values
:
this
.
parseInfoToObj
(
mInfo
)
...
...
jshERP-web/src/views/bill/modules/PurchaseInModal.vue
View file @
4e73947f
...
...
@@ -227,6 +227,8 @@
methods
:
{
//调用完edit()方法之后会自动调用此方法
editAfter
()
{
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
0
)
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
finishNumber
'
,
0
)
if
(
this
.
action
===
'
add
'
)
{
this
.
addInit
(
this
.
prefixNo
)
this
.
fileList
=
[]
...
...
@@ -299,6 +301,8 @@
this
.
$refs
.
linkBillList
.
title
=
"
选择采购订单
"
},
linkBillListOk
(
selectBillRows
)
{
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
1
)
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
finishNumber
'
,
1
)
if
(
selectBillRows
&&
selectBillRows
.
length
>
0
)
{
let
record
=
selectBillRows
[
0
]
this
.
$nextTick
(()
=>
{
...
...
jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue
View file @
4e73947f
...
...
@@ -112,6 +112,7 @@
loading
:
false
,
dataSource
:
[],
columns
:
[
{
title
:
'
仓库名称
'
,
key
:
'
depotId
'
,
width
:
'
7%
'
,
type
:
FormTypes
.
hidden
},
{
title
:
'
条码
'
,
key
:
'
barCode
'
,
width
:
'
8%
'
,
type
:
FormTypes
.
popupJsh
,
multi
:
true
,
validateRules
:
[{
required
:
true
,
message
:
'
${title}不能为空
'
}]
},
...
...
@@ -179,7 +180,6 @@
this
.
copyAddInit
(
this
.
prefixNo
)
}
this
.
initSupplier
()
this
.
initDepot
()
},
/** 整理成formData */
classifyIntoFormData
(
allValues
)
{
...
...
@@ -190,6 +190,7 @@
billMain
.
subType
=
'
采购订单
'
billMain
.
defaultNumber
=
billMain
.
number
for
(
let
item
of
detailArr
){
item
.
depotId
=
''
//订单不需要仓库
totalPrice
+=
item
.
allPrice
-
0
}
billMain
.
totalPrice
=
0
-
totalPrice
...
...
jshERP-web/src/views/bill/modules/SaleOrderModal.vue
View file @
4e73947f
...
...
@@ -115,6 +115,7 @@
loading
:
false
,
dataSource
:
[],
columns
:
[
{
title
:
'
仓库名称
'
,
key
:
'
depotId
'
,
width
:
'
7%
'
,
type
:
FormTypes
.
hidden
},
{
title
:
'
条码
'
,
key
:
'
barCode
'
,
width
:
'
8%
'
,
type
:
FormTypes
.
popupJsh
,
multi
:
true
,
validateRules
:
[{
required
:
true
,
message
:
'
${title}不能为空
'
}]
},
...
...
@@ -186,7 +187,6 @@
}
this
.
initCustomer
()
this
.
initSalesman
()
this
.
initDepot
()
},
//提交单据时整理成formData
classifyIntoFormData
(
allValues
)
{
...
...
@@ -197,6 +197,7 @@
billMain
.
subType
=
'
销售订单
'
billMain
.
defaultNumber
=
billMain
.
number
for
(
let
item
of
detailArr
){
item
.
depotId
=
''
//订单不需要仓库
totalPrice
+=
item
.
allPrice
-
0
}
billMain
.
totalPrice
=
totalPrice
...
...
jshERP-web/src/views/bill/modules/SaleOutModal.vue
View file @
4e73947f
...
...
@@ -231,6 +231,8 @@
methods
:
{
//调用完edit()方法之后会自动调用此方法
editAfter
()
{
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
0
)
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
finishNumber
'
,
0
)
if
(
this
.
action
===
'
add
'
)
{
this
.
addInit
(
this
.
prefixNo
)
this
.
personList
.
value
=
''
...
...
@@ -305,6 +307,8 @@
this
.
$refs
.
linkBillList
.
title
=
"
选择销售订单
"
},
linkBillListOk
(
selectBillRows
)
{
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
1
)
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
finishNumber
'
,
1
)
if
(
selectBillRows
&&
selectBillRows
.
length
>
0
)
{
let
record
=
selectBillRows
[
0
]
this
.
$nextTick
(()
=>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment