Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
57360835
authored
Feb 11, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
ERP:基本完成销售入库模块
parent
00a386dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
12 deletions
+25
-12
src/views/erp/sale/out/SaleOutForm.vue
+13
-6
src/views/erp/sale/out/components/SaleOutItemForm.vue
+12
-6
No files found.
src/views/erp/sale/out/SaleOutForm.vue
View file @
57360835
...
...
@@ -210,7 +210,7 @@ const formData = ref({
discountPrice
:
0
,
totalPrice
:
0
,
otherPrice
:
0
,
payPrice
:
0
,
payPrice
:
undefined
,
orderNo
:
undefined
,
items
:
[],
no
:
undefined
// 出库单号,后端返回
...
...
@@ -242,12 +242,13 @@ watch(
const
discountPrice
=
val
.
discountPercent
!=
null
?
erpPriceMultiply
(
totalPrice
,
val
.
discountPercent
/
100.0
)
:
0
// debugger
// TODO 芋艿:
这里有问题
const
payPrice
=
totalPrice
-
discountPrice
+
val
.
otherPrice
// TODO 芋艿:
payPrice 自动计算会有问题,界面上看到修改了,传递到后端还是没改过来
//
const payPrice = totalPrice - discountPrice + val.otherPrice
// 赋值
formData
.
value
.
discountPrice
=
discountPrice
formData
.
value
.
totalPrice
=
totalPrice
-
discountPrice
formData
.
value
.
payPrice
=
payPrice
// val.payPrice = payPrice
// formData.value.payPrice = payPrice
},
{
deep
:
true
}
)
...
...
@@ -297,7 +298,13 @@ const handleSaleOrderChange = (order: SaleOrderVO) => {
formData
.
value
.
remark
=
order
.
remark
formData
.
value
.
fileUrl
=
order
.
fileUrl
// 将订单项设置到出库单项
formData
.
value
.
items
=
order
.
items
.
filter
((
item
)
=>
item
.
count
>
item
.
outCount
)
order
.
items
.
forEach
((
item
)
=>
{
item
.
totalCount
=
item
.
count
item
.
count
=
item
.
totalCount
-
item
.
outCount
item
.
orderItemId
=
item
.
id
item
.
id
=
undefined
})
formData
.
value
.
items
=
order
.
items
.
filter
((
item
)
=>
item
.
count
>
0
)
}
/** 提交表单 */
...
...
@@ -339,7 +346,7 @@ const resetForm = () => {
discountPrice
:
0
,
totalPrice
:
0
,
otherPrice
:
0
,
payPrice
:
0
,
payPrice
:
undefined
,
items
:
[]
}
formRef
.
value
?.
resetFields
()
...
...
src/views/erp/sale/out/components/SaleOutItemForm.vue
View file @
57360835
...
...
@@ -62,14 +62,24 @@
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"原数量"
fixed=
"right"
min-width=
"80"
>
<el-table-column
label=
"原数量"
fixed=
"right"
min-width=
"80"
v-if=
"formData[0]?.totalCount != null"
>
<
template
#
default=
"{ row }"
>
<el-form-item
class=
"mb-0px!"
>
<el-input
disabled
v-model=
"row.totalCount"
:formatter=
"erpCountInputFormatter"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"已出库"
fixed=
"right"
min-width=
"80"
>
<el-table-column
label=
"已出库"
fixed=
"right"
min-width=
"80"
v-if=
"formData[0]?.outCount != null"
>
<
template
#
default=
"{ row }"
>
<el-form-item
class=
"mb-0px!"
>
<el-input
disabled
v-model=
"row.outCount"
:formatter=
"erpCountInputFormatter"
/>
...
...
@@ -190,8 +200,6 @@ watch(
()
=>
props
.
items
,
async
(
val
)
=>
{
val
.
forEach
((
item
)
=>
{
item
.
totalCount
=
item
.
count
item
.
count
=
item
.
totalCount
-
item
.
outCount
if
(
item
.
warehouseId
==
null
)
{
item
.
warehouseId
=
defaultWarehouse
.
value
?.
id
}
...
...
@@ -200,8 +208,6 @@ watch(
}
})
formData
.
value
=
val
// TODO 芋艿:这里添加逻辑
},
{
immediate
:
true
}
)
...
...
Write
Preview
Markdown
is supported
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