Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
2e20814d
Commit
2e20814d
authored
Sep 02, 2022
by
dcy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
a4ce6aee
c80e5a02
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
672 additions
and
355 deletions
+672
-355
financial.js
src/api/ecw/financial.js
+12
-12
order.js
src/api/ecw/order.js
+8
-1
index.vue
src/components/DictSelector/index.vue
+1
-1
detail.vue
src/views/bpm/processInstance/detail.vue
+5
-0
creatCollection.vue
src/views/ecw/financial/creatCollection.vue
+290
-181
openInvoice.vue
src/views/ecw/financial/openInvoice.vue
+122
-13
printVoucher.vue
src/views/ecw/financial/printVoucher.vue
+10
-9
receiptDetail.vue
src/views/ecw/financial/receiptDetail.vue
+193
-126
voucher.vue
src/views/ecw/financial/voucher.vue
+12
-11
warehouseDetails.vue
src/views/ecw/order/components/warehouseDetails.vue
+19
-1
No files found.
src/api/ecw/financial.js
View file @
2e20814d
...
...
@@ -46,20 +46,20 @@ export function getReceiptList(query) {
}
// 核销收款单
export
function
receiptVerification
(
id
)
{
return
request
({
url
:
'
/ecw/receipt/verification/
'
+
id
,
method
:
'
GET
'
})
}
//
export function receiptVerification(id) {
//
return request({
//
url: '/ecw/receipt/verification/' + id,
//
method: 'GET'
//
})
//
}
// 反核销收款单
export
function
receiptVerificationCancel
(
id
)
{
return
request
({
url
:
'
/ecw/receipt/verificationCancel/
'
+
id
,
method
:
'
GET
'
})
}
//
export function receiptVerificationCancel(id) {
//
return request({
//
url: '/ecw/receipt/verificationCancel/' + id,
//
method: 'GET'
//
})
//
}
// 获取收款单详情
export
function
getReceiptInfoByIds
(
query
)
{
...
...
src/api/ecw/order.js
View file @
2e20814d
...
...
@@ -163,7 +163,7 @@ export function orderWarehouseIn(data){
})
}
// 入仓
// 入仓
修改
export
function
orderWarehouseInUpdateApply
(
data
){
return
request
({
url
:
'
/order/order-warehouse-in/update-apply
'
,
...
...
@@ -171,6 +171,13 @@ export function orderWarehouseInUpdateApply(data){
data
})
}
// 获取入仓修改审批单详情-审批使用
export
function
getWarehouseUpdateApprovalInfo
(
id
)
{
return
request
({
url
:
'
/order/order-warehouse-in/get-update-approval-info?formId=
'
+
id
,
method
:
'
get
'
})
}
// 入仓完成
export
function
orderWarehouseInFinish
(
data
){
...
...
src/components/DictSelector/index.vue
View file @
2e20814d
<
template
>
<div
class=
"dict-selector"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
:disabled=
"disabled"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
:disabled=
"disabled"
@
change=
"val => $emit('change', val)"
>
<el-option
v-for=
"dict in formattedList"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
...
...
src/views/bpm/processInstance/detail.vue
View file @
2e20814d
...
...
@@ -177,6 +177,11 @@ export default {
processId
:
this
.
processInstance
.
businessKey
,
type
:
1
},
warehouse_update
:
{
component
:
"
warehouseDetails
"
,
processId
:
this
.
processInstance
.
businessKey
,
type
:
4
},
container_modify
:
{
component
:
"
shippingDetail
"
,
processId
:
this
.
processInstance
.
businessKey
,
...
...
src/views/ecw/financial/creatCollection.vue
View file @
2e20814d
...
...
@@ -91,7 +91,7 @@
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card
class=
"card"
>
<el-card
class=
"card
amountCard
"
>
<div
slot=
"header"
class=
"card-title"
>
订单信息
</div>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -114,21 +114,6 @@
</el-table-column>
<el-table-column
label=
"箱数"
align=
"center"
prop=
"num"
/>
<el-table-column
label=
"体积/重量"
align=
"center"
prop=
"weight"
/>
<!-- <el-table-column label="发货人" align="center" prop="consignorName" />
<el-table-column label="收货人" align="center" prop="consigneeName" /> -->
<!-- <el-table-column label="订单状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.ORDER_STATUS"
:value="scope.row.status"
/>
</template>
</el-table-column> -->
<!-- <el-table-column label="收款类型" align="center" prop="paymentType">
<template slot-scope="scope">
<dict-selector :type="DICT_TYPE.PAYMENT_TYPE" v-model="scope.row.paymentType"></dict-selector>
</template>
</el-table-column> -->
<el-table-column
label=
"收入类型"
align=
"center"
prop=
"feeType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
...
...
@@ -149,29 +134,9 @@
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<!-- <el-table-column label="核销比例" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}%</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="已收金额" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
<el-table-column label="本次实收金额" align="center" prop="amount">
<template slot-scope="scope">
<el-input v-model="scope.row.amount">
<template slot="append">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-input>
</template>
</el-table-column> -->
</el-table>
<el-descriptions
:column=
"
1
"
border
class=
"card"
>
<el-descriptions-item
v-for=
"(v, index) in form.receiptAccountList"
:label=
"`收款账户${index + 1}`"
:key=
"index"
>
<el-descriptions
:column=
"
2
"
border
class=
"card"
>
<
!-- <
el-descriptions-item v-for="(v, index) in form.receiptAccountList" :label="`收款账户${index + 1}`" :key="index">
<div style="display: flex">
<el-form-item
label=""
...
...
@@ -207,7 +172,7 @@
<el-button type="text" v-if="index === 0" @click="form.receiptAccountList = [...form.receiptAccountList, {}]">添加收款账户</el-button>
<el-button type="text" v-if="index > 0" @click="subtractItem(index)"><span style="color: red">删除</span></el-button>
</div>
</el-descriptions-item>
</el-descriptions-item>
-->
<el-descriptions-item
label=
"是否需要开票"
>
<el-form-item
...
...
@@ -230,68 +195,6 @@
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"showCurrencyId"
/>
</el-descriptions-item>
</el-descriptions>
<!-- <div class="card">
<el-form-item
label="收款附件"
label-width="120px"
style="margin-bottom: 0; width: 33%; display: inline-block"
prop="wenjian"
>
<el-upload
class="upload-demo"
:action="uploadFileUrl"
:headers="headers"
:on-success="handleUploadSuccess"
:before-upload="handleBeforeUpload"
:on-error="handleUploadError"
:before-remove="beforeRemove"
multiple
>
<el-button size="small" type="primary">上传附件</el-button>
</el-upload>
</el-form-item>
<el-form-item
label="水单号:"
label-width="120px"
style="
margin-bottom: 0;
width: 31%;
margin-left: 2%;
display: inline-block;
"
prop="waterBillNo"
required
error="水单号不能为空"
>
<el-input
v-model="form.waterBillNo"
maxlength="200"
placeholder="请输入水单号"
></el-input>
</el-form-item>
<el-form-item
label="实收日期:"
label-width="120px"
style="
margin-bottom: 0;
width: 31%;
margin-left: 2%;
display: inline-block;
"
prop="payedAt"
required
error="实收日期不能为空"
>
<el-date-picker
clearable
v-model="form.payedAt"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
type="date"
placeholder="选择实收日期"
/>
</el-form-item>
</div> -->
</el-card>
<el-card
v-if=
"showInvoice"
class=
"card"
>
<div
slot=
"header"
class=
"card-title"
>
开票资料
</div>
...
...
@@ -375,7 +278,126 @@
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card
class=
"card amountCard"
>
<el-card
class=
"card"
>
<div
slot=
"header"
class=
"card-title"
>
应收账单
</div>
<el-table
:data=
"form.receiptAccountList"
border
>
<el-table-column
label=
"应收币种"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"应收金额"
align=
"center"
prop=
"receivableAmount"
/>
<el-table-column
align=
"center"
width=
"220"
>
<
template
#header
>
核销基准币种(
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"showCurrencyId"
/>
)汇率
</
template
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.type !== 'total'"
>
<span
v-if=
"showCurrencyId === scope.row.currencyId"
>
{{
scope
.
row
.
writeOffRate
}}
</span>
<el-form-item
v-else
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
:prop=
"`receiptAccountList.$
{scope.$index}.writeOffRate`"
>
<el-input
v-model=
"scope.row.writeOffRate"
></el-input>
</el-form-item>
</
template
>
<
template
v-else
>
应收总金额(
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"showCurrencyId"
/>
)
</
template
>
</template>
</el-table-column>
<el-table-column
align=
"center"
prop=
"writeOffAmount"
>
<
template
#header
>
核销基准金额(
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"showCurrencyId"
/>
)
</
template
>
</el-table-column>
<el-table-column
label=
"收款账户"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-form-item
v-if=
"scope.row.type !== 'total'"
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
:prop=
"`receiptAccountList.$
{scope.$index}.platformAccountId`"
>
<el-select
v-model=
"scope.row.platformAccountId"
placeholder=
"请选择收款账户"
>
<el-option
v-for=
"item in bankData"
:key=
"item.id"
:label=
"item.baAccountName + '(' + item.baAccountNum + ')'"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"收款币种"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-form-item
v-if=
"scope.row.type !== 'total'"
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
:prop=
"`receiptAccountList.$
{scope.$index}.collectionCurrencyId`"
>
<dict-selector
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
v-model=
"scope.row.collectionCurrencyId"
@
change=
"val => currencyIdChange(val, scope.row, scope.$index)"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"收款汇率"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-form-item
v-if=
"scope.row.type !== 'total'"
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
:prop=
"`receiptAccountList.$
{scope.$index}.collectionRate`"
>
<el-input
v-model=
"scope.row.collectionRate"
@
input=
"() => rateChange(scope.row, scope.$index)"
></el-input>
</el-form-item>
<span
v-else
>
收款总金额
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"收款金额"
align=
"center"
prop=
"collectionAmount"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.type !== 'total'"
>
{{
scope
.
row
.
collectionAmount
}}
</span>
<div
v-else
>
<div
v-if=
"scope.row.collectionAmount[0]"
>
美元:
{{
scope
.
row
.
collectionAmount
[
0
]
}}
</div>
<div
v-if=
"scope.row.collectionAmount[1]"
>
人民币:
{{
scope
.
row
.
collectionAmount
[
1
]
}}
</div>
<div
v-if=
"scope.row.collectionAmount[2]"
>
奈拉:
{{
scope
.
row
.
collectionAmount
[
2
]
}}
</div>
</div>
<!--
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
-->
</
template
>
</el-table-column>
</el-table>
<el-descriptions
:column=
"2"
border
class=
"card"
>
<el-descriptions-item
label=
"账单汇率有效期"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
prop=
"rateValidateDate"
>
<el-date-picker
v-model=
"form.rateValidateDate"
type=
"datetime"
placeholder=
"选择日期时间"
>
</el-date-picker>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-card>
<!-- <el-card class="card amountCard">
<el-descriptions :column="2" border>
<template v-for="(item, index) in form.receivableDetailList">
<el-descriptions-item :label="index === 0 ? '应收总金额' : ''" :key="index+3">
...
...
@@ -398,40 +420,6 @@
</el-form-item>
</el-descriptions-item>
</template>
<!-- <el-descriptions-item label="">-</el-descriptions-item>
<el-descriptions-item>
<template v-if="showCurrencyId !== 2" slot="label">
汇率(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />)
</template>
<el-form-item
v-if="showCurrencyId !== 2"
label=""
label-width="0"
style="margin-bottom: 0"
prop="addressPhone"
required
error="请输入汇率"
>
<el-input v-model="form.addressPhone"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="">-</el-descriptions-item>
<el-descriptions-item>
<template v-if="showCurrencyId !== 3" slot="label">
汇率(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />)
</template>
<el-form-item
v-if="showCurrencyId !== 3"
label=""
label-width="0"
style="margin-bottom: 0"
prop="taxRate"
required
error="请输入汇率"
>
<el-input v-model="form.taxRate"></el-input>
</el-form-item>
</el-descriptions-item> -->
<el-descriptions-item>
<template slot="label">
应收总金额(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />)
...
...
@@ -439,7 +427,7 @@
{{ form.receivableTotalAmount }}
</el-descriptions-item>
</el-descriptions>
</el-card>
</el-card>
-->
</el-form>
<div
slot=
"footer"
style=
"margin: 20px 0"
>
<el-button
type=
"primary"
@
click=
"submitForm(1)"
>
保 存
</el-button>
...
...
@@ -636,11 +624,16 @@ export default {
loading1
:
false
,
uploadFileUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"
/app-api/file/upload
"
,
// 上传的图片服务器地址
form
:
{
receiptAccountList
:
[{}],
receivableDetailList
:
[
{
amount
:
0
,
currencyId
:
1
,
rate
:
0
},
{
amount
:
0
,
currencyId
:
2
,
rate
:
0
},
{
amount
:
0
,
currencyId
:
3
,
rate
:
0
}
// receiptAccountList: [{}],
// receivableDetailList: [
// { amount: 0, currencyId: 1, rate: 0 },
// { amount: 0, currencyId: 2, rate: 0 },
// { amount: 0, currencyId: 3, rate: 0 }
// ],
receiptAccountList
:
[
// { currencyId: 1, receivableAmount: 0, writeOffRate: 1, writeOffAmount: 999, platformAccountId: '', currencyId: '', rate: 1, collectionAmount: 0 },
// { currencyId: 2, receivableAmount: 0, writeOffRate: 1, writeOffAmount: 999, platformAccountId: '', currencyId: '', rate: 1, collectionAmount: 0 },
// { currencyId: 3, receivableAmount: 0, writeOffRate: 1, writeOffAmount: 999, platformAccountId: '', currencyId: '', rate: 1, collectionAmount: 0 },
]
},
creatorData
:
[],
...
...
@@ -687,13 +680,31 @@ export default {
this
.
list
=
[...
res
.
data
]
})
getReceiptAccountList
({
id
:
this
.
id
}).
then
(
res
=>
{
if
(
res
.
data
.
length
>
0
)
{
// totalAmount
res
.
data
=
[...
res
.
data
,
{
type
:
'
total
'
,
writeOffAmount
:
res
.
data
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
writeOffAmount
||
0
),
0
),
collectionAmount
:
[
0
,
0
,
0
]
}]
}
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
res
.
data
])
this
.
$nextTick
(()
=>
{
this
.
form
.
receiptAccountList
.
forEach
((
item
,
index
)
=>
{
this
.
rateChange
(
item
,
index
)
});
})
})
}
if
(
that
.
$route
.
query
.
receiptId
&&
that
.
$route
.
query
.
receiptId
!==
'
0
'
)
{
this
.
receiptId
=
this
.
$route
.
query
.
receiptId
;
getReceivableInfoByIds
({
id
:
this
.
receiptId
}).
then
(
res
=>
{
this
.
list
=
[{...
res
.
data
}]
// this.list = [
// { collectionAmount: 100, currencyId: 2 },
// { collectionAmount: 100, currencyId: 3 },
// { collectionAmount: 100, currencyId: 3 },
// ]
// this.$set(this.form, 'supplierId', res.data.supplierId)
this
.
calculation
()
})
...
...
@@ -761,49 +772,146 @@ export default {
}
},
methods
:
{
currencyIdChange
(
val
,
row
,
index
)
{
row
.
collectionCurrencyId
=
val
if
(
val
==
row
.
currencyId
)
row
.
collectionRate
=
1
else
{
if
(
row
.
currencyId
==
1
&&
val
==
2
)
row
.
collectionRate
=
this
.
UStoRMB
()
if
(
row
.
currencyId
==
1
&&
val
==
3
)
row
.
collectionRate
=
this
.
UStoNAN
()
if
(
row
.
currencyId
==
2
&&
val
==
1
)
row
.
collectionRate
=
this
.
RMBtoUS
()
if
(
row
.
currencyId
==
2
&&
val
==
3
)
row
.
collectionRate
=
this
.
RMBtoNAN
()
if
(
row
.
currencyId
==
3
&&
val
==
1
)
row
.
collectionRate
=
this
.
NANtoUS
()
if
(
row
.
currencyId
==
3
&&
val
==
2
)
row
.
collectionRate
=
this
.
NANtoRMB
()
}
this
.
rateChange
(
row
,
index
)
},
rateChange
(
row
,
index
)
{
row
.
receivableAmount
&&
(
row
.
collectionAmount
=
NP
.
times
(
row
.
collectionRate
||
0
,
row
.
receivableAmount
))
this
.
form
.
receiptAccountList
[
index
]
=
{...
row
}
setTimeout
(()
=>
{
// 收款总计
const
dollarList
=
this
.
form
.
receiptAccountList
.
filter
(
v
=>
v
.
collectionCurrencyId
==
1
)
const
dollar
=
dollarList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
collectionAmount
||
0
),
0
)
const
rmbList
=
this
.
form
.
receiptAccountList
.
filter
(
v
=>
v
.
collectionCurrencyId
==
2
)
const
rmb
=
rmbList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
collectionAmount
||
0
),
0
)
const
nairaList
=
this
.
form
.
receiptAccountList
.
filter
(
v
=>
v
.
collectionCurrencyId
==
3
)
const
naira
=
nairaList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
collectionAmount
||
0
),
0
)
this
.
form
.
receiptAccountList
[
this
.
form
.
receiptAccountList
.
length
-
1
].
collectionAmount
=
[
dollar
,
rmb
,
naira
]
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
this
.
form
.
receiptAccountList
])
},
100
)
},
calculation
()
{
const
copyList
=
this
.
form
.
receiptAccountList
this
.
form
.
receiptAccountList
=
[]
const
dollarList
=
this
.
list
.
filter
(
v
=>
v
.
currencyId
===
1
)
const
dollar
=
dollarList
.
length
>
0
?
dollarList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
totalAmount
||
0
),
0
)
:
0
let
dollar
if
(
dollarList
.
length
>
0
)
{
dollar
=
dollarList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
totalAmount
||
0
),
0
)
const
t
=
copyList
.
find
(
v
=>
v
.
currencyId
==
1
)
this
.
form
.
receiptAccountList
=
[
{
currencyId
:
1
,
receivableAmount
:
dollar
,
writeOffRate
:
t
?.
writeOffRate
||
(
this
.
showCurrencyId
===
1
?
1
:
this
.
showCurrencyId
===
2
?
this
.
UStoRMB
()
:
this
.
UStoNAN
()),
platformAccountId
:
t
?.
platformAccountId
||
''
,
collectionCurrencyId
:
t
?.
collectionCurrencyId
||
''
,
collectionRate
:
t
?.
collectionRate
||
''
}
]
this
.
calculationCount
(
dollar
,
1
)
}
const
rmbList
=
this
.
list
.
filter
(
v
=>
v
.
currencyId
===
2
)
const
rmb
=
rmbList
.
length
>
0
?
rmbList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
totalAmount
||
0
),
0
)
:
0
let
rmb
if
(
rmbList
.
length
>
0
)
{
rmb
=
rmbList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
totalAmount
||
0
),
0
)
const
t
=
copyList
.
find
(
v
=>
v
.
currencyId
==
2
)
this
.
form
.
receiptAccountList
=
[
...
this
.
form
.
receiptAccountList
,
{
currencyId
:
2
,
receivableAmount
:
rmb
,
writeOffRate
:
t
?.
writeOffRate
||
(
this
.
showCurrencyId
===
1
?
this
.
RMBtoUS
()
:
this
.
showCurrencyId
===
2
?
1
:
this
.
RMBtoNAN
()),
platformAccountId
:
t
?.
platformAccountId
||
''
,
collectionCurrencyId
:
t
?.
collectionCurrencyId
||
''
,
collectionRate
:
t
?.
collectionRate
||
''
}
]
this
.
calculationCount
(
rmb
,
2
)
}
const
nairaList
=
this
.
list
.
filter
(
v
=>
v
.
currencyId
===
3
)
const
naira
=
nairaList
.
length
>
0
?
nairaList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
totalAmount
||
0
),
0
)
:
0
let
naira
if
(
nairaList
.
length
>
0
)
{
naira
=
nairaList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
totalAmount
||
0
),
0
)
const
t
=
copyList
.
find
(
v
=>
v
.
currencyId
==
3
)
this
.
form
.
receiptAccountList
=
[
...
this
.
form
.
receiptAccountList
,
{
currencyId
:
3
,
receivableAmount
:
naira
,
writeOffRate
:
t
?.
writeOffRate
||
(
this
.
showCurrencyId
===
1
?
this
.
NANtoUS
()
:
this
.
showCurrencyId
===
2
?
this
.
NANtoRMB
()
:
1
),
platformAccountId
:
t
?.
platformAccountId
||
''
,
collectionCurrencyId
:
t
?.
collectionCurrencyId
||
''
,
collectionRate
:
t
?.
collectionRate
||
''
}
]
this
.
calculationCount
(
naira
,
3
)
}
if
(
this
.
form
.
receiptAccountList
.
length
>
0
)
{
// totalAmount
const
totalt
=
this
.
form
.
receiptAccountList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
writeOffAmount
||
0
),
0
)
this
.
form
.
receiptAccountList
=
[...
this
.
form
.
receiptAccountList
,
{
type
:
'
total
'
,
writeOffAmount
:
totalt
,
collectionAmount
:
[
0
,
0
,
0
]
}]
this
.
form
.
receivableTotalAmount
=
totalt
}
// receiptAccountList: [
// { currencyId: 1, receivableAmount: 0, writeOffRate: 1, writeOffAmount: 999, platformAccountId: '', currencyId: '', rate: 1, collectionAmount: 0 },
// { currencyId: 2, receivableAmount: 0, writeOffRate: 1, writeOffAmount: 999, platformAccountId: '', currencyId: '', rate: 1, collectionAmount: 0 },
// { currencyId: 3, receivableAmount: 0, writeOffRate: 1, writeOffAmount: 999, platformAccountId: '', currencyId: '', rate: 1, collectionAmount: 0 },
// ]
if
(
this
.
showCurrencyId
===
1
)
{
// 美元
const
usCount
=
NP
.
plus
(
dollar
,
NP
.
times
(
this
.
RMBtoUS
(),
rmb
),
NP
.
times
(
this
.
NANtoUS
(),
naira
))
this
.
form
.
receivableDetailList
[
0
].
rate
=
1
this
.
form
.
receivableDetailList
[
0
].
amount
=
usCount
this
.
form
.
receivableDetailList
[
1
].
rate
||
(
this
.
form
.
receivableDetailList
[
1
].
rate
=
this
.
UStoRMB
())
this
.
form
.
receivableDetailList
[
2
].
rate
||
(
this
.
form
.
receivableDetailList
[
2
].
rate
=
this
.
UStoNAN
())
this
.
form
.
receivableTotalAmount
=
usCount
this
.
calculationCount
(
usCount
)
//
const usCount = NP.plus(dollar, NP.times(this.RMBtoUS(), rmb), NP.times(this.NANtoUS(), naira))
//
this.form.receivableDetailList[0].rate = 1
//
this.form.receivableDetailList[0].amount = usCount
//
this.form.receivableDetailList[1].rate || (this.form.receivableDetailList[1].rate = this.UStoRMB())
//
this.form.receivableDetailList[2].rate || (this.form.receivableDetailList[2].rate = this.UStoNAN())
//
this.form.receivableTotalAmount = usCount
//
this.calculationCount(usCount)
}
else
if
(
this
.
showCurrencyId
===
2
)
{
// 人民币
const
rmbCount
=
NP
.
plus
(
rmb
,
NP
.
times
(
this
.
UStoRMB
(),
dollar
),
NP
.
times
(
this
.
NANtoRMB
(),
naira
))
this
.
form
.
receivableDetailList
[
1
].
rate
=
1
this
.
form
.
receivableDetailList
[
1
].
amount
=
usCount
this
.
form
.
receivableDetailList
[
0
].
rate
||
(
this
.
form
.
receivableDetailList
[
0
].
rate
=
this
.
RMBtoUS
())
this
.
form
.
receivableDetailList
[
2
].
rate
||
(
this
.
form
.
receivableDetailList
[
2
].
rate
=
this
.
RMBtoNAN
())
this
.
form
.
receivableTotalAmount
=
rmbCount
this
.
calculationCount
(
rmbCount
)
//
const rmbCount = NP.plus(rmb, NP.times(this.UStoRMB(), dollar), NP.times(this.NANtoRMB(), naira))
//
this.form.receivableDetailList[1].rate = 1
//
this.form.receivableDetailList[1].amount = usCount
//
this.form.receivableDetailList[0].rate || (this.form.receivableDetailList[0].rate = this.RMBtoUS())
//
this.form.receivableDetailList[2].rate || (this.form.receivableDetailList[2].rate = this.RMBtoNAN())
//
this.form.receivableTotalAmount = rmbCount
//
this.calculationCount(rmbCount)
}
else
if
(
this
.
showCurrencyId
===
3
)
{
// 奈拉
const
nairaCount
=
NP
.
plus
(
naira
,
NP
.
times
(
this
.
UStoNAN
(),
dollar
),
NP
.
times
(
this
.
RMBtoNAN
(),
rmb
))
this
.
form
.
receivableDetailList
[
2
].
rate
=
1
this
.
form
.
receivableDetailList
[
2
].
amount
=
nairaCount
this
.
form
.
receivableDetailList
[
0
].
rate
||
(
this
.
form
.
receivableDetailList
[
0
].
rate
=
this
.
NANtoUS
())
this
.
form
.
receivableDetailList
[
1
].
rate
||
(
this
.
form
.
receivableDetailList
[
1
].
rate
=
this
.
NANtoRMB
())
this
.
form
.
receivableTotalAmount
=
nairaCount
this
.
calculationCount
(
nairaCount
)
//
const nairaCount = NP.plus(naira, NP.times(this.UStoNAN(), dollar), NP.times(this.RMBtoNAN(), rmb))
//
this.form.receivableDetailList[2].rate = 1
//
this.form.receivableDetailList[2].amount = nairaCount
//
this.form.receivableDetailList[0].rate || (this.form.receivableDetailList[0].rate = this.NANtoUS())
//
this.form.receivableDetailList[1].rate || (this.form.receivableDetailList[1].rate = this.NANtoRMB())
//
this.form.receivableTotalAmount = nairaCount
//
this.calculationCount(nairaCount)
}
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
this
.
form
.
receiptAccountList
])
},
calculationCount
(
usCount
)
{
if
(
this
.
showCurrencyId
===
1
)
{
this
.
form
.
receivableDetailList
[
2
].
amount
=
NP
.
times
(
this
.
form
.
receivableDetailList
[
2
].
rate
,
usCount
)
this
.
form
.
receivableDetailList
[
1
].
amount
=
NP
.
times
(
this
.
form
.
receivableDetailList
[
1
].
rate
,
usCount
)
}
else
if
(
this
.
showCurrencyId
===
2
)
{
this
.
form
.
receivableDetailList
[
2
].
amount
=
NP
.
times
(
this
.
form
.
receivableDetailList
[
2
].
rate
,
usCount
)
this
.
form
.
receivableDetailList
[
0
].
amount
=
NP
.
times
(
this
.
form
.
receivableDetailList
[
0
].
rate
,
usCount
)
}
else
if
(
this
.
showCurrencyId
===
3
)
{
this
.
form
.
receivableDetailList
[
1
].
amount
=
NP
.
times
(
this
.
form
.
receivableDetailList
[
1
].
rate
,
usCount
)
this
.
form
.
receivableDetailList
[
0
].
amount
=
NP
.
times
(
this
.
form
.
receivableDetailList
[
0
].
rate
,
usCount
)
calculationCount
(
usCount
,
type
)
{
const
index
=
this
.
form
.
receiptAccountList
.
findIndex
(
v
=>
v
.
currencyId
==
type
)
const
t
=
this
.
form
.
receiptAccountList
[
index
]
if
(
t
)
{
t
.
writeOffAmount
=
NP
.
times
(
t
.
writeOffRate
||
0
,
usCount
)
this
.
rateChange
(
t
,
index
)
}
},
RMBtoUS
()
{
...
...
@@ -839,10 +947,10 @@ export default {
}
})
},
subtractItem
(
index
)
{
this
.
form
.
receiptAccountList
.
splice
(
index
,
1
)
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
this
.
form
.
receiptAccountList
])
},
//
subtractItem(index) {
//
this.form.receiptAccountList.splice(index, 1)
//
this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList])
//
},
getReceivableListByIds
()
{
},
...
...
@@ -902,7 +1010,8 @@ export default {
},
submitForm
(
addType
)
{
const
params
=
{...
this
.
form
,
addType
}
params
.
receiptAccountList
=
params
.
receiptAccountList
params
.
receiptAccountList
.
length
=
params
.
receiptAccountList
.
length
-
1
// params.receiptAccountList = params.receiptAccountList.map(v => Object.assign(v, { }))
delete
params
.
receivableDetail
if
(
this
.
list
&&
this
.
list
.
length
>
0
)
{
params
.
receivableVOList
=
this
.
list
...
...
src/views/ecw/financial/openInvoice.vue
View file @
2e20814d
...
...
@@ -28,7 +28,7 @@
<el-descriptions-item
label=
"纳税人识别号"
>
{{
invoiceData
.
taxpayer
}}
</el-descriptions-item>
<el-descriptions-item
label=
"地址"
>
{{
invoiceData
.
addressPhone
}}
</el-descriptions-item>
<el-descriptions-item
label=
"开户行"
>
{{
invoiceData
.
accountBank
}}
</el-descriptions-item>
<el-descriptions-item
label=
"税率"
>
<el-descriptions-item
label=
"税率
%
"
>
<el-form-item
label=
""
>
<el-input
v-model=
"invoiceData.taxRate"
></el-input>
</el-form-item>
...
...
@@ -57,24 +57,36 @@
</el-table-column>
<el-table-column
label=
"箱数"
align=
"center"
prop=
"num"
/>
<el-table-column
label=
"体积/重量"
align=
"center"
prop=
"weight"
></el-table-column>
<el-table-column
label=
"
费用
类型"
align=
"center"
prop=
"feeType"
>
<el-table-column
label=
"
收入
类型"
align=
"center"
prop=
"feeType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.
ECW_TRANSPORT
_TYPE"
:type=
"DICT_TYPE.
FEE
_TYPE"
:value=
"scope.row.feeType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"单价"
align=
"center"
prop=
"unitPrice"
/>
<el-table-column
label=
"总金额"
align=
"center"
prop=
"totalAmount"
/>
<el-table-column
label=
"税额"
align=
"center"
>
<el-table-column
label=
"单价金额"
align=
"center"
prop=
"unitPrice"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
unitPrice
}}
</span>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"总金额"
align=
"center"
prop=
"totalAmount"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
totalAmount
}}
</span>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"税额"
align=
"center"
prop=
"tax"
>
<
template
slot-scope=
"scope"
>
无
<span>
{{
scope
.
row
.
tax
}}
</span>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"价税合计"
align=
"center"
>
<el-table-column
label=
"价税合计"
align=
"center"
prop=
"taxAndTotalAmount"
>
<
template
slot-scope=
"scope"
>
无
<span>
{{
scope
.
row
.
taxAndTotalAmount
}}
</span>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -99,6 +111,7 @@
<
script
>
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
getReceiptInvoicing
,
getInvoicingItem
,
updateReceiptInvoicing
}
from
"
@/api/ecw/financial
"
;
import
NP
from
'
number-precision
'
export
default
{
name
:
"
OpenInvoice
"
,
...
...
@@ -118,9 +131,9 @@ export default {
}
},
methods
:
{
getData
()
{
async
getData
()
{
this
.
loading
=
true
;
getReceiptInvoicing
(
this
.
id
).
then
((
res
)
=>
{
await
getReceiptInvoicing
(
this
.
id
).
then
((
res
)
=>
{
this
.
invoiceData
=
res
.
data
;
this
.
invoiceData
.
invoicingTypeId
=
this
.
invoiceData
.
invoicingTypeId
||
''
// if (!this.invoiceData.info || this.invoiceData.info.length == 0) {
...
...
@@ -129,9 +142,15 @@ export default {
this
.
loading
=
false
;
});
getInvoicingItem
({
id
:
this
.
id
}).
then
(
res
=>
{
res
.
data
.
map
(
v
=>
{
v
.
tax
=
NP
.
times
(
v
.
totalAmount
,
this
.
invoiceData
.
taxRate
/
100
)
v
.
taxAndTotalAmount
=
NP
.
plus
(
v
.
totalAmount
,
NP
.
times
(
v
.
totalAmount
,
this
.
invoiceData
.
taxRate
/
100
))
})
const
t
=
{
orderNo
:
'
合计
'
,
totalAmount
:
res
.
data
.
reduce
((
total
,
curr
)
=>
total
+
curr
.
totalAmount
,
0
)
totalAmount
:
res
.
data
.
reduce
((
total
,
curr
)
=>
NP
.
plus
(
total
,
curr
.
totalAmount
),
0
),
tax
:
res
.
data
.
reduce
((
total
,
curr
)
=>
NP
.
plus
(
total
,
curr
.
tax
),
0
),
taxAndTotalAmount
:
res
.
data
.
reduce
((
total
,
curr
)
=>
NP
.
plus
(
total
,
curr
.
taxAndTotalAmount
),
0
)
}
this
.
list
=
[...
res
.
data
,
t
]
})
...
...
@@ -148,8 +167,98 @@ export default {
})
},
getSummaries
(
param
)
{
return
[
'
收款人
'
,
this
.
invoiceData
.
payeeName
,
'
核销人
'
,
this
.
invoiceData
.
writeOffName
,
'
开票人
'
,
this
.
invoiceData
.
issuerName
,
''
,
'
价税合计大写
'
,
444
];
const
t
=
this
.
list
[
this
.
list
.
length
-
1
].
taxAndTotalAmount
return
[
'
收款人
'
,
this
.
invoiceData
.
payeeName
,
'
核销人
'
,
this
.
invoiceData
.
writeOffName
,
'
开票人
'
,
this
.
invoiceData
.
issuerName
,
''
,
'
价税合计大写
'
,
this
.
convertCurrency
(
t
)];
},
convertCurrency
(
money
)
{
//汉字的数字
var
cnNums
=
new
Array
(
'
零
'
,
'
壹
'
,
'
贰
'
,
'
叁
'
,
'
肆
'
,
'
伍
'
,
'
陆
'
,
'
柒
'
,
'
捌
'
,
'
玖
'
);
//基本单位
var
cnIntRadice
=
new
Array
(
''
,
'
拾
'
,
'
佰
'
,
'
仟
'
);
//对应整数部分扩展单位
var
cnIntUnits
=
new
Array
(
''
,
'
万
'
,
'
亿
'
,
'
兆
'
);
//对应小数部分单位
var
cnDecUnits
=
new
Array
(
'
角
'
,
'
分
'
,
'
毫
'
,
'
厘
'
);
//整数金额时后面跟的字符
var
cnInteger
=
'
整
'
;
//整型完以后的单位
var
cnIntLast
=
'
元
'
;
//最大处理的数字
var
maxNum
=
999999999999999.9999
;
//金额整数部分
var
integerNum
;
//金额小数部分
var
decimalNum
;
//输出的中文金额字符串
var
chineseStr
=
''
;
//分离金额后用的数组,预定义
var
parts
;
// 传入的参数为空情况
if
(
money
===
''
)
{
return
''
;
}
money
=
parseFloat
(
money
)
if
(
money
>=
maxNum
){
return
''
}
// 传入的参数为0情况
if
(
money
===
0
)
{
chineseStr
=
cnNums
[
0
]
+
cnIntLast
+
cnInteger
;
return
chineseStr
}
// 转为字符串
money
=
money
.
toString
();
// indexOf 检测某字符在字符串中首次出现的位置 返回索引值(从0 开始) -1 代表无
if
(
money
.
indexOf
(
'
.
'
)
==
-
1
)
{
integerNum
=
money
;
decimalNum
=
''
}
else
{
parts
=
money
.
split
(
'
.
'
);
integerNum
=
parts
[
0
];
decimalNum
=
parts
[
1
].
substr
(
0
,
4
);
}
//转换整数部分
if
(
parseInt
(
integerNum
,
10
)
>
0
){
let
zeroCount
=
0
;
let
IntLen
=
integerNum
.
length
for
(
let
i
=
0
;
i
<
IntLen
;
i
++
){
let
n
=
integerNum
.
substr
(
i
,
1
);
let
p
=
IntLen
-
i
-
1
;
let
q
=
p
/
4
;
let
m
=
p
%
4
;
if
(
n
==
'
0
'
){
zeroCount
++
;
}
else
{
if
(
zeroCount
>
0
){
chineseStr
+=
cnNums
[
0
]
}
zeroCount
=
0
;
chineseStr
+=
cnNums
[
parseInt
(
n
)]
+
cnIntRadice
[
m
];
}
if
(
m
==
0
&&
zeroCount
<
4
){
chineseStr
+=
cnIntUnits
[
q
];
}
}
// 最后+ 元
chineseStr
+=
cnIntLast
;
}
// 转换小数部分
if
(
decimalNum
!=
''
){
let
decLen
=
decimalNum
.
length
;
for
(
let
i
=
0
;
i
<
decLen
;
i
++
){
let
n
=
decimalNum
.
substr
(
i
,
1
);
if
(
n
!=
'
0
'
){
chineseStr
+=
cnNums
[
Number
(
n
)]
+
cnDecUnits
[
i
]
}
}
}
if
(
chineseStr
==
''
){
chineseStr
+=
cnNums
[
0
]
+
cnIntLast
+
cnInteger
;
}
else
if
(
decimalNum
==
''
){
chineseStr
+=
cnInteger
;
}
return
chineseStr
}
},
};
</
script
>
...
...
src/views/ecw/financial/printVoucher.vue
View file @
2e20814d
...
...
@@ -100,18 +100,11 @@
id
:
0
}
},
created
()
{
async
created
()
{
let
that
=
this
if
(
that
.
$route
.
query
.
id
){
that
.
id
=
that
.
$route
.
query
.
id
that
.
getCollectionData
()
getInvoicingItem
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
list
=
res
.
data
})
}
listSimpleUsers
().
then
(
res
=>
that
.
creatorData
=
res
.
data
)
getBankAccountPage
(
that
.
params
).
then
(
res
=>
that
.
bankData
=
res
.
data
.
list
)
listSimpleDepts
().
then
(
res
=>
{
await
listSimpleDepts
().
then
(
res
=>
{
res
.
data
.
forEach
((
item
)
=>
{
if
(
item
.
parentId
==
0
){
...
...
@@ -130,12 +123,20 @@
})
})
if
(
that
.
$route
.
query
.
id
){
that
.
id
=
that
.
$route
.
query
.
id
that
.
getCollectionData
()
getInvoicingItem
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
list
=
res
.
data
})
}
},
methods
:
{
getCollectionData
(){
let
that
=
this
getReceiptInfoByIds
({
id
:
that
.
id
}).
then
(
res
=>
{
that
.
form
=
res
.
data
that
.
form
.
departmentName
=
that
.
deptData
.
find
(
v
=>
v
.
id
==
that
.
form
.
departmentId
).
name
})
},
print
(){
...
...
src/views/ecw/financial/receiptDetail.vue
View file @
2e20814d
...
...
@@ -16,17 +16,6 @@
</el-card>
<el-card
class=
"card"
>
<div
slot=
"header"
class=
"card-title"
>
订单信息
</div>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
style=
"padding: 10px; margin-bottom: 10px"
>
添加未收客户款项
</el-button
>
</el-col>
-->
<el-table
:data=
"list"
border
>
<el-table-column
label=
"订单号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
label=
"唛头"
align=
"center"
prop=
"marks"
/>
...
...
@@ -37,21 +26,6 @@
</el-table-column>
<el-table-column
label=
"箱数"
align=
"center"
prop=
"num"
/>
<el-table-column
label=
"体积/重量"
align=
"center"
prop=
"weight"
/>
<!-- <el-table-column label="发货人" align="center" prop="consignorName" />
<el-table-column label="收货人" align="center" prop="consigneeName" /> -->
<!-- <el-table-column label="订单状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.ORDER_STATUS"
:value="scope.row.status"
/>
</template>
</el-table-column> -->
<!-- <el-table-column label="收款类型" align="center" prop="paymentType">
<template slot-scope="scope">
<dict-selector :type="DICT_TYPE.PAYMENT_TYPE" v-model="scope.row.paymentType"></dict-selector>
</template>
</el-table-column> -->
<el-table-column
label=
"收入类型"
align=
"center"
prop=
"feeType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
...
...
@@ -72,68 +46,15 @@
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<!-- <el-table-column label="核销比例" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}%</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="已收金额" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
<el-table-column label="本次实收金额" align="center" prop="amount">
<template slot-scope="scope">
<el-input v-model="scope.row.amount">
<template slot="append">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-input>
</template>
</el-table-column> -->
</el-table>
<el-descriptions
:column=
"
1
"
border
class=
"card"
>
<el-descriptions-item
v-for=
"(v, index) in form.platformAccountIdList"
:label=
"`收款账户${index + 1}`"
:key=
"index"
>
<el-descriptions
:column=
"
2
"
border
class=
"card"
>
<
!-- <
el-descriptions-item v-for="(v, index) in form.platformAccountIdList" :label="`收款账户${index + 1}`" :key="index">
<div style="display: flex">
<!-- <el-form-item
label=""
label-width="0"
style="margin-bottom: 0; margin-right: 12px"
:prop="`platformAccountIdList[${index}].platformAccountId`"
required
error="请选择收款账户"
>
<el-select
v-model="v.platformAccountId"
placeholder="请选择收款账户"
>
<el-option
v-for="item in bankData"
:key="item.id"
:label="item.baAccountName + '(' + item.baAccountNum + ')'"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0; margin-right: 12px"
:prop="`platformAccountIdList[${index}].currencyId`"
required
error="请选择币种"
>
<dict-selector
:type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
v-model="v.currencyId"
/>
</el-form-item> -->
<el-button type="text" v-if="index === 0" @click="form.platformAccountIdList = [...form.platformAccountIdList, {}]">添加收款账户</el-button>
<el-button type="text" v-if="index > 0" @click="subtractItem(index)"><span style="color: red">删除</span></el-button>
</div>
</el-descriptions-item>
-->
<el-descriptions-item
label=
"是否需要开票"
>
<span>
{{ form.openInvoice == 1 ? '需要' : '不需要' }}
</span>
<!-- <el-select
...
...
@@ -208,7 +129,7 @@
<el-table-column
label=
"水单号"
align=
"center"
prop=
"billNo"
/>
<el-table-column
label=
"水单附件"
align=
"center"
prop=
"attr"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.attr"
>
<
el-link
v-for=
"(v, i) in scope.row.attr"
:href=
"v.url"
:key=
"i"
type=
"primary"
target=
"_blank"
>
{{
v
.
name
}}
</el-link
>
<
div
v-for=
"(v, i) in scope.row.attr"
:key=
"i"
><el-link
:href=
"v.url"
type=
"primary"
target=
"_blank"
>
{{
v
.
name
}}
</el-link></div
>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
...
...
@@ -219,7 +140,7 @@
<el-table-column
label=
"操作"
align=
"center"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.status == 0"
type=
"text"
@
click=
"deleteClick(scope.row)"
>
删除
</el-button>
<el-button
type=
"text"
>
详情
</el-button>
<el-button
type=
"text"
@
click=
"detailClick(scope.row)"
>
详情
</el-button>
<el-button
v-if=
"scope.row.status == 0"
type=
"text"
@
click=
"verificationClick(scope.row)"
>
核销
</el-button>
<el-button
v-if=
"scope.row.status == 1"
type=
"text"
@
click=
"verificationCancelClick(scope.row)"
>
反核销
</el-button>
<el-button
v-if=
"scope.row.status == 0"
type=
"text"
@
click=
"editClick(scope.row)"
>
编辑
</el-button>
...
...
@@ -228,8 +149,90 @@
</el-table>
</el-card>
<el-card
class=
"card"
>
<el-descriptions
:column=
"2"
border
>
<
template
v-for=
"(item, index) in form.receivableDetailList"
>
<div
slot=
"header"
class=
"card-title"
>
应收账单
</div>
<el-table
:data=
"form.receiptAccountList"
border
>
<el-table-column
label=
"应收币种"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"应收金额"
align=
"center"
prop=
"receivableAmount"
/>
<el-table-column
align=
"center"
width=
"220"
>
<
template
#header
>
核销基准币种(
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"showCurrencyId"
/>
)汇率
</
template
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.type !== 'total'"
>
<span>
{{
scope
.
row
.
writeOffRate
}}
</span>
</
template
>
<
template
v-else
>
应收总金额(
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"showCurrencyId"
/>
)
</
template
>
</template>
</el-table-column>
<el-table-column
align=
"center"
prop=
"writeOffAmount"
>
<
template
#header
>
核销基准金额(
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"showCurrencyId"
/>
)
</
template
>
</el-table-column>
<el-table-column
label=
"收款账户"
align=
"center"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.type !== 'total'"
>
{{
`${bankData.find(v => v.id == scope.row.platformAccountId).baAccountName
}
(${bankData.find(v => v.id == scope.row.platformAccountId).baAccountNum
}
)`
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
收款币种
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
:
value
=
"
scope.row.collectionCurrencyId
"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
收款汇率
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
<!--
<
el
-
form
-
item
v
-
if
=
"
scope.row.type !== 'total'
"
label
=
""
label
-
width
=
"
0
"
style
=
"
margin-bottom: 0
"
:
prop
=
"
`receiptAccountList.${scope.$index
}
.collectionRate`
"
>
<
el
-
input
v
-
model
=
"
scope.row.collectionRate
"
@
input
=
"
() => rateChange(scope.row, scope.$index)
"
><
/el-input
>
<
/el-form-item> --
>
<
span
v
-
if
=
"
scope.row.type !== 'total'
"
>
{{
scope
.
row
.
collectionRate
}}
<
/span
>
<
span
v
-
else
>
收款总金额
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
收款金额
"
align
=
"
center
"
prop
=
"
collectionAmount
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
v
-
if
=
"
scope.row.type !== 'total'
"
>
{{
scope
.
row
.
collectionAmount
}}
<
/span
>
<
div
v
-
else
>
<
div
v
-
if
=
"
scope.row.collectionAmount[0]
"
>
美元
:
{{
scope
.
row
.
collectionAmount
[
0
]
}}
<
/div
>
<
div
v
-
if
=
"
scope.row.collectionAmount[1]
"
>
人民币
:
{{
scope
.
row
.
collectionAmount
[
1
]
}}
<
/div
>
<
div
v
-
if
=
"
scope.row.collectionAmount[2]
"
>
奈拉
:
{{
scope
.
row
.
collectionAmount
[
2
]
}}
<
/div
>
<
/div
>
<!--
<
dict
-
tag
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
:
value
=
"
scope.row.currencyId
"
/>
-->
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
el
-
descriptions
:
column
=
"
2
"
border
class
=
"
card
"
>
<
el
-
descriptions
-
item
label
=
"
账单汇率有效期
"
>
{{
parseTime
(
form
.
rateValidateDate
)
}}
<!--
<
el
-
form
-
item
label
=
""
label
-
width
=
"
0
"
style
=
"
margin-bottom: 0
"
prop
=
"
rateValidateDate
"
>
<
el
-
date
-
picker
v
-
model
=
"
form.rateValidateDate
"
type
=
"
datetime
"
placeholder
=
"
选择日期时间
"
>
<
/el-date-picker
>
<
/el-form-item> --
>
<
/el-descriptions-item
>
<
/el-descriptions
>
<
/el-card
>
<
el
-
card
class
=
"
card hexiaoCard
"
>
<
el
-
descriptions
:
column
=
"
3
"
border
>
<!--
<
template
v
-
for
=
"
(item, index) in form.receivableDetailList
"
>
<
el
-
descriptions
-
item
:
label
=
"
index === 0 ? '应收总金额' : ''
"
:
key
=
"
index+3
"
>
{{
item
.
amount
}}
<
dict
-
tag
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
:
value
=
"
index + 1
"
/>
...
...
@@ -240,13 +243,13 @@
<
/template
>
<
span
v
-
if
=
"
showCurrencyId !== item.currencyId
"
>
{{
item
.
rate
}}
<
/span
>
<
/el-descriptions-item
>
</template>
<el-descriptions-item>
<
/template>
--
>
<
!--
<
el
-
descriptions
-
item
>
<
template
slot
=
"
label
"
>
应收总金额(
<
dict
-
tag
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
:
value
=
"
showCurrencyId
"
/>
)
<
/template
>
{{
form
.
receivableTotalAmount
}}
</el-descriptions-item>
<
/el-descriptions-item>
--
>
<
el
-
descriptions
-
item
label
=
"
已核销总金额
"
>
<
el
-
tag
>
{{
verificationData
.
usCount
}}
美元
<
/el-tag
>
<
el
-
tag
>
{{
verificationData
.
rmbCount
}}
人民币
<
/el-tag
>
...
...
@@ -281,18 +284,19 @@
<
div
>
{{
remainingAmount
.
nairaAmount
}}
奈拉
<
/div
>
<
/div
>
<
/el-form-item
>
<el-form-item
label=
"收款账户"
required
prop=
"accountNo"
error=
"收款账户不能为空
"
>
<el-select
v-model=
"addForm.accountNo"
placeholder=
"请选择收款账户"
style=
"width: 220px"
>
<
el
-
form
-
item
label
=
"
收款账户
"
prop
=
"
accountNo
"
:
rules
=
"
{ required: true, trigger: ['blur', 'change'], message: '收款账户不能为空'
}
"
>
<
el
-
select
v
-
if
=
"
!isView
"
v
-
model
=
"
addForm.accountNo
"
placeholder
=
"
请选择收款账户
"
style
=
"
width: 220px
"
>
<
el
-
option
v
-
for
=
"
item in bankData
"
:
key
=
"
item.id
"
:
label
=
"
item.baAccountName + '(' + item.baAccountNum + ')'
"
:
value
=
"
item.id
"
/>
<
/el-select
>
<
span
v
-
else
>
{{
addForm
.
accountNo
}}
<
/span
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
实收日期
"
prop
=
"
amountDate
"
required
error=
"实收日期不能为空"
:
rules
=
"
{ required: true, trigger: ['blur', 'change'], message: '实收日期不能为空'
}
"
>
<
el
-
date
-
picker
v
-
if
=
"
!isView
"
clearable
v
-
model
=
"
addForm.amountDate
"
value
-
format
=
"
yyyy-MM-dd
"
...
...
@@ -300,35 +304,37 @@
type
=
"
date
"
placeholder
=
"
选择实收日期
"
/>
<
span
v
-
else
>
{{
addForm
.
amountDate
}}
<
/span
>
<
/el-form-item
>
<
div
style
=
"
display: flex;
"
>
<
el
-
form
-
item
label
=
"
实收
"
prop
=
"
amount
"
required
error=
"实收不能为空"
:
rules
=
"
{ required: true, trigger: ['blur', 'change'], message: '实收不能为空'
}
"
>
<el-input
v-model=
"addForm.amount"
style=
"width: 220px; margin-right: 12px"
></el-input>
<
el
-
input
v
-
if
=
"
!isView
"
v
-
model
=
"
addForm.amount
"
style
=
"
width: 220px; margin-right: 12px
"
@
input
=
"
setWriteOffAmount
"
><
/el-input
>
<
span
v
-
else
>
{{
addForm
.
amount
}}
<
/span
>
<
/el-form-item
>
<
el
-
form
-
item
label
-
width
=
"
0px
"
prop
=
"
currencyId
"
required
error=
"币种不能为空"
:
rules
=
"
{ required: true, trigger: ['blur', 'change'], message: '币种不能为空'
}
"
>
<dict-selector
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
v-model=
"addForm.currencyId"
/>
<
dict
-
selector
v
-
if
=
"
!isView
"
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
v
-
model
=
"
addForm.currencyId
"
@
change
=
"
val => currencyIdChange(val)
"
/>
<!--
<
span
v
-
else
>
{{
addForm
.
currencyId
}}
<
/span> --
>
<
dict
-
tag
v
-
else
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
:
value
=
"
addForm.currencyId
"
/>
<
/el-form-item
>
<
/div
>
<
el
-
form
-
item
v
-
if
=
"
showCurrencyId != addForm.currencyId
"
prop
=
"
rate
"
required
error=
"汇率不能为空"
:
rules
=
"
{ required: true, trigger: ['blur', 'change'], message: '汇率不能为空'
}
"
>
<
template
slot
=
"
label
"
>
汇率(
<
dict
-
tag
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
:
value
=
"
showCurrencyId
"
/>
)
<
/template
>
<el-input
v-model=
"addForm.rate"
style=
"width: 220px"
></el-input>
<
el
-
input
v
-
if
=
"
!isView
"
v
-
model
=
"
addForm.rate
"
style
=
"
width: 220px
"
><
/el-input
>
<
span
v
-
else
>
{{
addForm
.
rate
}}
<
/span
>
<
/el-form-item
>
<
el
-
form
-
item
v
-
if
=
"
showCurrencyId != addForm.currencyId
"
...
...
@@ -336,13 +342,14 @@
<
template
slot
=
"
label
"
>
金额(
<
dict
-
tag
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
:
value
=
"
showCurrencyId
"
/>
)
<
/template
>
<
!-- <el-input v-model="addForm.rate"></el-input> --
>
<
span
>
{{
addForm
.
writeOffAmount
}}
<
/span
>
<
/el-form-item
>
<
el
-
form
-
item
label=
"
收款
附件"
label
=
"
水单
附件
"
prop
=
"
attr
"
>
<
el
-
upload
v
-
if
=
"
!isView
"
class
=
"
upload-demo
"
:
action
=
"
uploadFileUrl
"
:
headers
=
"
headers
"
...
...
@@ -355,17 +362,20 @@
>
<
el
-
button
size
=
"
small
"
type
=
"
primary
"
>
上传附件
<
/el-button
>
<
/el-upload
>
<
div
v
-
else
>
<
div
v
-
for
=
"
(v, i) in addForm.attr
"
:
key
=
"
i
"
><
el
-
link
:
href
=
"
v.url
"
type
=
"
primary
"
target
=
"
_blank
"
>
{{
v
.
name
}}
<
/el-link></
div
>
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
水单号
"
prop
=
"
billNo
"
required
error=
"水单号不能为空"
:
rules
=
"
{ required: true, trigger: ['blur', 'change'], message: '水单号不能为空'
}
"
>
<el-input
v-model=
"addForm.billNo"
style=
"width: 220px"
></el-input>
<
el
-
input
v
-
if
=
"
!isView
"
v
-
model
=
"
addForm.billNo
"
style
=
"
width: 220px
"
><
/el-input
>
<
span
v
-
else
>
{{
addForm
.
billNo
}}
<
/span
>
<
/el-form-item
>
<
/el-form
>
<div
slot=
"footer"
>
<
div
slot
=
"
footer
"
v
-
if
=
"
!isView
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
saveFrom
"
>
{{
saveBtnText
}}
<
/el-button
>
<
el
-
button
@
click
=
"
hiddenDialog
"
>
取
消
<
/el-button
>
<
/div
>
...
...
@@ -388,7 +398,8 @@ import {
receiptItemVerificationCancel
,
updateReceiptItem
,
receiptItemBatchVerification
,
receiptItemAllVerification
receiptItemAllVerification
,
getReceiptAccountList
}
from
"
@/api/ecw/financial
"
;
import
{
getCurrencyPage
}
from
"
@/api/ecw/currency
"
;
import
NP
from
'
number-precision
'
...
...
@@ -412,8 +423,9 @@ export default {
}
,
addForm
:
{
}
,
detailed
:
[],
dialogTitle
:
'
添加
收款
明细
'
,
dialogTitle
:
'
添加
银行实收
明细
'
,
saveBtnText
:
'
添 加
'
,
isView
:
false
,
multipleSelection
:
[],
currencyList
:
[],
verificationData
:
{
...
...
@@ -453,14 +465,17 @@ export default {
}
}
,
watch
:
{
'
addForm.currencyId
'
(
newVal
)
{
this
.
currencyIdChange
(
newVal
)
}
// 'addForm.currencyId'(newVal)
{
// this.currencyIdChange(newVal)
//
}
,
'
addForm.rate
'
()
{
this
.
setWriteOffAmount
()
}
,
}
,
async
created
()
{
// 获取汇率
await
getCurrencyPage
(
this
.
params
).
then
(
res
=>
this
.
currencyList
=
res
.
data
.
list
)
await
getBankAccountPage
(
this
.
params
).
then
((
res
)
=>
(
this
.
bankData
=
res
.
data
.
list
));
if
(
this
.
$route
.
query
.
id
)
{
this
.
id
=
this
.
$route
.
query
.
id
;
await
getReceiptInfoByIds
({
id
:
this
.
id
}
).
then
(
res
=>
{
...
...
@@ -472,11 +487,43 @@ export default {
await
getInvoicingItem
({
id
:
this
.
id
}
).
then
(
res
=>
{
this
.
list
=
[...
res
.
data
]
}
)
getReceiptAccountList
({
id
:
this
.
id
}
).
then
(
res
=>
{
if
(
res
.
data
.
length
>
0
)
{
// totalAmount
res
.
data
=
[...
res
.
data
,
{
type
:
'
total
'
,
writeOffAmount
:
res
.
data
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
writeOffAmount
||
0
),
0
),
collectionAmount
:
[
0
,
0
,
0
]
}
]
}
// 收款总计
const
dollarList
=
res
.
data
.
filter
(
v
=>
v
.
collectionCurrencyId
==
1
)
const
dollar
=
dollarList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
collectionAmount
||
0
),
0
)
const
rmbList
=
res
.
data
.
filter
(
v
=>
v
.
collectionCurrencyId
==
2
)
const
rmb
=
rmbList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
collectionAmount
||
0
),
0
)
const
nairaList
=
res
.
data
.
filter
(
v
=>
v
.
collectionCurrencyId
==
3
)
const
naira
=
nairaList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
collectionAmount
||
0
),
0
)
res
.
data
[
res
.
data
.
length
-
1
].
collectionAmount
=
[
dollar
,
rmb
,
naira
]
// this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList])
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
res
.
data
])
this
.
$nextTick
(()
=>
{
// this.form.receiptAccountList.forEach((item, index) =>
{
// this.rateChange(item, index)
//
}
);
}
)
}
)
}
getBankAccountPage
(
this
.
params
).
then
((
res
)
=>
(
this
.
bankData
=
res
.
data
.
list
));
this
.
getList
()
}
,
methods
:
{
setWriteOffAmount
()
{
this
.
$set
(
this
.
addForm
,
'
writeOffAmount
'
,
NP
.
times
(
this
.
addForm
.
rate
||
0
,
this
.
addForm
.
amount
||
0
))
}
,
calculation
()
{
const
verificationList
=
this
.
detailed
.
filter
(
v
=>
v
.
status
===
1
)
const
dollarList
=
verificationList
.
filter
(
v
=>
v
.
currencyId
===
1
)
...
...
@@ -543,16 +590,18 @@ export default {
}
,
currencyIdChange
(
val
)
{
val
=
Number
(
val
)
let
rate
if
(
val
===
this
.
showCurrencyId
)
{
this
.
addForm
.
rate
=
1
rate
=
1
}
else
{
if
(
this
.
showCurrencyId
===
1
&&
val
===
2
)
this
.
addForm
.
rate
=
this
.
RMBtoUS
()
else
if
(
this
.
showCurrencyId
===
1
&&
val
===
3
)
this
.
addForm
.
rate
=
this
.
NANtoUS
()
else
if
(
this
.
showCurrencyId
===
2
&&
val
===
1
)
this
.
addForm
.
rate
=
this
.
UStoRMB
()
else
if
(
this
.
showCurrencyId
===
2
&&
val
===
3
)
this
.
addForm
.
rate
=
this
.
NANtoRMB
()
else
if
(
this
.
showCurrencyId
===
3
&&
val
===
1
)
this
.
addForm
.
rate
=
this
.
UStoNAN
()
else
if
(
this
.
showCurrencyId
===
3
&&
val
===
2
)
this
.
addForm
.
rate
=
this
.
RMBtoNAN
()
if
(
this
.
showCurrencyId
===
1
&&
val
===
2
)
rate
=
this
.
RMBtoUS
()
else
if
(
this
.
showCurrencyId
===
1
&&
val
===
3
)
rate
=
this
.
NANtoUS
()
else
if
(
this
.
showCurrencyId
===
2
&&
val
===
1
)
rate
=
this
.
UStoRMB
()
else
if
(
this
.
showCurrencyId
===
2
&&
val
===
3
)
rate
=
this
.
NANtoRMB
()
else
if
(
this
.
showCurrencyId
===
3
&&
val
===
1
)
rate
=
this
.
UStoNAN
()
else
if
(
this
.
showCurrencyId
===
3
&&
val
===
2
)
rate
=
this
.
RMBtoNAN
()
}
this
.
$set
(
this
.
addForm
,
'
rate
'
,
rate
)
}
,
getList
()
{
getReceivableItem
({
id
:
this
.
id
}
).
then
(
res
=>
{
...
...
@@ -593,10 +642,19 @@ export default {
toEdit
()
{
return
this
.
$router
.
push
(
"
creatCollection?id=
"
+
this
.
id
);
}
,
detailClick
(
row
)
{
this
.
openAddDialog
=
true
this
.
dialogTitle
=
'
银行实收明细详情
'
this
.
isView
=
true
setTimeout
(()
=>
{
this
.
addForm
=
{
...
row
}
}
,
0
)
}
,
editClick
(
row
)
{
this
.
openAddDialog
=
true
this
.
dialogTitle
=
'
编辑
收款
明细
'
this
.
dialogTitle
=
'
编辑
银行实收
明细
'
this
.
saveBtnText
=
'
提 交
'
this
.
isView
=
false
setTimeout
(()
=>
{
this
.
addForm
=
{
...
row
}
}
,
0
)
...
...
@@ -662,12 +720,12 @@ export default {
verificationAll
()
{
this
.
$modal
.
confirm
(
"
您确认要全部核销吗?
"
)
.
then
(
function
()
{
.
then
(
()
=>
{
return
receiptItemAllVerification
(
this
.
id
);
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
核销成功
"
);
this
.
$router
.
back
();
}
)
.
catch
(()
=>
{
}
);
}
,
...
...
@@ -677,7 +735,8 @@ export default {
handleAddReceiptItem
()
{
this
.
addForm
=
{
}
this
.
openAddDialog
=
true
this
.
dialogTitle
=
'
添加收款明细
'
this
.
isView
=
false
this
.
dialogTitle
=
'
添加银行实收明细
'
this
.
saveBtnText
=
'
添 加
'
}
,
handleUploadSuccess
(
res
,
file
,
fileList
)
{
...
...
@@ -734,4 +793,12 @@ export default {
font
-
size
:
18
px
;
font
-
weight
:
bold
;
}
.
hexiaoCard
{
::
v
-
deep
.
el
-
descriptions
-
item__label
{
width
:
11
%
;
}
::
v
-
deep
.
el
-
descriptions
-
item__content
{
width
:
22
%
;
}
}
<
/style>
\ No newline at end of file
src/views/ecw/financial/voucher.vue
View file @
2e20814d
...
...
@@ -154,43 +154,44 @@
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
v
-
if
=
"
scope.row.state === 0 || scope.row.state == 1 || scope.row.state ==
5
"
v
-
if
=
"
scope.row.state === 0 || scope.row.state == 1 || scope.row.state ==
2 || scope.row.state == 3
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
handleAdd(scope.row.id)
"
>
编辑
<
/el-butto
n
>
<
el
-
button
v
-
if
=
"
scope.row.state ==
1
"
<
!--
<
el
-
button
v
-
if
=
"
scope.row.state ==
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
verificationClick(scope.row)
"
>
核销
<
/el-butto
n
>
>
-->
<
el
-
button
v
-
if
=
"
scope.row.state
!= 1 && scope.row.state != 5
"
v
-
if
=
"
scope.row.state
== 4 || scope.row.state == 5 || scope.row.state == 6
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
verificationCancelClick(scope.row)
"
>
反核销
<
/el-butto
n
>
<
el
-
button
v
-
if
=
"
scope.row.state ==
3
"
v
-
if
=
"
scope.row.state ==
5
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
openInvoice(scope.row.id)
"
>
开票
<
/el-butto
n
>
<
el
-
button
v
-
if
=
"
scope.row.state === 0
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
deleteClick(scope.row)
"
>
删除
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state == 1 || scope.row.state == 2 || scope.row.state == 3
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
verificationCancelClick(scope.row)
"
>
收款
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state == 0 || scope.row.state == 1
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
deleteClick(scope.row)
"
>
删除
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state !=
5
"
v
-
if
=
"
scope.row.state !=
0
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
toprint(scope.row.id)
"
>
打印
<
/el-butto
n
>
<
el
-
button
v
-
if
=
"
scope.row.state !=
5
"
v
-
if
=
"
scope.row.state !=
0
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
exportReceipt(scope.row.id)
"
...
...
@@ -241,8 +242,8 @@ import { DICT_TYPE } from "@/utils/dict";
import
CustomerSelector
from
"
@/components/CustomerSelector
"
;
import
{
getReceiptList
,
receiptVerification
,
receiptVerificationCancel
,
//
receiptVerification,
//
receiptVerificationCancel,
receiptExportExcel
,
deleteReceipt
}
from
"
@/api/ecw/financial
"
;
...
...
src/views/ecw/order/components/warehouseDetails.vue
View file @
2e20814d
...
...
@@ -124,6 +124,12 @@
{{ FeeDetails.details
&&
FeeDetails.details.reason ? FeeDetails.details.reason :''}}
</div>
</div>
<div
v-if=
"type === 4"
>
<p>
申请理由
</p>
<div>
{{ FeeDetails.details || '' }}
</div>
</div>
</div>
</template>
...
...
@@ -133,7 +139,13 @@ import {
warehouseApprovalGetById
,
warehouseAreaPositionList
}
from
"
@/api/ecw/batchSingleApplication
"
;
import
{
applicationGetOrderByProcessId
,
feeApplicationGet
,
getOrder
,
getOrderPage
,}
from
"
@/api/ecw/order
"
;
import
{
applicationGetOrderByProcessId
,
feeApplicationGet
,
getOrder
,
getOrderPage
,
getWarehouseUpdateApprovalInfo
}
from
'
@/api/ecw/order
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
Template
from
"
@/views/cms/template
"
;
import
{
getSupplierPage
}
from
"
@/api/ecw/supplier
"
;
...
...
@@ -221,6 +233,12 @@ export default {
})
});
break
;
case
4
:
// 入仓修改
getWarehouseUpdateApprovalInfo
(
this
.
processInstanceID
).
then
(
r
=>
{
this
.
FeeDetails
.
details
=
r
.
data
.
details
})
break
}
}
...
...
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