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
5e536d7b
Commit
5e536d7b
authored
May 29, 2022
by
季圣华
Browse files
给单据增加订金字段和页面功能逻辑
parent
3939106b
Changes
17
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/bill/PurchaseInList.vue
View file @
5e536d7b
...
...
@@ -232,7 +232,7 @@
{
title
:
'
付款
'
,
dataIndex
:
'
changeAmount
'
,
width
:
60
},
{
title
:
'
欠款
'
,
dataIndex
:
'
debt
'
,
width
:
60
,
customRender
:
function
(
text
,
record
,
index
)
{
let
debt
=
record
.
discountLastMoney
+
record
.
otherMoney
-
record
.
changeAmount
let
debt
=
record
.
discountLastMoney
+
record
.
otherMoney
-
(
record
.
deposit
+
record
.
changeAmount
)
return
debt
?
debt
.
toFixed
(
2
):
''
}
},
...
...
jshERP-web/src/views/bill/PurchaseOrderList.vue
View file @
5e536d7b
...
...
@@ -205,6 +205,7 @@
}
}
},
{
title
:
'
支付订金
'
,
dataIndex
:
'
changeAmount
'
,
width
:
60
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
width
:
80
,
align
:
"
center
"
,
scopedSlots
:
{
customRender
:
'
customRenderStatus
'
}
},
...
...
jshERP-web/src/views/bill/SaleOrderList.vue
View file @
5e536d7b
...
...
@@ -211,6 +211,7 @@
}
}
},
{
title
:
'
收取订金
'
,
dataIndex
:
'
changeAmount
'
,
width
:
60
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
width
:
70
,
align
:
"
center
"
,
scopedSlots
:
{
customRender
:
'
customRenderStatus
'
}
},
...
...
jshERP-web/src/views/bill/SaleOutList.vue
View file @
5e536d7b
...
...
@@ -232,7 +232,7 @@
{
title
:
'
收款
'
,
dataIndex
:
'
changeAmount
'
,
width
:
60
},
{
title
:
'
欠款
'
,
dataIndex
:
'
debt
'
,
width
:
60
,
customRender
:
function
(
text
,
record
,
index
)
{
let
debt
=
record
.
discountLastMoney
+
record
.
otherMoney
-
record
.
changeAmount
let
debt
=
record
.
discountLastMoney
+
record
.
otherMoney
-
(
record
.
deposit
+
record
.
changeAmount
)
return
debt
?
debt
.
toFixed
(
2
):
''
}
},
...
...
jshERP-web/src/views/bill/dialog/BillDetail.vue
View file @
5e536d7b
...
...
@@ -237,8 +237,21 @@
{{
model
.
discountLastMoney
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
></a-col>
</a-row>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-col
:span=
"6"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"结算账户"
>
{{
model
.
accountName
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"支付订金"
>
{{
model
.
changeAmount
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
></a-col>
<a-col
:span=
"6"
></a-col>
</a-row>
</section>
</
template
>
...
...
@@ -314,6 +327,11 @@
{{
model
.
accountName
}}
</a-form-item>
</a-col>
<a-col
v-if=
"model.deposit"
:span=
"6"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"扣除订金"
>
{{
model
.
deposit
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"本次付款"
>
{{
model
.
changeAmount
}}
...
...
@@ -324,8 +342,6 @@
{{
model
.
debt
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
</a-col>
</a-row>
</section>
</
template
>
...
...
@@ -476,8 +492,21 @@
{{
model
.
discountLastMoney
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
></a-col>
</a-row>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-col
:span=
"6"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"结算账户"
>
{{
model
.
accountName
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"收取订金"
>
{{
model
.
changeAmount
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
></a-col>
<a-col
:span=
"6"
></a-col>
</a-row>
</section>
</
template
>
...
...
@@ -553,6 +582,11 @@
{{
model
.
accountName
}}
</a-form-item>
</a-col>
<a-col
v-if=
"model.deposit"
:span=
"6"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"扣除订金"
>
{{
model
.
deposit
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"本次收款"
>
{{
model
.
changeAmount
}}
...
...
@@ -563,6 +597,9 @@
{{
model
.
debt
}}
</a-form-item>
</a-col>
<a-col
:span=
"6"
></a-col>
</a-row>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-col
:span=
"6"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"销售人员"
>
{{
model
.
salesManStr
}}
...
...
@@ -1358,7 +1395,7 @@
}
else
{
this
.
model
.
getAmount
=
this
.
model
.
changeAmount
}
this
.
model
.
debt
=
(
this
.
model
.
discountLastMoney
+
this
.
model
.
otherMoney
-
this
.
model
.
changeAmount
).
toFixed
(
2
)
this
.
model
.
debt
=
(
this
.
model
.
discountLastMoney
+
this
.
model
.
otherMoney
-
this
.
model
.
deposit
-
this
.
model
.
changeAmount
).
toFixed
(
2
)
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
id
'
))
});
...
...
jshERP-web/src/views/bill/dialog/LinkBillList.vue
View file @
5e536d7b
...
...
@@ -111,6 +111,7 @@
linkNumber
:
''
,
organId
:
''
,
discount
:
''
,
deposit
:
''
,
remark
:
''
,
queryParam
:
{
number
:
""
,
...
...
@@ -231,12 +232,13 @@
this
.
linkNumber
=
record
.
number
this
.
organId
=
record
.
organId
this
.
discount
=
record
.
discount
this
.
deposit
=
record
.
changeAmount
-
record
.
finishDeposit
this
.
remark
=
record
.
remark
this
.
loadDetailData
(
1
)
}
}
else
{
this
.
getSelectBillDetailRows
();
this
.
$emit
(
'
ok
'
,
this
.
selectBillDetailRows
,
this
.
linkNumber
,
this
.
organId
,
this
.
discount
,
this
.
remark
)
this
.
$emit
(
'
ok
'
,
this
.
selectBillDetailRows
,
this
.
linkNumber
,
this
.
organId
,
this
.
discount
,
this
.
deposit
,
this
.
remark
)
this
.
close
();
}
},
...
...
jshERP-web/src/views/bill/mixins/BillListMixin.js
View file @
5e536d7b
...
...
@@ -46,6 +46,7 @@ export const BillListMixin = {
//复制单据的时候需要移除关联单据的相关信息
record
.
linkNumber
=
''
record
.
billType
=
''
record
.
deposit
=
''
this
.
$refs
.
modalForm
.
edit
(
record
);
this
.
$refs
.
modalForm
.
title
=
"
复制新增
"
;
this
.
$refs
.
modalForm
.
disableSubmit
=
false
;
...
...
jshERP-web/src/views/bill/mixins/BillModalMixin.js
View file @
5e536d7b
...
...
@@ -212,9 +212,10 @@ export const BillModalMixin = {
this
.
accountIdList
=
idList
this
.
accountMoneyList
=
moneyList
let
discountLastMoney
=
this
.
form
.
getFieldValue
(
'
discountLastMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
?
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
:
0
let
debt
=
(
discountLastMoney
+
otherMoney
-
allPrice
).
toFixed
(
2
)
this
.
$nextTick
(()
=>
{
allPrice
=
this
.
prefixNo
===
'
CGDD
'
||
this
.
prefixNo
===
'
XSDD
'
?
0
:
allPrice
this
.
form
.
setFieldsValue
({
'
changeAmount
'
:
allPrice
,
'
debt
'
:
debt
})
});
},
...
...
@@ -553,11 +554,16 @@ export const BillModalMixin = {
autoChangePrice
(
target
)
{
let
allTaxLastMoney
=
target
.
statisticsColumns
.
taxLastMoney
-
0
let
discount
=
this
.
form
.
getFieldValue
(
'
discount
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)?
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
:
0
let
deposit
=
this
.
form
.
getFieldValue
(
'
deposit
'
)
let
discountMoney
=
(
discount
*
0.01
*
allTaxLastMoney
).
toFixed
(
2
)
-
0
let
discountLastMoney
=
(
allTaxLastMoney
-
discountMoney
).
toFixed
(
2
)
-
0
let
changeAmountNew
=
(
discountLastMoney
+
otherMoney
).
toFixed
(
2
)
-
0
if
(
deposit
)
{
changeAmountNew
=
(
changeAmountNew
-
deposit
).
toFixed
(
2
)
-
0
}
this
.
$nextTick
(()
=>
{
changeAmountNew
=
this
.
prefixNo
===
'
CGDD
'
||
this
.
prefixNo
===
'
XSDD
'
?
0
:
changeAmountNew
this
.
form
.
setFieldsValue
({
'
discount
'
:
discount
,
'
discountMoney
'
:
discountMoney
,
'
discountLastMoney
'
:
discountLastMoney
,
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
...
...
@@ -565,12 +571,17 @@ export const BillModalMixin = {
//改变优惠率
onKeyUpDiscount
(
e
)
{
const
value
=
e
.
target
.
value
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)?
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
:
0
let
deposit
=
this
.
form
.
getFieldValue
(
'
deposit
'
)
let
allTaxLastMoney
=
this
.
$refs
.
materialDataTable
.
statisticsColumns
.
taxLastMoney
-
0
let
discountMoneyNew
=
(
allTaxLastMoney
*
value
*
0.01
).
toFixed
(
2
)
-
0
let
discountLastMoneyNew
=
(
allTaxLastMoney
-
discountMoneyNew
).
toFixed
(
2
)
-
0
let
changeAmountNew
=
(
discountLastMoneyNew
+
otherMoney
).
toFixed
(
2
)
-
0
if
(
deposit
)
{
changeAmountNew
=
(
changeAmountNew
-
deposit
).
toFixed
(
2
)
-
0
}
this
.
$nextTick
(()
=>
{
changeAmountNew
=
this
.
prefixNo
===
'
CGDD
'
||
this
.
prefixNo
===
'
XSDD
'
?
0
:
changeAmountNew
this
.
form
.
setFieldsValue
({
'
discountMoney
'
:
discountMoneyNew
,
'
discountLastMoney
'
:
discountLastMoneyNew
,
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
...
...
@@ -578,12 +589,17 @@ export const BillModalMixin = {
//改变付款优惠
onKeyUpDiscountMoney
(
e
)
{
const
value
=
e
.
target
.
value
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)?
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
:
0
let
deposit
=
this
.
form
.
getFieldValue
(
'
deposit
'
)
let
allTaxLastMoney
=
this
.
$refs
.
materialDataTable
.
statisticsColumns
.
taxLastMoney
-
0
let
discountNew
=
(
value
/
allTaxLastMoney
*
100
).
toFixed
(
2
)
-
0
let
discountLastMoneyNew
=
(
allTaxLastMoney
-
value
).
toFixed
(
2
)
-
0
let
changeAmountNew
=
(
discountLastMoneyNew
+
otherMoney
).
toFixed
(
2
)
-
0
if
(
deposit
)
{
changeAmountNew
=
(
changeAmountNew
-
deposit
).
toFixed
(
2
)
-
0
}
this
.
$nextTick
(()
=>
{
changeAmountNew
=
this
.
prefixNo
===
'
CGDD
'
||
this
.
prefixNo
===
'
XSDD
'
?
0
:
changeAmountNew
this
.
form
.
setFieldsValue
({
'
discount
'
:
discountNew
,
'
discountLastMoney
'
:
discountLastMoneyNew
,
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
...
...
@@ -592,7 +608,24 @@ export const BillModalMixin = {
onKeyUpOtherMoney
(
e
)
{
const
value
=
e
.
target
.
value
-
0
let
discountLastMoney
=
this
.
form
.
getFieldValue
(
'
discountLastMoney
'
)
-
0
let
deposit
=
this
.
form
.
getFieldValue
(
'
deposit
'
)
let
changeAmountNew
=
(
discountLastMoney
+
value
).
toFixed
(
2
)
-
0
if
(
deposit
)
{
changeAmountNew
=
(
changeAmountNew
-
deposit
).
toFixed
(
2
)
-
0
}
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
},
//改变扣除订金
onKeyUpDeposit
(
e
){
const
value
=
e
.
target
.
value
-
0
let
discountLastMoney
=
this
.
form
.
getFieldValue
(
'
discountLastMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)?
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
:
0
let
changeAmountNew
=
(
discountLastMoney
+
otherMoney
).
toFixed
(
2
)
-
0
if
(
value
)
{
changeAmountNew
=
(
changeAmountNew
-
value
).
toFixed
(
2
)
-
0
}
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
...
...
@@ -601,8 +634,12 @@ export const BillModalMixin = {
onKeyUpChangeAmount
(
e
)
{
const
value
=
e
.
target
.
value
-
0
let
discountLastMoney
=
this
.
form
.
getFieldValue
(
'
discountLastMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)?
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
:
0
let
deposit
=
this
.
form
.
getFieldValue
(
'
deposit
'
)
let
debtNew
=
(
discountLastMoney
+
otherMoney
-
value
).
toFixed
(
2
)
-
0
if
(
deposit
)
{
debtNew
=
(
debtNew
-
deposit
).
toFixed
(
2
)
-
0
}
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
debt
'
:
debtNew
})
});
...
...
@@ -692,16 +729,21 @@ export const BillModalMixin = {
allTaxLastMoney
=
allTaxLastMoney
+
(
newDetail
.
taxLastMoney
-
0
)
}
let
discount
=
this
.
form
.
getFieldValue
(
'
discount
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)?
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
:
0
let
deposit
=
this
.
form
.
getFieldValue
(
'
deposit
'
)
let
discountMoney
=
(
discount
*
0.01
*
allTaxLastMoney
).
toFixed
(
2
)
-
0
let
discountLastMoney
=
(
allTaxLastMoney
-
discountMoney
).
toFixed
(
2
)
-
0
let
changeAmountNew
=
(
discountLastMoney
+
otherMoney
).
toFixed
(
2
)
-
0
if
(
deposit
)
{
changeAmountNew
=
(
changeAmountNew
-
deposit
).
toFixed
(
2
)
-
0
}
if
(
this
.
prefixNo
===
'
LSCK
'
||
this
.
prefixNo
===
'
LSTH
'
)
{
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
changeAmount
'
:
allLastMoney
,
'
getAmount
'
:
allLastMoney
,
'
backAmount
'
:
0
})
});
}
else
{
this
.
$nextTick
(()
=>
{
changeAmountNew
=
this
.
prefixNo
===
'
CGDD
'
||
this
.
prefixNo
===
'
XSDD
'
?
0
:
changeAmountNew
this
.
form
.
setFieldsValue
({
'
discount
'
:
discount
,
'
discountMoney
'
:
discountMoney
,
'
discountLastMoney
'
:
discountLastMoney
,
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
...
...
jshERP-web/src/views/bill/modules/PurchaseBackModal.vue
View file @
5e536d7b
...
...
@@ -369,7 +369,7 @@
this
.
$refs
.
linkBillList
.
show
(
'
入库
'
,
'
采购
'
,
'
供应商
'
,
"
1
"
)
this
.
$refs
.
linkBillList
.
title
=
"
选择采购入库
"
},
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
remark
)
{
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
deposit
,
remark
)
{
this
.
rowCanEdit
=
false
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
if
(
selectBillDetailRows
&&
selectBillDetailRows
.
length
>
0
)
{
...
...
jshERP-web/src/views/bill/modules/PurchaseInModal.vue
View file @
5e536d7b
...
...
@@ -155,6 +155,11 @@
</a-tooltip>
</a-form-item>
</a-col>
<a-col
v-if=
"depositStatus"
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"扣除订金"
>
<a-input
v-decorator.trim=
"[ 'deposit' ]"
@
keyup=
"onKeyUpDeposit"
/>
</a-form-item>
</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"
/>
...
...
@@ -166,8 +171,6 @@
<a-input
placeholder=
"请输入本次欠款"
v-decorator.trim=
"[ 'debt' ]"
:readOnly=
"true"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
</a-col>
</a-row>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
...
...
@@ -234,6 +237,7 @@
visible
:
false
,
operTimeStr
:
''
,
prefixNo
:
'
CGRK
'
,
depositStatus
:
false
,
fileList
:[],
rowCanEdit
:
true
,
model
:
{},
...
...
@@ -324,6 +328,7 @@
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
0
)
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
finishNumber
'
,
0
)
if
(
this
.
action
===
'
add
'
)
{
this
.
depositStatus
=
false
this
.
addInit
(
this
.
prefixNo
)
this
.
fileList
=
[]
this
.
$nextTick
(()
=>
{
...
...
@@ -335,7 +340,13 @@
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
}
this
.
model
.
operTime
=
this
.
model
.
operTimeStr
this
.
model
.
debt
=
(
this
.
model
.
discountLastMoney
+
this
.
model
.
otherMoney
-
this
.
model
.
changeAmount
).
toFixed
(
2
)
if
(
this
.
model
.
deposit
)
{
this
.
depositStatus
=
true
}
else
{
this
.
depositStatus
=
false
this
.
model
.
deposit
=
0
}
this
.
model
.
debt
=
(
this
.
model
.
discountLastMoney
+
this
.
model
.
otherMoney
-
this
.
model
.
deposit
-
this
.
model
.
changeAmount
).
toFixed
(
2
)
if
(
this
.
model
.
accountId
==
null
)
{
this
.
model
.
accountId
=
0
this
.
manyAccountBtnStatus
=
true
...
...
@@ -347,7 +358,7 @@
this
.
fileList
=
this
.
model
.
fileName
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
organId
'
,
'
operTime
'
,
'
number
'
,
'
linkNumber
'
,
'
remark
'
,
'
discount
'
,
'
discountMoney
'
,
'
discountLastMoney
'
,
'
otherMoney
'
,
'
accountId
'
,
'
changeAmount
'
,
'
debt
'
))
'
discount
'
,
'
discountMoney
'
,
'
discountLastMoney
'
,
'
otherMoney
'
,
'
accountId
'
,
'
deposit
'
,
'
changeAmount
'
,
'
debt
'
))
});
// 加载子表数据
let
params
=
{
...
...
@@ -409,7 +420,7 @@
this
.
$refs
.
linkBillList
.
show
(
'
其它
'
,
'
采购订单
'
,
'
供应商
'
,
"
1,3
"
)
this
.
$refs
.
linkBillList
.
title
=
"
选择采购订单
"
},
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
remark
)
{
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
deposit
,
remark
)
{
this
.
rowCanEdit
=
false
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
1
)
...
...
@@ -436,6 +447,11 @@
if
(
allTaxLastMoney
)
{
let
discountMoney
=
(
discount
*
allTaxLastMoney
/
100
).
toFixed
(
2
)
-
0
let
discountLastMoney
=
(
allTaxLastMoney
-
discountMoney
).
toFixed
(
2
)
-
0
let
changeAmount
=
discountLastMoney
if
(
deposit
)
{
this
.
depositStatus
=
true
changeAmount
=
(
discountLastMoney
-
deposit
).
toFixed
(
2
)
-
0
}
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
organId
'
:
organId
,
...
...
@@ -443,7 +459,8 @@
'
discount
'
:
discount
,
'
discountMoney
'
:
discountMoney
,
'
discountLastMoney
'
:
discountLastMoney
,
'
changeAmount
'
:
discountLastMoney
,
'
deposit
'
:
deposit
,
'
changeAmount
'
:
changeAmount
,
'
remark
'
:
remark
})
})
...
...
jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue
View file @
5e536d7b
...
...
@@ -54,7 +54,7 @@
<a-form-item
v-if=
"purchaseBySaleFlag"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"关联订单"
data-step=
"3"
data-title=
"关联订单"
data-intro=
"采购订单单据可以通过关联订单来选择已录入的销售订单,选择之后会自动加载订单的内容,
提交之后原来的销售订单会对应的改变单据状态。另外本系统支持分批多次关联"
>
<a-input-search
placeholder=
"请选择关联订单"
v-decorator=
"[ 'linkNumber' ]"
@
search=
"onSearchLinkNumber"
:readOnly=
"true"
/>
<a-input-search
placeholder=
"请选择关联
销售
订单"
v-decorator=
"[ 'linkNumber' ]"
@
search=
"onSearchLinkNumber"
:readOnly=
"true"
/>
</a-form-item>
</a-col>
</a-row>
...
...
@@ -115,27 +115,61 @@
<a-input
placeholder=
"请输入优惠后金额"
v-decorator.trim=
"[ 'discountLastMoney' ]"
:readOnly=
"true"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
></a-col>
</a-row>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"结算账户"
data-step=
"9"
data-title=
"结算账户"
data-intro=
"如果在下拉框中选择多账户,则可以通过多个结算账户进行结算"
>
<a-select
style=
"width:185px;"
placeholder=
"选择结算账户"
v-decorator=
"[ 'accountId', validatorRules.accountId ]"
:dropdownMatchSelectWidth=
"false"
allowClear
@
select=
"selectAccount"
>
<div
slot=
"dropdownRender"
slot-scope=
"menu"
>
<v-nodes
:vnodes=
"menu"
/>
<a-divider
style=
"margin: 4px 0;"
/>
<div
v-if=
"isTenant"
style=
"padding: 4px 8px; cursor: pointer;"
@
mousedown=
"e => e.preventDefault()"
@
click=
"addAccount"
><a-icon
type=
"plus"
/>
新增结算账户
</div>
</div>
<a-select-option
v-for=
"(item,index) in accountList"
:key=
"index"
:value=
"item.id"
>
{{ item.name }}
</a-select-option>
</a-select>
<a-tooltip
title=
"多账户明细"
>
<a-button
type=
"default"
icon=
"folder"
style=
"margin-left: 8px;"
size=
"small"
v-show=
"manyAccountBtnStatus"
@
click=
"handleManyAccount"
/>
</a-tooltip>
</a-form-item>
</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"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
</a-col>
</a-row>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"附件"
data-step=
"
8
"
data-title=
"附件"
data-intro=
"可以上传与单据相关的图片、文档,支持多个文件"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"附件"
data-step=
"
10
"
data-title=
"附件"
data-intro=
"可以上传与单据相关的图片、文档,支持多个文件"
>
<j-upload
v-model=
"fileList"
bizPath=
"bill"
></j-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
<many-account-modal
ref=
"manyAccountModalForm"
@
ok=
"manyAccountModalFormOk"
></many-account-modal>
<vendor-modal
ref=
"vendorModalForm"
@
ok=
"vendorModalFormOk"
></vendor-modal>
<account-modal
ref=
"accountModalForm"
@
ok=
"accountModalFormOk"
></account-modal>
<link-bill-list
ref=
"linkBillList"
@
ok=
"linkBillListOk"
></link-bill-list>
<history-bill-list
ref=
"historyBillListModalForm"
></history-bill-list>
</j-modal>
</template>
<
script
>
import
pick
from
'
lodash.pick
'
import
ManyAccountModal
from
'
../dialog/ManyAccountModal
'
import
LinkBillList
from
'
../dialog/LinkBillList
'
import
VendorModal
from
'
../../system/modules/VendorModal
'
import
AccountModal
from
'
../../system/modules/AccountModal
'
import
HistoryBillList
from
'
../dialog/HistoryBillList
'
import
{
FormTypes
}
from
'
@/utils/JEditableTableUtil
'
import
{
JEditableTableMixin
}
from
'
@/mixins/JEditableTableMixin
'
...
...
@@ -149,8 +183,10 @@
name
:
"
PurchaseOrderModal
"
,
mixins
:
[
JEditableTableMixin
,
BillModalMixin
],
components
:
{
ManyAccountModal
,
LinkBillList
,
VendorModal
,
AccountModal
,
HistoryBillList
,
JUpload
,
JDate
,
...
...
@@ -263,7 +299,7 @@
this
.
fileList
=
this
.
model
.
fileName
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
organId
'
,
'
operTime
'
,
'
number
'
,
'
linkNumber
'
,
'
remark
'
,
'
discount
'
,
'
discountMoney
'
,
'
discountLastMoney
'
))
'
discount
'
,
'
discountMoney
'
,
'
discountLastMoney
'
,
'
accountId
'
,
'
changeAmount
'
))
});
// 加载子表数据
let
params
=
{
...
...
@@ -280,6 +316,7 @@
this
.
copyAddInit
(
this
.
prefixNo
)
}
this
.
initSupplier
()
this
.
initAccount
()
},
/** 整理成formData */
classifyIntoFormData
(
allValues
)
{
...
...
@@ -294,6 +331,7 @@
totalPrice
+=
item
.
allPrice
-
0
}
billMain
.
totalPrice
=
0
-
totalPrice
billMain
.
changeAmount
=
0
-
billMain
.
changeAmount
if
(
this
.
fileList
&&
this
.
fileList
.
length
>
0
)
{
billMain
.
fileName
=
this
.
fileList
}
else
{
...
...
jshERP-web/src/views/bill/modules/RetailBackModal.vue
View file @
5e536d7b
...
...
@@ -370,7 +370,7 @@
this
.
$refs
.
linkBillList
.
show
(
'
出库
'
,
'
零售
'
,
'
会员
'
,
"
1
"
)
this
.
$refs
.
linkBillList
.
title
=
"
选择零售出库
"
},
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
remark
)
{
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
deposit
,
remark
)
{
this
.
rowCanEdit
=
false
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
if
(
selectBillDetailRows
&&
selectBillDetailRows
.
length
>
0
)
{
...
...
jshERP-web/src/views/bill/modules/SaleBackModal.vue
View file @
5e536d7b
...
...
@@ -382,7 +382,7 @@
this
.
$refs
.
linkBillList
.
show
(
'
出库
'
,
'
销售
'
,
'
客户
'
,
"
1
"
)
this
.
$refs
.
linkBillList
.
title
=
"
选择销售出库
"
},
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
remark
)
{
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
deposit
,
remark
)
{
this
.
rowCanEdit
=
false
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
if
(
selectBillDetailRows
&&
selectBillDetailRows
.
length
>
0
)
{
...
...
jshERP-web/src/views/bill/modules/SaleOrderModal.vue
View file @
5e536d7b
...
...
@@ -115,6 +115,36 @@
<a-input
placeholder=
"请输入优惠后金额"
v-decorator.trim=
"[ 'discountLastMoney' ]"
:readOnly=
"true"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
></a-col>
</a-row>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"结算账户"
data-step=
"9"
data-title=
"结算账户"
data-intro=
"如果在下拉框中选择多账户,则可以通过多个结算账户进行结算"
>
<a-select
style=
"width:185px;"
placeholder=
"选择结算账户"
v-decorator=
"[ 'accountId', validatorRules.accountId ]"
:dropdownMatchSelectWidth=
"false"
allowClear
@
select=
"selectAccount"
>
<div
slot=
"dropdownRender"
slot-scope=
"menu"
>
<v-nodes
:vnodes=
"menu"
/>
<a-divider
style=
"margin: 4px 0;"
/>
<div
v-if=
"isTenant"
style=
"padding: 4px 8px; cursor: pointer;"
@
mousedown=
"e => e.preventDefault()"
@
click=
"addAccount"
><a-icon
type=
"plus"
/>
新增结算账户
</div>
</div>
<a-select-option
v-for=
"(item,index) in accountList"
:key=
"index"
:value=
"item.id"
>
{{ item.name }}
</a-select-option>
</a-select>
<a-tooltip
title=
"多账户明细"
>
<a-button
type=
"default"
icon=
"folder"
style=
"margin-left: 8px;"
size=
"small"
v-show=
"manyAccountBtnStatus"
@
click=
"handleManyAccount"
/>
</a-tooltip>
</a-form-item>
</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"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
</a-col>
</a-row>
...
...
@@ -127,13 +157,17 @@
</a-row>
</a-form>
</a-spin>
<many-account-modal
ref=
"manyAccountModalForm"
@
ok=
"manyAccountModalFormOk"
></many-account-modal>
<customer-modal
ref=
"customerModalForm"
@
ok=
"customerModalFormOk"
></customer-modal>
<account-modal
ref=
"accountModalForm"
@
ok=
"accountModalFormOk"
></account-modal>
<history-bill-list
ref=
"historyBillListModalForm"
></history-bill-list>
</j-modal>
</template>
<
script
>
import
pick
from
'
lodash.pick
'
import
ManyAccountModal
from
'
../dialog/ManyAccountModal
'
import
CustomerModal
from
'
../../system/modules/CustomerModal
'
import
AccountModal
from
'
../../system/modules/AccountModal
'
import
HistoryBillList
from
'
../dialog/HistoryBillList
'
import
{
FormTypes
}
from
'
@/utils/JEditableTableUtil
'
import
{
JEditableTableMixin
}
from
'
@/mixins/JEditableTableMixin
'
...
...
@@ -147,7 +181,9 @@
name
:
"
SaleOrderModal
"
,
mixins
:
[
JEditableTableMixin
,
BillModalMixin
],
components
:
{
ManyAccountModal
,
CustomerModal
,
AccountModal
,
HistoryBillList
,
JUpload
,
JDate
,
...
...
@@ -246,7 +282,7 @@
this
.
fileList
=
this
.
model
.
fileName
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
organId
'
,
'
operTime
'
,
'
number
'
,
'
remark
'
,
'
discount
'
,
'
discountMoney
'
,
'
discountLastMoney
'
,
'
otherMoney
'
,
'
accountId
'
,
'
changeAmount
'
,
'
salesMan
'
))
'
discount
'
,
'
discountMoney
'
,
'
discountLastMoney
'
,
'
accountId
'
,
'
changeAmount
'
,
'
salesMan
'
))
});
// 加载子表数据
let
params
=
{
...
...
@@ -264,6 +300,7 @@
}
this
.
initCustomer
()
this
.
initSalesman
()
this
.
initAccount
()
},
//提交单据时整理成formData
classifyIntoFormData
(
allValues
)
{
...
...
jshERP-web/src/views/bill/modules/SaleOutModal.vue
View file @
5e536d7b
...
...
@@ -156,6 +156,11 @@
</a-tooltip>
</a-form-item>
</a-col>
<a-col
v-if=
"depositStatus"
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"扣除订金"
>
<a-input
v-decorator.trim=
"[ 'deposit' ]"
/>
</a-form-item>
</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"
/>
...
...
@@ -167,12 +172,20 @@
<a-input
placeholder=
"请输入本次欠款"
v-decorator.trim=
"[ 'debt' ]"
:readOnly=
"true"
/>
</a-form-item>
</a-col>
</a-row>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"销售人员"
data-step=
"11"
data-title=
"销售人员"
data-intro=
"销售人员的数据来自【经手人管理】菜单中的业务员"
>
<j-select-multiple
placeholder=
"请选择销售人员"
v-model=
"personList.value"
:options=
"personList.options"
/>
<j-select-multiple
style=
"width:185px;"
placeholder=
"请选择销售人员"
v-model=
"personList.value"
:options=
"personList.options"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
</a-col>
</a-row>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
...
...
@@ -240,6 +253,7 @@
visible
:
false
,
operTimeStr
:
''
,
prefixNo
:
'
XSCK
'
,
depositStatus
:
false
,
fileList
:[],
rowCanEdit
:
true
,
model
:
{},
...
...
@@ -328,6 +342,7 @@
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
0
)
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
finishNumber
'
,
0
)
if
(
this
.
action
===
'
add
'
)
{
this
.
depositStatus
=
false
this
.
addInit
(
this
.
prefixNo
)
this
.
personList
.
value
=
''
this
.
fileList
=
[]
...
...
@@ -340,7 +355,13 @@
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
}
this
.
model
.
operTime
=
this
.
model
.
operTimeStr
this
.
model
.
debt
=
(
this
.
model
.
discountLastMoney
+
this
.
model
.
otherMoney
-
this
.
model
.
changeAmount
).
toFixed
(
2
)
if
(
this
.
model
.
deposit
)
{
this
.
depositStatus
=
true
}
else
{
this
.
depositStatus
=
false
this
.
model
.
deposit
=
0
}
this
.
model
.
debt
=
(
this
.
model
.
discountLastMoney
+
this
.
model
.
otherMoney
-
this
.
model
.
deposit
-
this
.
model
.
changeAmount
).
toFixed
(
2
)
if
(
this
.
model
.
accountId
==
null
)
{
this
.
model
.
accountId
=
0
this
.
manyAccountBtnStatus
=
true
...
...
@@ -353,7 +374,7 @@
this
.
fileList
=
this
.
model
.
fileName
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
organId
'
,
'
operTime
'
,
'
number
'
,
'
linkNumber
'
,
'
remark
'
,
'
discount
'
,
'
discountMoney
'
,
'
discountLastMoney
'
,
'
otherMoney
'
,
'
accountId
'
,
'
changeAmount
'
,
'
debt
'
,
'
salesMan
'
))
'
discount
'
,
'
discountMoney
'
,
'
discountLastMoney
'
,
'
otherMoney
'
,
'
accountId
'
,
'
deposit
'
,
'
changeAmount
'
,
'
debt
'
,
'
salesMan
'
))
});
// 加载子表数据
let
params
=
{
...
...
@@ -415,7 +436,7 @@
this
.
$refs
.
linkBillList
.
show
(
'
其它
'
,
'
销售订单
'
,
'
客户
'
,
"
1,3
"
)
this
.
$refs
.
linkBillList
.
title
=
"
选择销售订单
"
},
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
remark
)
{
linkBillListOk
(
selectBillDetailRows
,
linkNumber
,
organId
,
discount
,
deposit
,
remark
)
{
this
.
rowCanEdit
=
false
this
.
materialTable
.
columns
[
1
].
type
=
FormTypes
.
normal
this
.
changeFormTypes
(
this
.
materialTable
.
columns
,
'
preNumber
'
,
1
)
...
...
@@ -442,6 +463,11 @@
if
(
allTaxLastMoney
)
{
let
discountMoney
=
(
discount
*
allTaxLastMoney
/
100
).
toFixed
(
2
)
-
0
let
discountLastMoney
=
(
allTaxLastMoney
-
discountMoney
).
toFixed
(
2
)
-
0
let
changeAmount
=
discountLastMoney
if
(
deposit
)
{
this
.
depositStatus
=
true
changeAmount
=
(
discountLastMoney
-
deposit
).
toFixed
(
2
)
-
0
}
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
organId
'
:
organId
,
...
...
@@ -449,7 +475,8 @@
'
discount
'
:
discount
,
'
discountMoney
'
:
discountMoney
,
'
discountLastMoney
'
:
discountLastMoney
,
'
changeAmount
'
:
discountLastMoney
,
'
deposit
'
:
deposit
,
'
changeAmount
'
:
changeAmount
,
'
remark
'
:
remark
})
})
...
...
jshERP-web/src/views/financial/dialog/DebtBillList.vue
View file @
5e536d7b
...
...
@@ -119,13 +119,13 @@
{
title
:
'
操作员
'
,
dataIndex
:
'
userName
'
,
width
:
60
},
{
title
:
'
欠款
'
,
dataIndex
:
'
needDebt
'
,
width
:
70
,
customRender
:
function
(
text
,
record
,
index
)
{
return
(
record
.
discountLastMoney
+
record
.
otherMoney
-
record
.
changeAmount
).
toFixed
(
2
);
return
(
record
.
discountLastMoney
+
record
.
otherMoney
-
(
record
.
deposit
+
record
.
changeAmount
)
)
.
toFixed
(
2
);
}
},
{
title
:
'
已收欠款
'
,
dataIndex
:
'
finishDebt
'
,
width
:
70
},
{
title
:
'
待收欠款
'
,
dataIndex
:
'
debt
'
,
width
:
70
,
customRender
:
function
(
text
,
record
,
index
)
{
return
(
record
.
discountLastMoney
+
record
.
otherMoney
-
record
.
changeAmount
-
record
.
finishDebt
).
toFixed
(
2
);
return
(
record
.
discountLastMoney
+
record
.
otherMoney
-
(
record
.
deposit
+
record
.
changeAmount
+
record
.
finishDebt
)
)
.
toFixed
(
2
);
}
}
],
...
...
jshERP-web/src/views/financial/mixins/FinancialModalMixin.js
View file @
5e536d7b
...
...
@@ -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
.
changeAmount
).
toFixed
(
2
)
info
.
eachAmount
=
(
info
.
discountLastMoney
+
info
.
otherMoney
-
info
.
changeAmount
-
info
.
finishDebt
).
toFixed
(
2
);
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
);
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