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
d78c98a8
Commit
d78c98a8
authored
Aug 06, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善批量加价及其审核
parent
59042b75
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
64 deletions
+109
-64
index.vue
src/components/WorkFlow/index.vue
+4
-3
batchMarkup.vue
src/views/ecw/box/batchMarkup.vue
+71
-50
batchMakeUpDetail.vue
src/views/ecw/box/components/batchMakeUpDetail.vue
+34
-11
No files found.
src/components/WorkFlow/index.vue
View file @
d78c98a8
...
...
@@ -12,7 +12,7 @@
</div>
<el-form
label-position=
"left"
label-width=
"100px"
>
<el-form-item
:label=
"$t('抄送')"
>
<el-select
v-model=
"valueSync"
multiple
:placeholder=
"$t('请选择抄送人')"
style=
"width:100%"
filterable
>
<el-select
v-model=
"valueSync"
multiple
:placeholder=
"$t('请选择抄送人')"
style=
"width:100%"
filterable
:disabled=
"disabled"
>
<el-option
v-for=
"item in users"
:key=
"item.id"
...
...
@@ -45,7 +45,8 @@ export default {
taskData
:
{
// 任务实例的数据。传递时,可展示 UserTask 审核相关的信息
type
:
Array
,
default
:
()
=>
[],
}
},
disabled
:
Boolean
},
data
(){
return
{
...
...
@@ -87,4 +88,4 @@ export default {
.
workflow
:
:
v-deep
.
my-process-designer
{
height
:
auto
;
}
</
style
>
\ No newline at end of file
</
style
>
src/views/ecw/box/batchMarkup.vue
View file @
d78c98a8
...
...
@@ -5,20 +5,20 @@
<div>
{{
$t
(
'
运费或全包加价
'
)
}}
<!--货币-->
<selector
v-model=
"form.freightCurrencyId"
:options=
"currencyList"
:label-field=
"$l('title')"
value-field=
"id"
defaultable
class=
"w-100 ml-10"
/>
<selector
:disabled=
"approval"
v-model=
"form.freightCurrencyId"
:options=
"currencyList"
:label-field=
"$l('title')"
value-field=
"id"
defaultable
class=
"w-100 ml-10"
/>
<!--金额-->
<el-input
type=
"number"
v-model=
"form.freightFee
"
@
keyup.native=
"checkPositive(form, 'freightFee')"
class=
"w-100 ml-10"
/>
<el-input
:disabled=
"approval"
type=
"number"
v-model=
"form.freightFee"
:min=
"1
"
@
keyup.native=
"checkPositive(form, 'freightFee')"
class=
"w-100 ml-10"
/>
<!--单位-->
<selector
v-model=
"form.freightUnitId"
:options=
"unitList"
:label-field=
"$l('title')"
value-field=
"id"
defaultable
class=
"w-100 ml-10"
/>
<selector
:disabled=
"approval"
v-model=
"form.freightUnitId"
:options=
"unitList"
:label-field=
"$l('title')"
value-field=
"id"
defaultable
class=
"w-100 ml-10"
/>
</div>
<div
class=
"mt-10"
>
{{
$t
(
'
清关费加价价
'
)
}}
<!--货币-->
<selector
v-model=
"form.clearanceCurrencyId"
:options=
"currencyList"
:label-field=
"$l('title')"
value-field=
"id"
defaultable
class=
"w-100 ml-10"
/>
<selector
:disabled=
"approval"
v-model=
"form.clearanceCurrencyId"
:options=
"currencyList"
:label-field=
"$l('title')"
value-field=
"id"
defaultable
class=
"w-100 ml-10"
/>
<!--金额-->
<el-input
type=
"number"
v-model=
"form.clearanceFee
"
@
keyup.native=
"checkPositive(form, 'clearanceFee')"
class=
"w-100 ml-10"
/>
<el-input
:disabled=
"approval"
type=
"number"
v-model=
"form.clearanceFee"
:min=
"1
"
@
keyup.native=
"checkPositive(form, 'clearanceFee')"
class=
"w-100 ml-10"
/>
<!--单位-->
<selector
v-model=
"form.clearanceUnitId"
:options=
"unitList"
:label-field=
"$l('title')"
value-field=
"id"
defaultable
class=
"w-100 ml-10"
/>
<selector
:disabled=
"approval"
v-model=
"form.clearanceUnitId"
:options=
"unitList"
:label-field=
"$l('title')"
value-field=
"id"
defaultable
class=
"w-100 ml-10"
/>
<span>
*
{{
$t
(
'
若线路价格为全包价,输入清关费不生效
'
)
}}
</span>
</div>
...
...
@@ -73,7 +73,7 @@
</
template
>
</div>
</div>
<el-table
v-if=
"sectionObj"
border
:data=
"sectionObj.sectionOrderList || []"
@
selection-change=
"handleSelectionChange"
class=
"mt-10"
>
<el-table
v-if=
"sectionObj"
ref=
"orderTable"
border
:data=
"sectionObj.sectionOrderList || []"
@
selection-change=
"handleSelectionChange"
class=
"mt-10"
>
<el-table-column
type=
"selection"
width=
"50"
></el-table-column>
>
<el-table-column
align=
"center"
:label=
"$t('序号')"
width=
"50"
prop=
"tidanNum"
/>
<el-table-column
prop=
"orderNo"
:label=
"$t('订单号')"
align=
"center"
>
...
...
@@ -113,21 +113,24 @@
<div>
{{
$t
(
'
清关费
'
)
}}
:
{{
form
.
clearanceFee
||
0
}}{{
currencyMap
[
form
.
clearanceCurrencyId
]
}}
/
{{
unitMap
[
form
.
clearanceUnitId
]
}}
</div>
<div>
{{
$t
(
'
全包价
'
)
}}
:
{{
form
.
freightFee
||
0
}}{{
currencyMap
[
form
.
freightCurrencyId
]
}}
/
{{
unitMap
[
form
.
freightUnitId
]
}}
</div>
</
template
>
</el-table-column>
</el-table>
</el-card>
<el-card
class=
"mt-20"
>
<work-flow
xmlkey=
"shipment_batch_add_price"
v-model=
"form.copyUserId"
></work-flow>
<work-flow
xmlkey=
"shipment_batch_add_price"
v-model=
"form.copyUserId"
:disabled=
"approval"
></work-flow>
</el-card>
<div
class=
"mt-20"
>
<el-button
type=
"primary"
@
click=
"submit"
>
提交审核
</el-button>
<el-button
type=
"primary"
@
click=
"$alert('TODO')"
>
审核中
</el-button>
<el-button
type=
"default"
@
click=
"$alert('TODO')"
>
取消审核
</el-button>
<div
class=
"mt-20"
v-if=
"shipmentObj"
>
<
template
v-if=
"approval"
>
<el-button
type=
"primary"
@
click=
"$router.push('/bpm/process-instance/detail?id=' + shipmentObj.batchAddPriceApprovalInfo.bpmProcessId)"
>
{{
$t
(
'
加价申请审核中
'
)
}}
</el-button>
<el-button
type=
"default"
@
click=
"cancelAproval"
>
{{
$t
(
'
取消审核
'
)
}}
</el-button>
</
template
>
<
template
v-else
>
<el-button
type=
"primary"
@
click=
"submit"
>
{{
$t
(
'
提交审核
'
)
}}
</el-button>
</
template
>
<el-button
type=
"default"
@
click=
"$store.dispatch('tagsView/delCurrentView')"
>
{{$t('返回')}}
</el-button>
</div>
</div>
</template>
...
...
@@ -140,14 +143,15 @@ import {getChannelList} from "@/api/ecw/channel";
import
{
getCabinetPage
}
from
"
@/api/ecw/cabinet
"
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getSupplierPage
}
from
"
@/api/ecw/supplier
"
;
import
{
boxGoodsDetail
,
createApproval
,
getSectionList
,
loadSecGoodsList
}
from
"
@/api/ecw/boxSea
"
;
import
{
approvalCancel
,
boxGoodsDetail
,
createApproval
,
getSectionList
,
loadSecGoodsList
}
from
"
@/api/ecw/boxSea
"
;
import
{
getAbnormalList
,
getbox
,
getLogList
}
from
"
@/api/ecw/box
"
;
import
{
getTotlContent
}
from
"
@/views/ecw/box/shippingSea/utils
"
;
import
WorkFlow
from
"
@/components/WorkFlow
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
export
default
{
name
:
"
batchMarkup
"
,
components
:
{
selector
,
WorkFlow
},
components
:
{
Template
,
selector
,
WorkFlow
},
data
(){
return
{
unitList
:[],
...
...
@@ -186,23 +190,6 @@ export default {
})
return
map
},
// 订单
orderList
(){
let
arr
=
[]
this
.
sectionObj
?.
sectionOrderList
.
forEach
(
item
=>
{
if
(
!
this
.
sectionId
||
this
.
sectionId
==
item
.
id
){
arr
=
arr
.
concat
(
item
.
sectionOrderList
)
}
})
return
arr
},
// 提取部分
sectionNameList
(){
let
arr
=
this
.
sectionObj
?.
sectionOrderList
.
map
(
item
=>
{
return
item
.
sectionName
})
return
Array
.
from
(
new
Set
(
arr
))
},
/* 渠道 */
getShipChannelName
()
{
return
(
shippingChannelId
)
=>
{
...
...
@@ -255,28 +242,40 @@ export default {
return
Array
.
from
(
new
Set
(
customsTypes
));
};
},
// 是否审核中
approval
(){
return
this
.
shipmentObj
?.
batchAddPriceApprovalInfo
?.
approvalStatus
===
1
}
},
created
()
{
async
created
()
{
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
this
.
shipmentId
=
this
.
$route
.
query
.
shipmentId
if
(
!
this
.
shipmentId
){
return
this
.
$message
.
error
(
'
请求参数错误
'
)
}
this
.
initData
()
this
.
getSectionList
()
this
.
getBoxDetail
()
await
this
.
getBoxDetail
()
await
this
.
initData
()
await
this
.
getSectionList
()
// 如果是审核中,则默认选中订单
this
.
$nextTick
(()
=>
{
if
(
this
.
approval
){
this
.
sectionObj
.
sectionOrderList
.
forEach
(
order
=>
{
if
(
this
.
form
.
orderIds
.
indexOf
(
order
.
orderId
)
>
-
1
){
this
.
$refs
.
orderTable
.
toggleRowSelection
(
order
)
}
})
}
})
},
methods
:{
// 检查正数
checkPositive
(
object
,
field
){
const
lastChar
=
object
[
field
].
split
(
''
).
pop
()
object
[
field
]
=
parseFloat
(
object
[
field
])
object
[
field
]
=
parseInt
(
object
[
field
])
if
(
isNaN
(
object
[
field
])
||
object
[
field
]
<
0
)
object
[
field
]
=
''
else
object
[
field
]
=
object
[
field
].
toString
()
// 如果最后一位是.且没有其他点则补上
if
(
object
[
field
]
!=
''
&&
object
[
field
].
indexOf
(
'
.
'
)
==
-
1
&&
lastChar
==
'
.
'
)
object
[
field
]
+=
'
.
'
},
// 表格多选
handleSelectionChange
(
selection
)
{
...
...
@@ -284,7 +283,7 @@ export default {
this
.
ids
=
selection
.
map
(
item
=>
item
.
orderId
)
},
// 初始化字典数据
initData
()
{
async
initData
()
{
// 查询渠道
getChannelList
().
then
((
res
)
=>
(
this
.
channelList
=
res
.
data
));
// 查询柜型
...
...
@@ -303,20 +302,25 @@ export default {
/*loadSecGoodsList({shipmentId: this.shipmentId}).then(res => {
this.sectionList = res.data
})*/
this
.
getBoxGoodsDetail
()
await
this
.
getBoxGoodsDetail
()
},
// 出货信息
getBoxDetail
()
{
getbox
(
this
.
shipmentId
).
then
((
res
)
=>
{
const
{
data
}
=
res
;
this
.
shipmentObj
=
data
??
{};
// 如果是审核中则表单给默认值
if
(
this
.
shipmentObj
.
batchAddPriceApprovalInfo
&&
this
.
approval
){
let
details
=
JSON
.
parse
(
this
.
shipmentObj
.
batchAddPriceApprovalInfo
.
details
)
this
.
$set
(
this
,
'
form
'
,
details
)
}
});
},
// 查询详情页所有数据
getSectionList
()
{
let
param
=
{
shipmentId
:
this
.
shipmentId
};
// 部分
getSectionList
(
param
).
then
((
res
)
=>
{
return
getSectionList
(
param
).
then
((
res
)
=>
{
this
.
sectionList
=
res
.
data
.
map
((
item
,
index
)
=>
{
return
{
...
item
,
...
...
@@ -338,7 +342,7 @@ export default {
},
// 获取部分详情以及物品
getBoxGoodsDetail
()
{
boxGoodsDetail
({
return
boxGoodsDetail
({
shipmentId
:
this
.
shipmentId
,
secId
:
this
.
sectionId
,
}).
then
((
res
)
=>
{
...
...
@@ -350,17 +354,34 @@ export default {
if
(
!
this
.
form
.
freightFee
&&
!
this
.
form
.
clearanceFee
){
return
this
.
$message
.
error
(
this
.
$t
(
'
运费和清关费不能同时为空
'
))
}
let
form
=
{...
this
.
form
,
orderIds
:
this
.
ids
}
let
data
=
{
approvalType
:
18
,
// 批量加价
copyUserId
:
this
.
form
.
copyUserId
,
details
:
JSON
.
stringify
(
this
.
form
),
shipmentId
:
this
.
shipmentId
,
orderIds
:
this
.
ids
details
:
JSON
.
stringify
(
form
),
shipmentId
:
this
.
shipmentId
}
createApproval
(
data
).
then
(()
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
提交成功
'
))
this
.
$store
.
dispatch
(
'
tagsView/delCurrentView
'
)
})
},
// 取消审核
cancelAproval
(){
this
.
$prompt
(
this
.
$t
(
'
请输入取消原因
'
),
this
.
$t
(
'
取消审核
'
),
{
inputPattern
:
/
\S
/
,
inputErrorMessage
:
this
.
$t
(
'
请输入取消原因
'
)
}).
then
(({
value
})
=>
{
console
.
log
(
'
cancelApproval
'
,
value
)
return
approvalCancel
({
applyReason
:
value
,
id
:
this
.
shipmentObj
.
batchAddPriceApprovalInfo
.
id
,
shipmentId
:
this
.
shipmentId
})
}).
then
(
res
=>
{
this
.
$message
.
success
(
'
已取消审核
'
)
this
.
getBoxDetail
()
})
}
}
}
...
...
src/views/ecw/box/components/batchMakeUpDetail.vue
View file @
d78c98a8
...
...
@@ -36,23 +36,22 @@
<
template
v-slot=
"{row}"
>
<section>
<div
v-for=
"(item, index) in row.goodsList"
:key=
"index"
>
<div>
{{
index
+
1
}}
:
{{
item
.
prodTitleZh
}}
</div>
<div>
{{
index
+
1
}}
:
{{
item
.
prodTitleEn
}}
</div>
<div>
{{
index
+
1
}}
:
{{
$l
(
item
,
'
prodTitle
'
)
}}
</div>
</div>
</section>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('收费箱数')"
align=
"center"
prop=
"num"
></el-table-column>
<el-table-colum
e
:label=
"$t('收费体积')"
align=
"center"
prop=
"chargeVolume"
></el-table-colume
>
<el-table-colum
n
:label=
"$t('收费体积')"
align=
"center"
prop=
"chargeVolume"
></el-table-column
>
<el-table-column
:label=
"$t('收费重量')"
align=
"center"
prop=
"chargeWeight"
></el-table-column>
<el-table-column
:label=
"$t('
原成交单价
')"
align=
"center"
>
<
template
>
// TODO
</
template
>
</el-table-column
>
<el-table-column
:label=
"$t('新成交单价')"
align=
"center"
>
<
template
>
// TODO
<el-table-column
:label=
"$t('
加价金额
')"
align=
"center"
>
<
template
slot-scope=
"{row}"
v-if=
"details"
>
<div>
{{
$t
(
'
运费
'
)
}}
:
{{
details
.
freightFee
||
0
}}{{
currencyMap
[
details
.
freightCurrencyId
]
}}
/
{{
unitMap
[
details
.
freightUnitId
]
}}
</div
>
<div
>
{{
$t
(
'
清关费
'
)
}}
:
{{
details
.
clearanceFee
||
0
}}{{
currencyMap
[
details
.
clearanceCurrencyId
]
}}
/
{{
unitMap
[
details
.
clearanceUnitId
]
}}
</div>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -66,6 +65,8 @@ import { getCabinetPage } from "@/api/ecw/cabinet";
import
{
getChannelList
}
from
"
@/api/ecw/channel
"
;
import
Decimal
from
"
decimal.js
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
import
{
getUnitList
}
from
"
@/api/ecw/unit
"
;
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
;
/**
* 批量加价审核详情
...
...
@@ -81,6 +82,8 @@ export default {
},
data
()
{
return
{
unitList
:[],
currencyList
:[],
approvalInfo
:
{},
boxBackVO
:
{},
loadDetail
:
{},
...
...
@@ -97,6 +100,8 @@ export default {
};
},
created
()
{
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getChannelList
().
then
((
res
)
=>
(
this
.
channelList
=
res
.
data
));
},
methods
:
{
...
...
@@ -169,6 +174,24 @@ export default {
return
getSeaStatus
(
shippingVO
)
>=
182
?
true
:
false
;
};
},
details
(){
if
(
!
this
.
approvalInfo
)
return
null
return
JSON
.
parse
(
this
.
approvalInfo
?.
details
)
},
currencyMap
(){
let
map
=
{}
this
.
currencyList
.
forEach
(
item
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
'
title
'
)
})
return
map
},
unitMap
(){
let
map
=
{}
this
.
unitList
.
forEach
(
item
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
'
title
'
)
})
return
map
},
},
};
</
script
>
...
...
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