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
ad47826a
Commit
ad47826a
authored
Mar 05, 2025
by
zs嵩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量加价 批量费用申请
parent
17cb701c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
235 additions
and
241 deletions
+235
-241
filter.js
src/filter/filter.js
+10
-0
main.js
src/main.js
+3
-0
selfNoReportDetail.vue
src/views/ecw/financial/selfNoReportDetail.vue
+146
-210
index.vue
src/views/ecw/order/feeApplicationBatch/index.vue
+76
-31
No files found.
src/filter/filter.js
0 → 100644
View file @
ad47826a
export
function
formatNumber
(
num
,
cent
=
2
)
{
let
num2
=
num
.
toString
()
if
(
num2
.
indexOf
(
"
.
"
)
>
-
1
)
{
const
decimalPart
=
num2
.
split
(
"
.
"
)[
1
]
if
(
decimalPart
.
length
>
2
)
{
num2
=
num2
.
substring
(
0
,
num2
.
length
-
(
decimalPart
.
length
-
2
))
}
}
return
num2
}
src/main.js
View file @
ad47826a
...
...
@@ -27,6 +27,9 @@ import DictSelector from "@/components/DictSelector"
import
{
DICT_TYPE
,
getDictDataLabel
,
getDictDatas
,
getDictDatas2
}
from
"
@/utils/dict
"
import
i18n
from
"
./i18n
"
import
{
formatNumber
}
from
"
@/filter/filter
"
Vue
.
prototype
.
$formatNumber
=
formatNumber
// 全局方法挂载
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getConfigKey
=
getConfigKey
...
...
src/views/ecw/financial/selfNoReportDetail.vue
View file @
ad47826a
This diff is collapsed.
Click to expand it.
src/views/ecw/order/feeApplicationBatch/index.vue
View file @
ad47826a
...
...
@@ -38,6 +38,13 @@
</dict-selector>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('计量单位')"
>
<
template
slot-scope=
"{ row, $index }"
>
<el-select
v-model=
"row.unit"
:placeholder=
"$t('请选择')"
clearable
@
change=
"batchUpdateField($index, 'unit')"
>
<el-option
v-for=
"(item, index) in units"
:label=
"$t(item.name)"
:value=
"item.val"
:key=
"index"
></el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('备注')"
>
<
template
slot-scope=
"{ row, $index }"
>
<el-input
v-model=
"row.remarks"
type=
"textarea"
@
input=
"batchUpdateField($index, 'remarks')"
></el-input>
...
...
@@ -97,11 +104,12 @@
/ {{ row.dstWarehouseName }}
</template>
</el-table-column>
<el-table-column
:label=
"$t('
额外费用
')"
width=
"200"
>
<el-table-column
:label=
"$t('
收费数据
')"
width=
"200"
>
<
template
slot-scope=
"{ row }"
>
<div
v-for=
"(item, feeIndex) in row.costVO.feeDtoList"
:key=
"feeIndex"
>
<div
v-if=
"item.amount && item.feeType !== 1 && item.feeType !== 2"
><dict-tag
:type=
"DICT_TYPE.FEE_TYPE"
:value=
"item.feeType"
/>
:
{{
currencyMapF
[
item
.
currencyId
]
}}{{
item
.
amount
}}
</div>
</div>
<el-tooltip
v-if=
"row.orderType !== 1"
effect=
"dark"
:content=
"row.orderType == 3 ? `$
{row.vweight}kg` : `${row.wvolume}m³`" placement="top-start">
<span>
{{
row
.
realityChargeNum
}}{{
$t
(
"
箱
"
)
}}
,
{{
row
.
realityChargeVolume
}}
m³,
{{
row
.
realityChargeWeight
}}
kg
</span>
</el-tooltip>
<template
v-else
>
{{
row
.
realityChargeNum
}}{{
$t
(
"
箱
"
)
}}
,
{{
row
.
realityChargeVolume
}}
m³,
{{
row
.
realityChargeWeight
}}
kg
</
template
>
</template>
</el-table-column>
<el-table-column
:label=
"$t('控货')"
align=
"center"
prop=
"transportId"
>
...
...
@@ -219,7 +227,29 @@ export default {
reason
:
""
,
feeDetailsVOList
:
[],
orderFeeDetailsVOList
:
[]
}
},
units
:
[
{
name
:
"
票
"
,
val
:
1
},
{
name
:
"
收费体积
"
,
val
:
2
},
{
name
:
"
入仓体积
"
,
val
:
3
},
{
name
:
"
收费重量
"
,
val
:
4
},
{
name
:
"
入仓重量
"
,
val
:
5
}
]
}
},
computed
:
{
...
...
@@ -287,25 +317,11 @@ export default {
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
orderId
)
},
formatAmount
(
row
,
index
)
{
// 使用正则表达式限制输入为数字和小数点,并限制小数点后最多两位数字
// row.applicationFee = row.applicationFee.replace(/[^\d.]/g, '').replace(/(\..*)\./g, '$1');
if
(
row
.
applicationFee
.
indexOf
(
"
.
"
)
>
-
1
)
{
const
decimalPart
=
row
.
applicationFee
.
split
(
"
.
"
)[
1
]
if
(
decimalPart
.
length
>
2
)
{
row
.
applicationFee
=
row
.
applicationFee
.
substring
(
0
,
row
.
applicationFee
.
length
-
(
decimalPart
.
length
-
2
))
}
}
row
.
applicationFee
=
this
.
$formatNumber
(
row
.
applicationFee
,
2
)
this
.
batchUpdateField
(
index
,
"
applicationFee
"
)
},
formatAmount2
(
row
)
{
// 使用正则表达式限制输入为数字和小数点,并限制小数点后最多两位数字
// row.applicationFee = row.applicationFee.replace(/[^\d.]/g, '').replace(/(\..*)\./g, '$1');
if
(
row
.
applicationFee
.
indexOf
(
"
.
"
)
>
-
1
)
{
const
decimalPart
=
row
.
applicationFee
.
split
(
"
.
"
)[
1
]
if
(
decimalPart
.
length
>
2
)
{
row
.
applicationFee
=
row
.
applicationFee
.
substring
(
0
,
row
.
applicationFee
.
length
-
(
decimalPart
.
length
-
2
))
}
}
row
.
applicationFee
=
this
.
$formatNumber
(
row
.
applicationFee
,
2
)
},
del
(
index
)
{
...
...
@@ -331,21 +347,50 @@ export default {
}
return
true
},
updatePayer2
(
item
)
{
console
.
log
(
"
变动的费用记录:
"
,
item
)
this
.
$nextTick
(()
=>
{
// 根据新费用类型和索引更新payer付款人信息
this
.
orderDetails
.
drawee
?
(
this
.
orderDetails
.
drawee
!=
3
?
this
.
$set
(
item
,
"
payer
"
,
this
.
orderDetails
.
drawee
)
:
this
.
getDraweePayer
(
item
))
:
undefined
// 费用申请付款人
console
.
log
(
"
变动的费用记录:
"
,
item
)
})
},
batchUpdateField
(
index
,
field
)
{
this
.
$nextTick
(()
=>
{
if
(
field
===
"
payer
"
&&
this
.
batchApplyDetailsInfoVO
.
feeDetailsVOList
[
index
][
field
]
===
""
)
{
let
cval
=
this
.
batchApplyDetailsInfoVO
.
feeDetailsVOList
[
index
][
field
]
if
(
field
===
"
payer
"
&&
cval
===
""
)
{
this
.
batchApplyDetailsInfoVO
.
orderFeeDetailsVOList
.
forEach
((
item
,
i
)
=>
{
let
ITEM
=
item
.
orderFeeApplicationBaseVOList
[
index
]
if
(
item
.
drawee
)
{
item
.
drawee
!=
3
?
(
ITEM
[
field
]
=
item
.
drawee
)
:
this
.
getDraweePayer
(
ITEM
)
}
})
return
}
if
(
field
===
"
unit
"
||
"
applicationFee
"
)
{
let
applicationFee
=
this
.
batchApplyDetailsInfoVO
.
feeDetailsVOList
[
index
][
"
applicationFee
"
]
if
(
applicationFee
)
{
if
(
cval
===
2
)
{
this
.
batchApplyDetailsInfoVO
.
orderFeeDetailsVOList
.
forEach
((
item
,
i
)
=>
{
item
.
orderFeeApplicationBaseVOList
[
index
][
"
applicationFee
"
]
=
this
.
$formatNumber
(
item
.
realityChargeVolume
*
applicationFee
,
2
)
})
}
else
if
(
cval
===
3
)
{
this
.
batchApplyDetailsInfoVO
.
orderFeeDetailsVOList
.
forEach
((
item
,
i
)
=>
{
item
.
orderFeeApplicationBaseVOList
[
index
][
"
applicationFee
"
]
=
this
.
$formatNumber
(
item
.
sumVolume
*
applicationFee
,
2
)
})
}
else
if
(
cval
===
4
)
{
this
.
batchApplyDetailsInfoVO
.
orderFeeDetailsVOList
.
forEach
((
item
,
i
)
=>
{
item
.
orderFeeApplicationBaseVOList
[
index
][
"
applicationFee
"
]
=
this
.
$formatNumber
(
item
.
realityChargeWeight
*
applicationFee
,
2
)
})
}
else
if
(
cval
===
5
)
{
this
.
batchApplyDetailsInfoVO
.
orderFeeDetailsVOList
.
forEach
((
item
,
i
)
=>
{
item
.
orderFeeApplicationBaseVOList
[
index
][
"
applicationFee
"
]
=
this
.
$formatNumber
(
item
.
sumWeight
*
applicationFee
,
2
)
})
}
else
{
this
.
batchApplyDetailsInfoVO
.
orderFeeDetailsVOList
.
forEach
((
item
,
i
)
=>
{
item
.
orderFeeApplicationBaseVOList
[
index
][
"
applicationFee
"
]
=
this
.
$formatNumber
(
1
*
applicationFee
,
2
)
})
}
}
if
(
"
applicationFee
"
)
{
return
}
}
this
.
batchApplyDetailsInfoVO
.
orderFeeDetailsVOList
.
forEach
((
item
,
i
)
=>
{
item
.
orderFeeApplicationBaseVOList
[
index
][
field
]
=
this
.
batchApplyDetailsInfoVO
.
feeDetailsVOList
[
index
][
field
]
item
.
orderFeeApplicationBaseVOList
[
index
][
field
]
=
cval
})
})
},
...
...
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