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
0b098b4e
Commit
0b098b4e
authored
Nov 20, 2022
by
季圣华
Browse files
给采购和销售退货单增加校验逻辑,支持特殊情况的欠款,并给收付款单增加实际欠款的列
parent
54bf2dd3
Changes
6
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/bill/PurchaseBackList.vue
View file @
0b098b4e
...
...
@@ -232,6 +232,7 @@
}
},
{
title
:
'
退款
'
,
dataIndex
:
'
changeAmount
'
,
width
:
50
},
{
title
:
'
欠款
'
,
dataIndex
:
'
debt
'
,
width
:
60
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
width
:
80
,
align
:
"
center
"
,
scopedSlots
:
{
customRender
:
'
customRenderStatus
'
}
}
...
...
jshERP-web/src/views/bill/SaleBackList.vue
View file @
0b098b4e
...
...
@@ -232,6 +232,7 @@
}
},
{
title
:
'
退款
'
,
dataIndex
:
'
changeAmount
'
,
width
:
50
},
{
title
:
'
欠款
'
,
dataIndex
:
'
debt
'
,
width
:
60
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
width
:
80
,
align
:
"
center
"
,
scopedSlots
:
{
customRender
:
'
customRenderStatus
'
}
}
...
...
jshERP-web/src/views/bill/modules/PurchaseBackModal.vue
View file @
0b098b4e
...
...
@@ -141,7 +141,7 @@
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"本次退款"
>
<a-input
placeholder=
"请输入本次退款"
v-decorator.trim=
"[ 'changeAmount' ]"
@
keyup=
"onKeyUpChangeAmount"
:readOnly=
"
true
"
/>
<a-input
placeholder=
"请输入本次退款"
v-decorator.trim=
"[ 'changeAmount' ]"
@
keyup=
"onKeyUpChangeAmount"
:readOnly=
"
backStatus
"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
...
...
@@ -214,6 +214,7 @@
prefixNo
:
'
CGTH
'
,
fileList
:[],
rowCanEdit
:
true
,
backStatus
:
true
,
model
:
{},
labelCol
:
{
xs
:
{
span
:
24
},
...
...
@@ -302,10 +303,14 @@
if
(
this
.
action
===
'
add
'
)
{
this
.
addInit
(
this
.
prefixNo
)
this
.
fileList
=
[]
this
.
backStatus
=
true
}
else
{
if
(
this
.
model
.
linkNumber
)
{
this
.
rowCanEdit
=
false
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
this
.
backStatus
=
false
}
else
{
this
.
backStatus
=
true
}
this
.
model
.
operTime
=
this
.
model
.
operTimeStr
this
.
model
.
debt
=
(
this
.
model
.
discountLastMoney
+
this
.
model
.
otherMoney
-
this
.
model
.
changeAmount
).
toFixed
(
2
)
...
...
@@ -378,6 +383,7 @@
},
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
deposit
,
remark
)
{
this
.
rowCanEdit
=
false
this
.
backStatus
=
false
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
1
)
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
finishNumber
'
,
1
)
...
...
jshERP-web/src/views/bill/modules/SaleBackModal.vue
View file @
0b098b4e
...
...
@@ -141,7 +141,7 @@
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"本次退款"
>
<a-input
placeholder=
"请输入本次退款"
v-decorator.trim=
"[ 'changeAmount' ]"
@
keyup=
"onKeyUpChangeAmount"
:readOnly=
"
true
"
/>
<a-input
placeholder=
"请输入本次退款"
v-decorator.trim=
"[ 'changeAmount' ]"
@
keyup=
"onKeyUpChangeAmount"
:readOnly=
"
backStatus
"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
...
...
@@ -219,6 +219,7 @@
prefixNo
:
'
XSTH
'
,
fileList
:[],
rowCanEdit
:
true
,
backStatus
:
true
,
model
:
{},
labelCol
:
{
xs
:
{
span
:
24
},
...
...
@@ -308,10 +309,14 @@
this
.
addInit
(
this
.
prefixNo
)
this
.
personList
.
value
=
''
this
.
fileList
=
[]
this
.
backStatus
=
true
}
else
{
if
(
this
.
model
.
linkNumber
)
{
this
.
rowCanEdit
=
false
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
this
.
backStatus
=
false
}
else
{
this
.
backStatus
=
true
}
this
.
model
.
operTime
=
this
.
model
.
operTimeStr
this
.
model
.
debt
=
(
this
.
model
.
discountLastMoney
+
this
.
model
.
otherMoney
-
this
.
model
.
changeAmount
).
toFixed
(
2
)
...
...
@@ -389,6 +394,7 @@
},
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
deposit
,
remark
)
{
this
.
rowCanEdit
=
false
this
.
backStatus
=
false
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
1
)
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
finishNumber
'
,
1
)
...
...
jshERP-web/src/views/financial/dialog/DebtBillList.vue
View file @
0b098b4e
<
template
>
<a-modal
:title=
"title"
:width=
"1
25
0"
:width=
"1
30
0"
:visible=
"visible"
@
ok=
"handleOk"
@
cancel=
"handleCancel"
...
...
@@ -13,20 +13,20 @@
<!-- 搜索区域 -->
<a-form
layout=
"inline"
@
keyup.enter.native=
"searchQuery"
>
<a-row
:gutter=
"24"
>
<a-col
:md=
"6"
:sm=
"
8
"
>
<a-col
:md=
"6"
:sm=
"
24
"
>
<a-form-item
label=
"单据编号"
:labelCol=
"
{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input
placeholder=
"请输入单据编号查询"
v-model=
"queryParam.number"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"6"
:sm=
"
8
"
>
<a-col
:md=
"6"
:sm=
"
24
"
>
<a-form-item
label=
"商品信息"
:labelCol=
"
{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input
placeholder=
"请输入名称、规格、型号"
v-model=
"queryParam.materialParam"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"
7
"
:sm=
"
10
"
>
<a-col
:md=
"
6
"
:sm=
"
24
"
>
<a-form-item
label=
"单据日期"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
>
<a-range-picker
style=
"width:
2
10
px
"
style=
"width: 10
0%
"
v-model=
"queryParam.createTimeRange"
format=
"YYYY-MM-DD"
:placeholder=
"['开始时间', '结束时间']"
...
...
@@ -60,6 +60,12 @@
<span
slot=
"numberCustomRender"
slot-scope=
"text, record"
>
<a
@
click=
"myHandleDetail(record)"
>
{{
record
.
number
}}
</a>
</span>
<span
slot=
"customTitle"
>
实际欠款
<a-tooltip
title=
"实际欠款=本单欠款-退货单欠款(主要针对存在退货的情况)"
>
<a-icon
type=
"question-circle"
/>
</a-tooltip>
</span>
</a-table>
<!-- table区域-end -->
<!-- 表单区域 -->
...
...
@@ -106,16 +112,6 @@
},
// 表头
columns
:
[
{
title
:
'
#
'
,
dataIndex
:
''
,
key
:
'
rowIndex
'
,
width
:
40
,
align
:
"
center
"
,
customRender
:
function
(
t
,
r
,
index
)
{
return
parseInt
(
index
)
+
1
;
}
},
{
title
:
''
,
dataIndex
:
'
organName
'
,
width
:
120
,
ellipsis
:
true
},
{
title
:
'
单据编号
'
,
dataIndex
:
'
number
'
,
width
:
120
,
...
...
@@ -129,18 +125,13 @@
}
},
{
title
:
'
单据日期
'
,
dataIndex
:
'
operTimeStr
'
,
width
:
130
},
{
title
:
'
操作员
'
,
dataIndex
:
'
userName
'
,
width
:
60
},
{
title
:
'
欠款
'
,
dataIndex
:
'
needDebt
'
,
width
:
70
,
customRender
:
function
(
text
,
record
,
index
)
{
return
(
record
.
discountLastMoney
+
record
.
otherMoney
-
(
record
.
deposit
+
record
.
changeAmount
)).
toFixed
(
2
);
}
{
title
:
'
操作员
'
,
dataIndex
:
'
userName
'
,
width
:
70
,
ellipsis
:
true
},
{
title
:
'
本单欠款
'
,
dataIndex
:
'
needDebt
'
,
width
:
70
},
{
dataIndex
:
'
realNeedDebt
'
,
width
:
80
,
slots
:
{
title
:
'
customTitle
'
}
},
{
title
:
'
已收欠款
'
,
dataIndex
:
'
finishDebt
'
,
width
:
70
},
{
title
:
'
待收欠款
'
,
dataIndex
:
'
debt
'
,
width
:
70
,
customRender
:
function
(
text
,
record
,
index
)
{
return
(
record
.
discountLastMoney
+
record
.
otherMoney
-
(
record
.
deposit
+
record
.
changeAmount
+
record
.
finishDebt
)).
toFixed
(
2
);
}
}
{
title
:
'
待收欠款
'
,
dataIndex
:
'
debt
'
,
width
:
70
}
],
url
:
{
list
:
"
/depotHead/debtList
"
...
...
@@ -197,6 +188,8 @@
handleOk
()
{
this
.
getSelectBillRows
();
this
.
$emit
(
'
ok
'
,
this
.
selectBillRows
);
this
.
selectedRowKeys
=
[]
this
.
selectBillRows
=
[]
this
.
close
();
},
onDateChange
:
function
(
value
,
dateString
)
{
...
...
@@ -216,7 +209,7 @@
getSelectBillRows
()
{
let
dataSource
=
this
.
dataSource
;
let
billIds
=
""
;
this
.
selectBillRows
=
[]
;
this
.
selectBillRows
=
[]
for
(
let
i
=
0
,
len
=
dataSource
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
selectedRowKeys
.
includes
(
dataSource
[
i
].
id
))
{
this
.
selectBillRows
.
push
(
dataSource
[
i
]);
...
...
jshERP-web/src/views/financial/mixins/FinancialModalMixin.js
View file @
0b098b4e
...
...
@@ -233,8 +233,8 @@ export const FinancialModalMixin = {
for
(
let
i
=
0
;
i
<
selectBillRows
.
length
;
i
++
){
let
info
=
selectBillRows
[
i
]
info
.
billNumber
=
info
.
number
info
.
needDebt
=
(
info
.
discountLastMoney
+
info
.
otherMoney
-
(
info
.
deposit
+
info
.
changeAmount
)).
toFixed
(
2
)
info
.
eachAmount
=
(
info
.
discountLastMoney
+
info
.
otherMoney
-
(
info
.
deposit
+
info
.
changeAmount
+
info
.
finishDebt
)).
toFixed
(
2
);
info
.
needDebt
=
info
.
realNeedDebt
info
.
eachAmount
=
info
.
debt
if
(
info
.
eachAmount
!=
0
)
{
changeAmount
+=
info
.
eachAmount
-
0
listEx
.
push
(
info
)
...
...
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