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
cc3130cc
Commit
cc3130cc
authored
Apr 30, 2023
by
我在何方
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator
into dev
parents
fe3238dc
bd296531
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
555 additions
and
1004 deletions
+555
-1004
order.js
src/api/ecw/order.js
+35
-0
index.vue
src/components/ProductSelector/index.vue
+1
-1
detail.vue
src/views/bpm/processInstance/detail.vue
+5
-0
SplitRevoke.vue
src/views/ecw/order/components/SplitRevoke.vue
+84
-0
SplitRevokeDetail.vue
src/views/ecw/order/components/SplitRevokeDetail.vue
+130
-0
index.vue
src/views/ecw/order/index.vue
+11
-12
splitApply.vue
src/views/ecw/order/splitApply.vue
+154
-79
Warehouse.vue
src/views/ecw/order/warehousing/components/Warehouse.vue
+135
-3
editDialog.vue
src/views/ecw/order/warehousing/components/editDialog.vue
+0
-891
index.vue
src/views/ecw/order/warehousing/index.vue
+0
-18
No files found.
src/api/ecw/order.js
View file @
cc3130cc
...
...
@@ -684,3 +684,38 @@ export function splitCancelApply(data){
data
})
}
// 撤销拆单
export
function
orderSplitRevoke
(
data
){
return
request
({
url
:
'
/order/split/revoke
'
,
method
:
'
put
'
,
data
})
}
/*根据订单ID获取撤销拆单详情*/
export
function
splitRevoke
(
orderId
){
return
request
({
url
:
'
/order/split/revoke/
'
+
orderId
,
method
:
'
get
'
})
}
/*根据审批ID获取撤销拆单详情*/
export
function
splitRevokeApply
(
approvalId
){
return
request
({
url
:
'
/order/split/revoke/apply/
'
+
approvalId
,
method
:
'
get
'
})
}
/*取消撤销拆单*/
export
function
cancelSplitRevoke
(
data
){
return
request
({
url
:
'
/order/split/cancel/revoke
'
,
method
:
'
put
'
,
data
})
}
src/components/ProductSelector/index.vue
View file @
cc3130cc
...
...
@@ -14,7 +14,7 @@
<el-option
v-for=
"(item, index) in list"
:key=
"item.id"
:label=
"item['title' + lang]"
:label=
"item['title' + lang]
+ (item.auditStatus === 2 ? '' : `($
{$t('审核中')})`)
"
:value="index">
</el-option>
</el-select>
...
...
src/views/bpm/processInstance/detail.vue
View file @
cc3130cc
...
...
@@ -386,6 +386,11 @@ export default {
component
:
()
=>
import
(
'
@/views/ecw/financial/components/commissionPaymentDetails.vue
'
),
id
:
this
.
processInstance
.
businessKey
,
path
:
this
.
processInstance
.
processDefinition
?.
formCustomViewPath
},
/*撤销拆单*/
split_revoke
:{
component
:
()
=>
import
(
"
@/views/ecw/order/components/SplitRevokeDetail
"
),
id
:
this
.
processInstance
.
businessKey
}
}
console
.
log
(
'
formCustomViewPath
'
,
this
.
processInstance
.
processDefinition
.
formCustomViewPath
.
trim
())
...
...
src/views/ecw/order/components/SplitRevoke.vue
0 → 100644
View file @
cc3130cc
<
template
>
<el-dialog
:visible=
"true"
title=
"撤销拆单"
:before-close=
"close"
>
<el-form
:model=
"form"
label-width=
"100px"
>
<!--
<el-form-item
label=
"申请理由"
>
<el-input
v-model=
"form.reason"
></el-input>
</el-form-item>
-->
<el-form-item
label=
"抄送"
>
<work-flow
v-model=
"form.ccIds"
xmlkey=
"revoke_split_order"
></work-flow>
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<template
v-if=
"formId"
>
<el-button
type=
"primary"
@
click=
"toBpmDetail"
>
审核中
</el-button>
<el-button
type=
"default"
@
click=
"cancelApproval"
>
取消审核
</el-button>
</
template
>
<el-button
v-else
type=
"primary"
@
click=
"submit"
:loading=
"submitting"
:disabled=
"submitting"
>
确认
</el-button>
</div>
</el-dialog>
</template>
<
script
>
import
WorkFlow
from
"
@/components/WorkFlow
"
;
import
{
cancelSplitRevoke
,
orderSplitRevoke
,
splitRevoke
}
from
'
@/api/ecw/order
'
export
default
{
name
:
"
SplitRevoke
"
,
components
:
{
WorkFlow
},
props
:{
orderId
:
Number
},
data
(){
return
{
formId
:
null
,
// 审批ID
submitting
:
false
,
form
:
{
ccIds
:
[]
}
}
},
created
()
{
splitRevoke
(
this
.
orderId
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
formId
){
this
.
formId
=
res
.
data
.
formId
}
})
},
methods
:{
submit
(){
console
.
log
(
'
提交
'
)
if
(
this
.
submitting
)
return
this
.
submitting
=
true
orderSplitRevoke
({
orderId
:
this
.
orderId
,
copyUserId
:
this
.
form
.
ccIds
}).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
msg
||
'
操作成功
'
)
this
.
close
()
}).
finally
(()
=>
{
this
.
submitting
=
false
})
},
close
(){
this
.
$emit
(
'
close
'
)
},
toBpmDetail
(){
this
.
$router
.
push
(
`/bpm/process-instance/detail?id=
${
this
.
formId
}
`
)
this
.
close
()
},
// 取消审核
cancelApproval
(){
this
.
$prompt
(
this
.
$t
(
"
请输入取消原因
"
)).
then
(
res
=>
{
return
cancelSplitRevoke
({
orderId
:
this
.
orderId
,
reason
:
res
.
value
})
}).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
msg
||
this
.
$t
(
'
操作成功
'
))
this
.
close
()
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/order/components/SplitRevokeDetail.vue
0 → 100644
View file @
cc3130cc
<!--拆单审核中的申请信息部分-->
<
template
>
<div
v-if=
"orders"
>
<el-table
:data=
"orders"
>
<el-table-column
:label=
"$t('订单编号')"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
orderNo
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('唛头')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
marks
}}
</
template
>
</el-table-column>
<el-table-column
label=
"订单状态"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
statusMsg
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('填单统计')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
costVO
.
totalNum
}}{{
$t
(
'
箱
'
)
}}
<br/>
{{
row
.
costVO
.
totalVolume
}}
m³
<br/>
{{
row
.
costVO
.
totalWeight
}}
kg
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入仓统计')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
sumNum
}}{{
$t
(
'
箱
'
)
}}
<br/>
{{
row
.
sumVolume
}}
m³
<br/>
{{
row
.
sumWeight
}}
kg
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入仓时间')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
rucangTime
|
parseTime
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('运输方式')"
>
<
template
slot-scope=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"row.transportId"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('出货渠道')"
>
<
template
slot-scope=
"{row}"
>
{{
getChannelName
(
row
.
channelId
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('始发仓')"
>
<
template
slot-scope=
"{row}"
>
{{
jsonParse
(
row
.
departureVO
.
departure
).
titleZh
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('目的仓')"
>
<
template
slot-scope=
"{row}"
>
{{
jsonParse
(
row
.
objectiveVO
.
objective
).
titleZh
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('发货人')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
consignorVO
.
name
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('收货人')"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
consigneeVO
.
name
}}
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
import
{
getApproval
,
getOrder
,
splitRevokeApply
}
from
'
@/api/ecw/order
'
import
{
getMergeListByMergeId
}
from
'
@/api/ecw/orderHandle
'
import
{
getChannelListByIds
}
from
'
@/api/ecw/channel
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
export
default
{
name
:
'
SplitRevokeDetail
'
,
filters
:
{
parseTime
},
props
:{
id
:
[
String
,
Number
]
},
data
(){
return
{
orders
:
null
,
channels
:
[]
}
},
watch
:{
id
(){
this
.
getData
()
}
},
computed
:{
jsonParse
(){
return
d
=>
{
return
JSON
.
parse
(
d
)
}
},
getChannelName
(){
return
id
=>
{
let
channel
=
this
.
channels
.
find
(
item
=>
item
.
channelId
==
id
)
return
channel
?
channel
.
nameZh
:
'
/
'
}
}
},
created
(){
if
(
this
.
id
){
this
.
getData
()
}
},
methods
:{
getData
(){
splitRevokeApply
(
this
.
id
).
then
(
res
=>
{
this
.
orders
=
res
.
data
.
childrenOrderList
this
.
getChannels
()
})
},
getChannels
(){
let
ids
=
[]
this
.
orders
.
forEach
(
order
=>
{
if
(
order
.
channelId
){
ids
.
push
(
order
.
channelId
)
}
})
if
(
!
ids
.
length
)
return
false
getChannelListByIds
({
ids
:
ids
.
join
(
'
,
'
)}).
then
(
res
=>
{
this
.
channels
=
res
.
data
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.title
{
padding
:
10px
0
;
span
{
font-size
:
14px
;
font-weight
:
bold
;
}
}
</
style
>
src/views/ecw/order/index.vue
View file @
cc3130cc
...
...
@@ -317,8 +317,8 @@
</
template
>
<!--撤销拆单,拆单的子订单,预装前显示,预装后变灰不可点击-->
<
template
v-if=
"scope.row.parentOrderId"
>
<el-dropdown-item
@
click.native=
"
cancelSplit(scope.row)"
v-hasPermi=
"['ecw:order:cancel_split
']"
>
{{
$t
(
'
撤销拆单
'
)
}}
</el-dropdown-item>
<
template
v-if=
"scope.row.parentOrderId
&& scope.row.status < 11
"
>
<el-dropdown-item
@
click.native=
"
splitRevoke(scope.row)"
v-hasPermi=
"['ecw:order:split_revoke
']"
>
{{
$t
(
'
撤销拆单
'
)
}}
</el-dropdown-item>
</
template
>
...
...
@@ -462,6 +462,7 @@
<fee-application
:order-id=
"orderId"
:currencys=
"JSON.stringify(currencyList)"
:dialog-visible.sync=
"feeApplicationBol"
></fee-application>
<merge-log
:order-no=
"showMergedLogOrderNo"
v-if=
"showMergedLogOrderNo !== null"
@
close=
"showMergedLogOrderNo=null"
/>
<pickup-log
v-if=
"showPickupLogOrderNo"
:order-no=
"showPickupLogOrderNo"
@
close=
"showPickupLogOrderNo=null"
@
delete=
"getList"
/>
<SplitRevoke
v-if=
"splitRevokeOrderId"
:order-id=
"splitRevokeOrderId"
@
close=
"splitRevokeOrderId=null;getList()"
></SplitRevoke>
</div>
</template>
...
...
@@ -471,7 +472,6 @@ import ProductSelector from '@/components/ProductSelector'
import
{
getProductAttrList
}
from
'
@/api/ecw/productAttr
'
import
CustomerSelector
from
'
@/components/CustomerSelector
'
import
specialNeeds
from
'
@/views/ecw/order/components/specialNeeds
'
;
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
createOrder
,
updateOrder
,
...
...
@@ -497,7 +497,7 @@ import {
exportCustomsDatas
,
exportShippingDatas
,
exportShipFee
,
exportUnload
,
splitCancelApply
exportUnload
,
splitCancelApply
,
orderSplitRevoke
}
from
"
@/api/ecw/order
"
;
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import
PrintTag
from
'
./components/PrintTag
'
...
...
@@ -512,6 +512,7 @@ import MergeLog from '@/views/ecw/order/components/MergeLog'
import
PickupLog
from
'
./components/PickupLog
'
import
{
getWarehouseList
}
from
'
@/api/ecw/warehouse
'
import
{
getCurrencyPage
}
from
"
@/api/ecw/currency
"
;
import
SplitRevoke
from
"
@/views/ecw/order/components/SplitRevoke
"
;
export
default
{
name
:
"
EcwOrderIndex
"
,
components
:
{
...
...
@@ -520,6 +521,7 @@ export default {
BatchSingleApplication
,
MergeLog
,
PickupLog
,
SplitRevoke
,
CustomerSelector
,
ProductSelector
,
Selector
,
specialNeeds
,
PrintTag
,
PrintWarehouseReceipt
,
PrintLadingBill
,
BatchPickup
,
withdrawal
},
props
:
{
...
...
@@ -583,6 +585,8 @@ export default {
},
currencyList
:[],
statistics
:
null
,
// 统计数据
splitRevokeOrderId
:
null
,
// 撤销拆单的订单ID
};
},
watch
:{
...
...
@@ -646,7 +650,7 @@ export default {
}
},
activated
(){
this
.
handleQuery
()
this
.
getList
()
},
created
()
{
this
.
getTransportFromRoute
()
...
...
@@ -659,13 +663,8 @@ export default {
},
methods
:
{
// 取消拆单申请
cancelSplit
(
row
){
this
.
$prompt
(
'
请输入撤销理由
'
).
then
(
res
=>
{
console
.
log
(
"
res
"
,
res
)
return
splitCancelApply
({
orderId
:
row
.
orderId
,
reason
:
res
.
value
})
}).
then
(()
=>
{
this
.
getList
()
})
splitRevoke
(
row
){
this
.
splitRevokeOrderId
=
row
.
orderId
},
// 获得导出函数
getExportFunc
(){
...
...
src/views/ecw/order/splitApply.vue
View file @
cc3130cc
...
...
@@ -154,16 +154,34 @@
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"scope.row.brandType"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('体积')"
align=
"center"
>
<el-table-column
:label=
"$t('
入仓
体积')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
volume
}}
m³
</span>
<el-input
v-model=
"scope.row.volume"
@
change=
"updateField(scope.row, 'volume')"
size=
"mini"
>
<span
slot=
"append"
>
m³
</span>
</el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('
重量')"
align=
"center"
>
<el-table-column
:label=
"$t('
收费体积')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
weight
}}
kg
</span>
</
template
>
<el-input
v-model=
"scope.row.chargeVolume"
@
change=
"updateField(scope.row, 'chargeVolume')"
size=
"mini"
>
<span
slot=
"append"
>
m³
</span>
</el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入仓重量')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.weight"
@
change=
"updateField(scope.row, 'weight')"
size=
"mini"
>
<span
slot=
"append"
>
kg
</span>
</el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('收费重量')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.chargeWeight"
@
change=
"updateField(scope.row, 'chargeWeight')"
size=
"mini"
>
<span
slot=
"append"
>
kg
</span>
</el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('箱数')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
num
}}
</span>
...
...
@@ -186,80 +204,90 @@
<el-button
v-if=
"orderData.inWarehouseState==207"
plain
type=
"primary"
@
click=
"dialogVisible = true"
>
{{$t('取消审核')}}
</el-button>
<el-button
v-if=
"orderData.inWarehouseState==207"
plain
type=
"primary"
@
click=
"$store.dispatch('tagsView/delCurrentView')"
>
{{$t('返回')}}
</el-button>
</div>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('新建拆单')"
:visible.sync=
"open"
width=
"400px"
append-to-body
>
<el-form
ref=
"formSplit"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
:label=
"$t('运输方式')"
>
<dict-selector
:clearable=
"true"
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
@
change=
"changeTransport"
v-model=
"form.transportId"
/>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
v-if=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'"
>
<el-select
v-model=
"form.channelId"
:placeholder=
"$t('请选择出货渠道')"
:clearable=
"true"
>
<el-option
:disabled=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-for=
"item in channelData"
:key=
"item.channelId"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
/>
</el-select>
</el-form-item>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('新建拆单')"
:visible.sync=
"open"
width=
"400px"
append-to-body
>
<el-form
ref=
"formSplit"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
:label=
"$t('运输方式')"
>
<dict-selector
:clearable=
"true"
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
@
change=
"changeTransport"
v-model=
"form.transportId"
/>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
v-if=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'"
>
<el-select
v-model=
"form.channelId"
:placeholder=
"$t('请选择出货渠道')"
:clearable=
"true"
>
<el-option
:disabled=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-for=
"item in channelData"
:key=
"item.channelId"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的仓库')"
>
<el-select
v-model=
"form.destWarehouseId"
@
change=
"changeDeatWarehouseId"
:placeholder=
"$t('请选择目的仓库')"
:clearable=
"true"
>
<el-option
v-for=
"items in importCityList"
:label=
"$l(items, 'title')"
:value=
"items.id"
:key=
"items.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<el-form-item
:label=
"$t('目的仓库')"
>
<el-select
v-model=
"form.destWarehouseId"
@
change=
"changeDeatWarehouseId"
:placeholder=
"$t('请选择目的仓库')"
:clearable=
"true"
>
<el-option
v-for=
"items in importCityList"
:label=
"$l(items, 'title')"
:value=
"items.id"
:key=
"items.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"haddleAdd"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"cancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"500px"
append-to-body
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"120px"
>
<el-row>
<el-form-item
:label=
"$t('中文品名')+':'"
v-if=
"splitData.length>0"
>
<el-select
v-model=
"shopForm.pordid"
:placeholder=
"$t('请选择中文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleZh"
:value=
"item.id"
:key=
"item.prodTitleZh"
></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item
:label=
"$t('英文品名')+':'"
v-if=
"splitData.length>0"
>
<el-select
v-model=
"shopForm.pordid"
:placeholder=
"$t('请选择英文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleEn"
:value=
"item.id"
:key=
"item.prodTitleEn"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('剩余箱数')+':'"
>
{{shopForm.sum||0}}
</el-form-item>
<el-form-item
:label=
"$t('放入箱数')+':'"
>
<el-input-number
v-model=
"shopForm.num"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum"
></el-input-number>
</el-form-item>
<el-form-item
v-if=
"quantityshow"
:label=
"$t('放入数量')+'('+$t('个')+')'+':'"
>
<el-input-number
v-model=
"shopForm.quantity"
controls-position=
"right"
:min=
"1"
:max=
"quantitySum"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('备注信息')+':'"
>
<el-input
v-model=
"shopForm.remark"
></el-input>
</el-form-item>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"shopAdd"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"shopCancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
<el-dialog
:title=
"$t('提示')"
:visible.sync=
"dialogVisible"
width=
"30%"
>
<span
class=
"cancel_notice"
>
{{$t('拆单申请正在审核中,你确定取消拆单申请吗?')}}
</span>
<div
class=
"cancel_content"
>
<span>
{{$t('取消原因:')}}
</span>
<el-input
v-model=
"reason"
:placeholder=
"$t('请输入取消原因')"
></el-input>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"haddleAdd"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"cancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"500px"
append-to-body
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"120px"
>
<el-form-item
:label=
"$t('中文品名')"
v-if=
"splitData.length>0"
>
<el-select
v-model=
"shopForm.pordid"
:placeholder=
"$t('请选择中文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleZh"
:value=
"item.id"
:key=
"item.prodTitleZh"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('英文品名')"
v-if=
"splitData.length>0"
>
<el-select
v-model=
"shopForm.pordid"
:placeholder=
"$t('请选择英文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleEn"
:value=
"item.id"
:key=
"item.prodTitleEn"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('剩余箱数')"
>
{{shopForm.sum||0}}
</el-form-item>
<el-form-item
:label=
"$t('放入箱数')"
>
<el-input-number
v-model=
"shopForm.num"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum"
></el-input-number>
</el-form-item>
<el-form-item
v-if=
"quantityshow"
:label=
"$t('放入数量')+'('+$t('个')+')'"
>
<el-input-number
v-model=
"shopForm.quantity"
controls-position=
"right"
:min=
"1"
:max=
"quantitySum"
></el-input-number>
</el-form-item>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
{{$t('取消')}}
</el-button>
<el-button
type=
"primary"
@
click=
"cancelSplit"
>
{{$t('确定')}}
</el-button>
</span>
</el-dialog>
<el-form-item
:label=
"$t('入仓体积')"
>
<el-input-number
v-model=
"shopForm.volume"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('收费体积')"
>
<el-input-number
v-model=
"shopForm.chargeVolume"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('入仓重量')"
>
<el-input-number
v-model=
"shopForm.weight"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('收费重量')"
>
<el-input-number
v-model=
"shopForm.chargeWeight"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('备注信息')+':'"
>
<el-input
v-model=
"shopForm.remark"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"shopAdd"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"shopCancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
<el-dialog
:title=
"$t('提示')"
:visible.sync=
"dialogVisible"
width=
"30%"
>
<span
class=
"cancel_notice"
>
{{$t('拆单申请正在审核中,你确定取消拆单申请吗?')}}
</span>
<div
class=
"cancel_content"
>
<span>
{{$t('取消原因:')}}
</span>
<el-input
v-model=
"reason"
:placeholder=
"$t('请输入取消原因')"
></el-input>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
{{$t('取消')}}
</el-button>
<el-button
type=
"primary"
@
click=
"cancelSplit"
>
{{$t('确定')}}
</el-button>
</span>
</el-dialog>
</div>
</template>
...
...
@@ -270,7 +298,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
WorkFlow
from
'
@/components/WorkFlow
'
import
{
getOrder
}
from
'
@/api/ecw/order
'
import
Decimal
from
'
decimal.js
'
export
default
{
name
:
"
SplitApply
"
,
...
...
@@ -364,6 +392,19 @@ export default {
}
},
methods
:
{
/*检查并提交字段(体积,重量)修改*/
updateField
(
row
,
field
){
let
val
=
parseFloat
(
row
[
field
])
if
(
!
val
||
val
<
0
){
this
.
$message
.
error
(
this
.
$t
(
'
数据无效
'
))
return
this
.
getList
()
}
createSplitItem
(
row
).
then
(()
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
修改成功
'
))
}).
catch
(()
=>
{
this
.
getList
()
})
},
checkCode
(
data
){
if
(
data
.
indexOf
(
'
+
'
)
==-
1
){
return
'
+
'
+
data
...
...
@@ -452,6 +493,37 @@ export default {
this
.
$modal
.
msgError
(
this
.
$t
(
"
请先新建拆单
"
))
return
}
// 判断体积和重量,子单和必须等于父单
// 1.将拆单中的商品项数据汇总保存到orderItem
this
.
splitData
.
forEach
(
item
=>
{
item
.
orderSplitItemBackVOList
.
forEach
(
splitItem
=>
{
let
orderItem
=
this
.
orderData
.
orderItemVOList
.
find
(
orderItem
=>
orderItem
.
orderItemId
==
splitItem
.
orderItemId
)
if
(
!
orderItem
.
splitSum
){
orderItem
.
splitSum
=
{
volume
:
new
Decimal
(
splitItem
.
volume
||
0
),
weight
:
new
Decimal
(
splitItem
.
weight
||
0
)
}
}
else
{
orderItem
.
splitSum
.
volume
=
orderItem
.
splitSum
.
volume
.
plus
(
splitItem
.
volume
||
0
)
orderItem
.
splitSum
.
weight
=
orderItem
.
splitSum
.
weight
.
plus
(
splitItem
.
weight
||
0
)
}
})
})
// 2. 遍历商品项 对比数据是否符合
let
prods
=
[]
// 数据不符合要求的商品
this
.
orderData
.
orderItemVOList
.
forEach
(
item
=>
{
if
(
!
item
.
splitSum
){
prods
.
push
(
this
.
$l
(
item
,
'
prodTitle
'
))
return
}
if
(
item
.
splitSum
.
volume
.
toNumber
()
!=
item
.
warehouseInInfoVO
.
volume
||
item
.
splitSum
.
weight
.
toNumber
()
!=
item
.
warehouseInInfoVO
.
weight
){
prods
.
push
(
this
.
$l
(
item
,
'
prodTitle
'
))
}
})
if
(
prods
.
length
){
return
this
.
$alert
(
this
.
$t
(
"
{prods}等商品拆单总数据跟主单不匹配
"
,
{
prods
:
prods
.
join
(
'
,
'
)}))
}
// if(this.selectedUsers.length==0){
// this.$modal.msgError("请选择抄送人")
// return
...
...
@@ -468,7 +540,6 @@ export default {
addShop
(
index
){
this
.
splitItemIndex
=
index
this
.
shopOpen
=
true
},
addSplit
(){
this
.
form
.
transportId
=
this
.
orderData
.
transportId
...
...
@@ -552,7 +623,11 @@ export default {
num
:
this
.
shopForm
.
num
,
orderItemId
:
this
.
shopForm
.
orderItemId
,
orderSplitId
:
this
.
splitData
[
this
.
splitItemIndex
].
id
,
remark
:
this
.
shopForm
.
remark
remark
:
this
.
shopForm
.
remark
,
volume
:
this
.
shopForm
.
volume
,
chargeVolume
:
this
.
shopForm
.
chargeVolume
,
weight
:
this
.
shopForm
.
weight
,
chargeWeight
:
this
.
shopForm
.
chargeWeight
}
createSplitItem
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
放入成功
"
));
...
...
src/views/ecw/order/warehousing/components/Warehouse.vue
View file @
cc3130cc
...
...
@@ -12,8 +12,11 @@
<el-descriptions
border
:column=
"2"
>
<el-descriptions-item>
<template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
中文品名
'
)
}}
</
template
>
<product-selector
v-if=
"!order.parentOrderId && !isAdd"
v-model=
"form.prodId"
@
change=
"onProductChange"
/>
<span
v-else
>
{{ warehousing.prodTitleZh }}
</span>
<span
style=
"min-width: 200px;margin-right: 15px;display: inline-block"
>
<product-selector
v-if=
"!order.parentOrderId && !isAdd"
v-model=
"form.prodId"
@
change=
"onProductChange"
/>
<span
v-else
>
{{ warehousing.prodTitleZh }}
</span>
</span>
<el-button
v-if=
"!order.parentOrderId && !isAdd"
type=
"text"
@
click=
"isShowProduct = true"
>
添加新商品
</el-button>
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
英文品名
'
)
}}
</
template
>
...
...
@@ -171,6 +174,19 @@
:is-editing=
"edit"
></warehouse-area-select>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<el-popconfirm
v-if=
"$index >= protectRowCount"
title=
"确定要删除该行入仓记录吗?"
@
confirm=
"handleDeleteRow($index)"
>
<template
v-slot:reference
>
<el-button
size=
"mini"
type=
"danger"
>
删除
</el-button>
</
template
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
...
...
@@ -185,6 +201,7 @@
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
中文品名
'
)
}}
</
template
>
<el-form-item
required
label=
""
prop=
"prodId"
label-width=
"0"
>
<product-selector
v-model=
"form1.prodId"
@
change=
"onProductChange1"
/>
<el-button
type=
"text"
@
click=
"isShowProduct = true"
style=
"margin-left: 15px"
>
添加新商品
</el-button>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item>
...
...
@@ -352,6 +369,18 @@
:is-editing=
"edit"
></warehouse-area-select>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<el-popconfirm
title=
"确定要删除该行入仓记录吗?"
@
confirm=
"handleDeleteRow($index, 1)"
>
<template
v-slot:reference
>
<el-button
size=
"mini"
type=
"danger"
>
删除
</el-button>
</
template
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
...
...
@@ -380,6 +409,35 @@
</
template
>
</span>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog
title=
"添加商品"
:visible.sync=
"isShowProduct"
width=
"550px"
append-to-body
>
<el-form
ref=
"productForm"
:model=
"productForm"
:rules=
"productRules"
label-width=
"110px"
>
<el-form-item
:label=
"$t('商品类型')"
prop=
"typeId"
>
<el-select
v-model=
"productForm.typeId"
:placeholder=
"$t('选择商品类型')"
clearable
>
<el-option
v-for=
"types in typeList"
:key=
"types.id"
:label=
"types.titleZh"
:value=
"types.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('中文标题')"
prop=
"titleZh"
>
<el-input
v-model=
"productForm.titleZh"
:placeholder=
"$t('请输入中文标题')"
/>
</el-form-item>
<el-form-item
:label=
"$t('英文标题')"
prop=
"titleEn"
>
<el-input
v-model=
"productForm.titleEn"
:placeholder=
"$t('请输入英文标题')"
/>
</el-form-item>
<el-form-item
:label=
"$t('商品特性')"
prop=
"attrArray"
>
<el-select
v-model=
"productForm.attrArray"
:placeholder=
"$t('选择商品特性')"
clearable
multiple
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"productSubmit"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"productCancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
</div>
</template>
...
...
@@ -391,6 +449,9 @@ import {cancelProcessInstance} from "@/api/bpm/processInstance"
import
WorkFlow
from
"
@/components/WorkFlow
"
import
{
DICT_TYPE
,
getDictDataLabel
,
getDictDatas
}
from
"
@/utils/dict
"
import
{
orderWarehouseIn
,
orderWarehouseInUpdateApply
}
from
"
@/api/ecw/order
"
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
import
{
createProduct
}
from
"
@/api/ecw/product
"
export
default
{
name
:
"
Warehouse
"
,
...
...
@@ -441,6 +502,11 @@ export default {
}
},
mounted
()
{
this
.
getAttrList
()
this
.
getTypeList
()
},
computed
:
{
isAdd
()
{
return
this
.
$route
.
path
===
"
/order/warehousing-add
"
...
...
@@ -581,7 +647,26 @@ export default {
formId
:
''
,
// 追加时被保护的行数
protectRowCount
:
-
1
protectRowCount
:
-
1
,
// 添加商品弹窗
isShowProduct
:
false
,
productForm
:
{
typeId
:
undefined
,
attrArray
:
[],
titleZh
:
undefined
,
titleEn
:
undefined
},
productRules
:
{
typeId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
商品类型不能为空
"
),
trigger
:
"
change
"
}],
// attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }],
titleZh
:
[{
required
:
true
,
message
:
this
.
$t
(
"
中文标题不能为空
"
),
trigger
:
"
blur
"
}],
titleEn
:
[{
required
:
true
,
message
:
this
.
$t
(
"
英文标题不能为空
"
),
trigger
:
"
blur
"
}],
},
//类型列表
typeList
:
[],
// 特性列表
attrList
:
[]
}
},
...
...
@@ -797,6 +882,13 @@ export default {
this
.
form
.
table
.
pop
()
}
},
handleDeleteRow
(
index
,
val
)
{
if
(
val
===
1
)
{
this
.
form1
.
table
.
splice
(
index
,
1
)
}
else
if
(
this
.
form
.
table
.
length
>
this
.
protectRowCount
)
{
this
.
form
.
table
.
splice
(
index
,
1
)
}
},
handleAdd
(
val
=
0
)
{
let
cartonsNum
=
''
if
(
val
!==
1
)
{
// 货物入仓
...
...
@@ -821,6 +913,46 @@ export default {
specificationType
:
'
1
'
,
table
:
[]
})
},
/** 获取产品属性列表 */
getAttrList
()
{
getProductAttrList
().
then
(
response
=>
{
this
.
attrList
=
response
.
data
;
})
},
/** 获取产品类型列表 */
getTypeList
()
{
getProductTypeList
().
then
(
response
=>
{
this
.
typeList
=
response
.
data
;
})
},
productSubmit
(){
this
.
$refs
[
"
productForm
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
//商品特性转字符串
this
.
productForm
.
attrId
=
this
.
productForm
.
attrArray
.
join
(
'
,
'
)
// 添加的提交
createProduct
(
this
.
productForm
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
))
if
(
this
.
activeName
===
'
first
'
)
{
this
.
form
.
prodId
=
response
.
data
}
else
{
this
.
form1
.
prodId
=
response
.
data
}
this
.
productCancel
()
})
})
},
productCancel
(){
this
.
isShowProduct
=
false
this
.
productForm
=
{
typeId
:
undefined
,
attrArray
:
[],
titleZh
:
undefined
,
titleEn
:
undefined
}
}
}
}
...
...
src/views/ecw/order/warehousing/components/editDialog.vue
deleted
100644 → 0
View file @
fe3238dc
<
template
>
<div>
<el-dialog
:title=
"title + ' - ' + warehousing.orderNo"
:visible.sync=
"opened"
width=
"1280px"
>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleTabs"
>
<el-tab-pane
:label=
"edit ? $t('货物修改') : $t('货物入仓')"
name=
"first"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"formRules"
label-width=
"80px"
>
<el-descriptions
border
:column=
"2"
>
<el-descriptions-item>
<template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
中文品名
'
)
}}
</
template
>
<product-selector
v-if=
"!order.parentOrderId"
v-model=
"form.prodId"
@
change=
"onProductChange0"
/>
<span
v-else
>
{{ warehousing.prodTitleZh }}
</span>
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
英文品名
'
)
}}
</
template
>
<product-selector
v-if=
"!order.parentOrderId"
lang=
"En"
v-model=
"form.prodId"
@
change=
"onProductChange0"
/>
<span
v-else
>
{{ warehousing.prodTitleEn }}
</span>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('品牌')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
品牌
'
)
}}
</
template
>
<span
v-if=
"false"
>
{{ form.brand ? brand : '无' }}
</span>
<el-form-item
required
label=
""
prop=
"brand"
label-width=
"0"
>
<el-select
v-model=
"form.brand"
:placeholder=
"$t('可修改')"
filterable
remote
@
change=
"handleBrandChange"
:remote-method=
"getProductBrandPage"
clearable
>
<el-option
v-for=
"item in brandList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('是否备案')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
是否备案
'
)
}}
</
template
>
{{ isBeian }}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('收费模式')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
收费模式
'
)
}}
</
template
>
{{ feeType }}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('填单参数')"
>
{{ $t('箱数:') }}
<el-input
size=
"mini"
v-if=
"edit"
v-model=
"warehousing.num"
style=
"display: inline-block;width: 100px"
></el-input>
<span
v-else
>
{{ warehousing.num }}
</span><br>
{{ $t('体积:') }}
<el-input
size=
"mini"
v-if=
"edit"
v-model=
"warehousing.volume"
style=
"display: inline-block;width: 100px"
></el-input>
<span
v-else
>
{{ warehousing.volume }}
</span>
m³
<br>
{{ $t('重量:') }}
<el-input
size=
"mini"
v-if=
"edit"
v-model=
"warehousing.weight"
style=
"display: inline-block;width: 100px"
></el-input>
<span
v-else
>
{{ warehousing.weight }}
</span>
Kg
</el-descriptions-item>
</el-descriptions>
<el-form-item
:label=
"$t('材质')"
style=
"margin-top: 20px"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PRODUCT_MATERIAL"
v-model=
"form.material"
clearable
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('入仓时间')"
v-if=
"!edit"
>
<el-date-picker
v-model=
"form.inTime"
type=
"datetime"
:placeholder=
"$t('请选择入仓时间')"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
</el-form>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{ $t('入仓记录') }}
</span>
<el-button
style=
"float: right;margin-left: 15px"
size=
"mini"
type=
"primary"
icon=
"el-icon-minus"
circle
@
click=
"handleDelete"
></el-button>
<el-button
style=
"float: right"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"handleAdd()"
></el-button>
</div>
<el-form
ref=
"tableForm"
:model=
"tableData"
:rules=
"tableFormRules"
size=
"mini"
>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
:label=
"$t('箱数')"
width=
"150px"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
{{
$t
(
'
箱数
'
)
}}
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.cartonsNum"
:prop=
"$index + '.cartonsNum'"
>
<el-input
v-model=
"tableData[$index].cartonsNum"
placeholder=
""
@
blur=
"handleVolume($index)"
>
<span
slot=
"append"
>
{{
getDictDataLabel
(
DICT_TYPE
.
WAREHOUSING_SPECIFICATION_TYPE
,
tableData
[
$index
].
specificationType
)
}}
</span>
</el-input>
<dict-selector
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
v-model=
"tableData[$index].specificationType"
@
change=
"handleVolume($index)"
></dict-selector>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
width=
"100px"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
{{
$t
(
'
包装类型
'
)
}}
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<dict-selector
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"tableData[$index].unit"
></dict-selector>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
长
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.boxGauge1"
:prop=
"$index + '.boxGauge1'"
>
<el-input
type=
"number"
v-model=
"tableData[$index].boxGauge1"
placeholder=
""
@
blur=
"handleVolume($index)"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
宽
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.boxGauge2"
:prop=
"$index + '.boxGauge2'"
>
<el-input
type=
"number"
v-model=
"tableData[$index].boxGauge2"
placeholder=
""
@
blur=
"handleVolume($index)"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
高
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.boxGauge3"
:prop=
"$index + '.boxGauge3'"
>
<el-input
type=
"number"
v-model=
"tableData[$index].boxGauge3"
placeholder=
""
@
blur=
"handleVolume($index)"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"体积(m³)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
体积
'
)
}}
</span>
(m³)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.volume"
:prop=
"$index + '.volume'"
>
<el-input
v-model=
"tableData[$index].volume"
placeholder=
""
type=
"number"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"重量(Kg)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
重量
'
)
}}
</span>
(Kg)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.weight"
:prop=
"$index + '.weight'"
>
<el-input
v-model=
"tableData[$index].weight"
placeholder=
""
type=
"number"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
width=
"130px"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.quantityAll"
:prop=
"$index + '.quantityAll'"
>
<el-input
v-model.number=
"tableData[$index].quantityAll"
placeholder=
""
>
<template
slot=
"append"
>
{{
$t
(
'
个
'
)
}}
</
template
>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column
:label=
"$t('快递单号')"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<el-input
v-model=
"tableData[$index].expressNo"
placeholder=
""
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
width=
"150px"
>
<
template
v-slot=
"{ row, column, $index }"
>
<warehouse-area-select
v-if=
"visible"
v-model=
"tableData[$index].orderLocationBackVOList"
:order-id=
"orderId"
:order-item-id=
"warehousing.orderItemId"
:warehouse-in-id=
"tableData[$index].id"
:warehouse-id=
"warehouseId"
:is-editing=
"edit"
></warehouse-area-select>
</
template
>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
<el-tab-pane
:label=
"$t('添加新品名')"
name=
"second"
v-if=
"!edit"
>
<el-form
ref=
"form1"
:model=
"form1"
:rules=
"formRules"
label-width=
"80px"
>
<el-descriptions
border
:column=
"2"
>
<el-descriptions-item>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
中文品名
'
)
}}
</
template
>
<el-form-item
required
label=
""
prop=
"prodId"
label-width=
"0"
>
<product-selector
v-model=
"form1.prodId"
@
change=
"onProductChange"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
英文品名
'
)
}}
</
template
>
<el-form-item
required
label=
""
prop=
"prodId"
label-width=
"0"
>
<product-selector
lang=
"En"
v-model=
"form1.prodId"
@
change=
"onProductChange"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('品牌')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
品牌
'
)
}}
</
template
>
<el-form-item
required
label=
""
prop=
"brand"
label-width=
"0"
>
<el-select
v-model=
"form1.brand"
:placeholder=
"$t('可修改')"
filterable
remote
@
change=
"handleBrandChange"
:remote-method=
"getProductBrandPage"
clearable
>
<el-option
v-for=
"item in brandList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('是否备案')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
是否备案
'
)
}}
</
template
>
{{ isBeian1 }}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('收费模式')"
>
<
template
slot=
"label"
><span
style=
"color: red"
>
*
</span>
{{
$t
(
'
收费模式
'
)
}}
</
template
>
{{ feeType1 }}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('填单参数')"
>
{{ $t('非填单货物') }}
</el-descriptions-item>
</el-descriptions>
<el-form-item
:label=
"$t('材质')"
style=
"margin-top: 20px"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PRODUCT_MATERIAL"
v-model=
"form1.material"
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('入仓时间')"
>
<el-date-picker
v-model=
"form1.inTime"
type=
"datetime"
:placeholder=
"$t('请选择入仓时间')"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
</el-form>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{ $t('入仓记录') }}
</span>
<el-button
style=
"float: right;margin-left: 15px"
size=
"mini"
type=
"primary"
icon=
"el-icon-minus"
circle
@
click=
"handleDelete(1)"
></el-button>
<el-button
style=
"float: right"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"handleAdd(1)"
></el-button>
</div>
<el-form
ref=
"tableForm1"
:model=
"tableData1"
:rules=
"tableFormRules"
size=
"mini"
>
<el-table
:data=
"tableData1"
style=
"width: 100%"
>
<el-table-column
:label=
"$t('箱数')"
width=
"150px"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
{{
$t
(
'
箱数
'
)
}}
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.cartonsNum"
:prop=
"$index + '.cartonsNum'"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
cartonsNum
}}
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_PACKAGING_TYPE
,
tableData1
[
$index
].
unit
)
}}
</span>
<el-input
v-else
v-model=
"tableData1[$index].cartonsNum"
placeholder=
""
>
<span
slot=
"append"
>
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_PACKAGING_TYPE
,
tableData1
[
$index
].
unit
)
}}
</span>
</el-input>
<dict-selector
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
v-model=
"tableData1[$index].specificationType"
@
change=
"handleVolume($index)"
></dict-selector>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
width=
"100px"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
{{
$t
(
'
包装类型
'
)
}}
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"tableData1[$index].id"
>
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_PACKAGING_TYPE
,
tableData1
[
$index
].
unit
)
}}
</span>
<dict-selector
v-else
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"tableData1[$index].unit"
></dict-selector>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
长
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.boxGauge1"
:prop=
"$index + '.boxGauge1'"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
boxGauge
?
tableData1
[
$index
].
boxGauge
.
split
(
'
*
'
)[
0
]
:
''
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"tableData1[$index].boxGauge1"
placeholder=
""
@
blur=
"handleVolume($index, 1)"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
宽
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.boxGauge2"
:prop=
"$index + '.boxGauge2'"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
boxGauge
?
tableData1
[
$index
].
boxGauge
.
split
(
'
*
'
)[
1
]
:
''
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"tableData1[$index].boxGauge2"
placeholder=
""
@
blur=
"handleVolume($index, 1)"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
高
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.boxGauge3"
:prop=
"$index + '.boxGauge3'"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
boxGauge
?
tableData1
[
$index
].
boxGauge
.
split
(
'
*
'
)[
2
]
:
''
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"tableData1[$index].boxGauge3"
placeholder=
""
@
blur=
"handleVolume($index, 1)"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"体积(m³)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
体积
'
)
}}
</span>
(m³)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.volume"
:prop=
"$index + '.volume'"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
volume
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"tableData1[$index].volume"
placeholder=
""
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"重量(Kg)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
重量
'
)
}}
</span>
(Kg)
</
template
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.weight"
:prop=
"$index + '.weight'"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
weight
}}
</span>
<el-input
v-else
type=
"number"
v-model=
"tableData1[$index].weight"
placeholder=
""
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
width=
"130px"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
:rules=
"tableFormRules.quantityAll"
:prop=
"$index + '.quantityAll'"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
quantityAll
}}
</span>
<el-input
v-else
v-model.number=
"tableData1[$index].quantityAll"
placeholder=
""
>
<template
slot=
"append"
>
{{
$t
(
'
个
'
)
}}
</
template
>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column
:label=
"$t('快递单号')"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
expressNo
}}
</span>
<el-input
v-else
v-model=
"tableData1[$index].expressNo"
placeholder=
""
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
width=
"150px"
>
<
template
v-slot=
"{ row, column, $index }"
>
<warehouse-area-select
v-model=
"tableData1[$index].orderLocationBackVOList"
:readonly=
"tableData1[$index].id && !edit"
:order-id=
"orderId"
:order-item-id=
"warehousing.orderItemId"
:warehouse-in-id=
"tableData1[$index].id"
:warehouse-id=
"warehouseId"
:is-editing=
"edit"
></warehouse-area-select>
</
template
>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
</el-tabs>
<div
v-if=
"edit"
>
<h2>
{{ $t('审批流程') }}
</h2>
<work-flow
xmlkey=
"free_apply"
v-model=
"selectedUsers"
/>
<!-- <div>选择的用户:{{selectedUsers}}</div>-->
</div>
<span
slot=
"footer"
>
<
template
v-if=
"!isEditing"
>
<el-button
@
click=
"opened = false"
>
{{
$t
(
'
关 闭
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit()"
>
{{
edit
?
$t
(
'
确认修改
'
)
:
$t
(
'
提 交
'
)
}}
</el-button>
</
template
>
<
template
v-else
>
<el-button
type=
"primary"
@
click=
"$router.push('/bpm/process-instance/detail?id=' + formId)"
>
{{
$t
(
'
审核中
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleCancelProcessInstance"
>
{{
$t
(
'
取消审核
'
)
}}
</el-button>
<el-button
@
click=
"opened = false"
>
{{
$t
(
'
返回
'
)
}}
</el-button>
</
template
>
<
template
v-else
>
</
template
>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
dictSelector
from
"
@/components/DictSelector
"
import
{
DICT_TYPE
,
getDictDataLabel
,
getDictDatas
}
from
"
@/utils/dict
"
import
{
getWarehouseLastUpdateApprovalInfo
,
orderWarehouseIn
,
orderWarehouseInUpdateApply
}
from
'
@/api/ecw/order
'
import
{
getFeeTypeByOrderProduct
,
getProductBrankPage
}
from
'
@/api/ecw/productBrank
'
import
WorkFlow
from
"
@/components/WorkFlow
"
import
ProductSelector
from
"
@/components/ProductSelector
"
import
{
cancelProcessInstance
}
from
"
@/api/bpm/processInstance
"
import
WarehouseAreaSelect
from
"
@/components/WarehouseAreaSelect
"
export
default
{
name
:
'
editDialog
'
,
components
:
{
dictSelector
,
WorkFlow
,
ProductSelector
,
WarehouseAreaSelect
},
props
:
{
order
:
{
type
:
Object
,
default
:
undefined
},
orderId
:
{
type
:
Number
,
default
:
undefined
},
visible
:
{
type
:
Boolean
,
default
:
false
},
isJiyun
:
{
type
:
Boolean
,
default
:
false
},
// 入仓修改
edit
:
{
type
:
Boolean
,
default
:
false
},
warehousing
:
{
type
:
Object
,
default
:
()
=>
{
return
{
material
:
undefined
,
inTime
:
undefined
,
orderWarehouseInBackItemDoList
:
[]
}
}
}
},
data
()
{
return
{
DICT_TYPE
,
getDictDataLabel
,
getDictDatas
,
opened
:
false
,
brandList
:
[],
formRules
:
{
prodId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请选择品名
"
),
trigger
:
"
change
"
}],
brand
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请选择品牌
"
),
trigger
:
"
change
"
}],
},
form
:
{
"
brand
"
:
""
,
// "brandType": 0,
// "inTime": "",
// "material": "",
// "orderId": 0,
// "orderItemId": 0,
// "orderNo": "",
"
orderWarehouseInItemDoList
"
:
[],
"
prodAttrIds
"
:
""
,
"
prodId
"
:
''
,
// "prodTitleEn": "",
// "prodTitleZh": "",
// "prodType": 0,
// "type": 0,
feeType
:
0
,
recordMode
:
undefined
},
tableFormRules
:
{
cartonsNum
:
[{
required
:
true
,
message
:
this
.
$t
(
"
箱数不能为空
"
),
trigger
:
"
change
"
}],
boxGauge1
:
[{
required
:
true
,
message
:
this
.
$t
(
"
货物长不能为空
"
),
trigger
:
"
change
"
}],
boxGauge2
:
[{
required
:
true
,
message
:
this
.
$t
(
"
货物宽不能为空
"
),
trigger
:
"
change
"
}],
boxGauge3
:
[{
required
:
true
,
message
:
this
.
$t
(
"
货物高不能为空
"
),
trigger
:
"
change
"
}],
volume
:
[{
required
:
true
,
message
:
this
.
$t
(
"
体积不能为空
"
),
trigger
:
"
change
"
}],
weight
:
[{
required
:
true
,
message
:
this
.
$t
(
"
重量不能为空
"
),
trigger
:
"
change
"
}],
// quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}]
},
form1
:
{
"
brand
"
:
undefined
,
"
brandType
"
:
0
,
"
inTime
"
:
""
,
"
material
"
:
""
,
"
orderId
"
:
0
,
"
orderItemId
"
:
0
,
"
orderNo
"
:
""
,
"
orderWarehouseInItemDoList
"
:
[],
"
prodAttrIds
"
:
""
,
"
prodId
"
:
''
,
"
prodTitleEn
"
:
""
,
"
prodTitleZh
"
:
""
,
"
prodType
"
:
0
,
"
type
"
:
1
,
feeType
:
0
,
recordMode
:
undefined
},
// orderItem: {},
selectedUsers
:
undefined
,
activeName
:
'
first
'
,
// 入仓修改正在审核中
isEditing
:
false
,
// 审批业务id
formId
:
''
};
},
watch
:
{
visible
(
val
)
{
if
(
val
)
{
this
.
opened
=
true
if
(
this
.
warehousing
)
{
// this.orderItem = this.warehousing
this
.
inTime
=
this
.
warehousing
.
inTime
if
(
!!
this
.
warehousing
.
brandName
){
this
.
getProductBrandPage
(
this
.
warehousing
.
brandName
)
}
else
{
this
.
getProductBrandPage
()
}
}
}
else
{
}
},
opened
(
val
)
{
if
(
val
)
{
this
.
form1
=
{
"
brand
"
:
undefined
,
"
brandType
"
:
0
,
"
inTime
"
:
""
,
"
material
"
:
""
,
"
orderId
"
:
0
,
"
orderItemId
"
:
0
,
"
orderNo
"
:
""
,
"
orderWarehouseInItemDoList
"
:
[],
"
prodAttrIds
"
:
""
,
"
prodId
"
:
''
,
"
prodTitleEn
"
:
""
,
"
prodTitleZh
"
:
""
,
"
prodType
"
:
0
,
"
type
"
:
1
,
feeType
:
0
,
recordMode
:
undefined
}
this
.
form
.
orderWarehouseInItemDoList
=
[]
this
.
form1
.
orderWarehouseInItemDoList
=
[]
this
.
activeName
=
'
first
'
if
(
!
this
.
edit
){
this
.
handleAdd
()
this
.
handleAdd
(
1
)
}
this
.
form
.
prodId
=
this
.
warehousing
.
prodId
this
.
form
.
material
=
this
.
warehousing
.
material
if
(
this
.
warehousing
.
brand
&&
this
.
warehousing
.
brand
!==
0
){
this
.
form
.
brand
=
this
.
warehousing
.
brand
.
toString
()
||
''
}
else
{
this
.
form
.
brand
=
''
}
this
.
handleBrandChange
(
this
.
form
.
brand
)
getWarehouseLastUpdateApprovalInfo
({
orderItemId
:
this
.
warehousing
.
orderItemId
,
orderId
:
this
.
warehousing
.
orderId
}).
then
(
r
=>
{
if
(
r
.
data
&&
r
.
data
.
status
===
1
&&
r
.
data
.
type
===
1
){
this
.
isEditing
=
true
this
.
formId
=
r
.
data
.
formId
}
})
}
else
{
this
.
$emit
(
'
update:visible
'
,
false
)
}
},
warehousing
(
newVal
,
oldVal
){
if
(
newVal
.
orderItemId
!==
oldVal
.
orderItemId
){
}
}
},
methods
:
{
getProductBrandPage
(
titleZh
=
undefined
)
{
getProductBrankPage
({
pageSize
:
20
,
titleZh
}).
then
(
r
=>
{
this
.
brandList
=
r
.
data
.
list
.
map
(
e
=>
{
if
(
e
.
id
){
e
.
id
=
e
.
id
.
toString
()
}
return
e
})
})
},
handleCancelProcessInstance
(){
this
.
$prompt
(
'
请输入取消原因?
'
,
this
.
$t
(
"
取消流程
"
),
{
type
:
'
warning
'
,
confirmButtonText
:
this
.
$t
(
"
确定
"
),
cancelButtonText
:
this
.
$t
(
"
取消
"
),
inputPattern
:
/^
[\s\S]
*.*
\S[\s\S]
*$/
,
// 判断非空,且非空格
inputErrorMessage
:
this
.
$t
(
"
取消原因不能为空
"
),
}).
then
(({
value
})
=>
{
cancelProcessInstance
(
this
.
formId
,
value
).
then
(()
=>
{
this
.
opened
=
false
this
.
$modal
.
msgSuccess
(
"
取消成功
"
);
})
})
},
onProductChange
(
product
){
this
.
form1
.
prodTitleZh
=
product
.
titleZh
this
.
form1
.
prodTitleEn
=
product
.
titleEn
},
onProductChange0
(
product
){
this
.
form
.
prodTitleZh
=
product
.
titleZh
this
.
form
.
prodTitleEn
=
product
.
titleEn
this
.
handleBrandChange
(
parseInt
(
this
.
form
.
brand
))
},
handleTabs
(){
if
(
this
.
activeName
===
'
first
'
){
this
.
getProductBrandPage
(
this
.
warehousing
.
brandName
)
}
else
{
this
.
getProductBrandPage
()
}
},
handleBrandChange
(
v
){
getFeeTypeByOrderProduct
({
brandId
:
parseInt
(
v
),
productId
:
this
.
warehousing
.
prodId
,
orderId
:
this
.
orderId
}).
then
(
r
=>
{
if
(
r
.
code
===
0
){
(
this
.
activeName
===
"
first
"
?
this
.
form
:
this
.
form1
).
feeType
=
parseInt
(
r
.
data
.
feeType
);
(
this
.
activeName
===
"
first
"
?
this
.
form
:
this
.
form1
).
recordMode
=
parseInt
(
r
.
data
.
recordMode
)
}
})
},
handleVolume
(
index
,
val
){
setTimeout
(()
=>
{
const
{
boxGauge1
,
boxGauge2
,
boxGauge3
,
specificationType
,
cartonsNum
}
=
(
val
===
1
?
this
.
tableData1
:
this
.
tableData
)[
index
]
let
result
=
''
if
(
boxGauge1
&&
boxGauge2
&&
boxGauge3
&&
specificationType
&&
cartonsNum
)
{
result
=
(((
specificationType
===
1
||
specificationType
===
'
1
'
)
?
cartonsNum
:
1
)
*
(
boxGauge1
*
boxGauge2
*
boxGauge3
)
/
1000000
)?.
toFixed
(
2
)
||
''
}
else
{
result
=
''
}
if
(
result
===
'
0.00
'
)
result
=
'
0.01
'
;
(
val
===
1
?
this
.
tableData1
:
this
.
tableData
)[
index
].
volume
=
result
},
0
)
},
handleSubmit
()
{
// const orderWarehouseInItemDoList = [
// ...this.warehousing.orderWarehouseInBackItemDoList,
// ...this.form.orderWarehouseInItemDoList.map(e => {
// return {
// ...e,
// boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
// orderLocationCreateReqVOList: e.orderLocationBackVOList
// }
// })
// ]
if
(
this
.
activeName
!==
"
first
"
){
// 添加非填单货物
this
.
$refs
[
'
form1
'
].
validate
(
valid
=>
{
this
.
$refs
[
'
tableForm1
'
].
validate
(
valid1
=>
{
if
(
!
valid
||
!
valid1
)
{
return
}
return
orderWarehouseIn
({
...
this
.
form1
,
brandType
:
this
.
warehousing
.
brandType
,
orderId
:
this
.
warehousing
.
orderId
,
orderItemId
:
undefined
,
orderNo
:
this
.
warehousing
.
orderNo
,
orderWarehouseInItemDoList
:
this
.
form1
.
orderWarehouseInItemDoList
.
map
(
e
=>
{
return
{
...
e
,
boxGauge
:
e
.
boxGauge1
+
'
*
'
+
e
.
boxGauge2
+
'
*
'
+
e
.
boxGauge3
,
orderLocationCreateReqVOList
:
e
.
orderLocationBackVOList
}
})
}).
then
(
r
=>
{
if
(
r
.
data
)
{
this
.
$message
.
success
(
'
新增入仓成功
'
)
this
.
handleClose
()
}
else
{
this
.
$message
.
success
(
'
新增入仓失败
'
)
}
})
})
})
}
else
{
this
.
$refs
[
'
form
'
].
validate
(
valid
=>
{
this
.
$refs
[
'
tableForm
'
].
validate
(
valid1
=>
{
if
(
!
valid
||
!
valid1
)
{
return
}
if
(
this
.
edit
)
{
// 入仓修改
return
orderWarehouseInUpdateApply
({
...
this
.
form
,
brandType
:
this
.
warehousing
.
brandType
,
orderId
:
this
.
warehousing
.
orderId
,
orderItemId
:
this
.
warehousing
.
orderItemId
,
orderNo
:
this
.
warehousing
.
orderNo
,
num
:
this
.
warehousing
.
num
,
volume
:
(
+
this
.
warehousing
.
volume
)?.
toFixed
(
2
)
||
''
,
weight
:
(
+
this
.
warehousing
.
weight
)?.
toFixed
(
2
)
||
''
,
prodId
:
this
.
form
.
prodId
,
"
orderWarehouseInUpdateItemDoList
"
:
this
.
tableData
.
map
(
e
=>
{
return
{
...
e
,
boxGauge
:
e
.
boxGauge1
+
'
*
'
+
e
.
boxGauge2
+
'
*
'
+
e
.
boxGauge3
,
orderLocationCreateReqVOList
:
e
.
orderLocationBackVOList
}
}),
copyUserId
:
this
.
selectedUsers
}).
then
(
r
=>
{
if
(
r
.
data
)
{
this
.
$message
.
success
(
'
入仓修改发起成功
'
)
this
.
handleClose
()
}
else
{
this
.
$message
.
success
(
'
入仓修改发起失败
'
)
}
})
}
else
{
// 首次入仓、入仓补充
return
orderWarehouseIn
({
...
this
.
form
,
brandType
:
this
.
warehousing
.
brandType
,
orderId
:
this
.
warehousing
.
orderId
,
orderItemId
:
this
.
warehousing
.
orderItemId
,
orderNo
:
this
.
warehousing
.
orderNo
,
orderWarehouseInItemDoList
:
this
.
tableData
.
map
(
e
=>
{
return
{
...
e
,
boxGauge
:
e
.
boxGauge1
+
'
*
'
+
e
.
boxGauge2
+
'
*
'
+
e
.
boxGauge3
,
orderLocationCreateReqVOList
:
e
.
orderLocationBackVOList
}
}),
}).
then
(
r
=>
{
if
(
r
.
data
)
{
this
.
$message
.
success
(
'
入仓成功
'
)
this
.
handleClose
()
}
else
{
this
.
$message
.
success
(
'
入仓失败
'
)
}
})
}
})
})
}
},
handleClose
()
{
this
.
form
.
orderWarehouseInItemDoList
=
[]
this
.
opened
=
false
},
handleDelete
(
val
)
{
(
val
===
1
?
this
.
form1
:
this
.
form
).
orderWarehouseInItemDoList
.
pop
()
},
handleAdd
(
val
=
0
)
{
let
cartonsNum
=
''
let
orderLocationBackVOList
=
[]
if
(
val
!==
1
)
{
// 货物入仓
let
hasCartonsNum
=
0
this
.
tableData
.
forEach
(
e
=>
{
hasCartonsNum
+=
e
.
cartonsNum
})
cartonsNum
=
this
.
warehousing
.
num
-
hasCartonsNum
// orderLocationBackVOList = this.tableData.length
// ? this.tableData[this.tableData.length - 1].orderLocationBackVOList
// : []
}
else
{
// 添加新品名
// orderLocationBackVOList = this.tableData1.length
// ? this.tableData1[this.tableData1.length - 1].orderLocationBackVOList
// : []
}
const
form
=
val
===
1
?
this
.
form1
:
this
.
form
form
.
orderWarehouseInItemDoList
.
push
({
"
boxGauge1
"
:
this
.
isJiyun
?
0
:
''
,
"
boxGauge2
"
:
this
.
isJiyun
?
0
:
''
,
"
boxGauge3
"
:
this
.
isJiyun
?
0
:
''
,
"
cartonsNum
"
:
cartonsNum
>
0
?
cartonsNum
:
''
,
"
expressNo
"
:
""
,
"
quantityAll
"
:
undefined
,
"
unit
"
:
"
1
"
,
"
volume
"
:
''
,
"
weight
"
:
''
,
specificationType
:
'
1
'
,
orderLocationBackVOList
})
}
},
computed
:
{
title
()
{
return
this
.
$i18n
.
locale
===
'
en_US
'
?
this
.
$route
.
meta
.
titleEn
:
this
.
$route
.
name
},
brandObject
(){
return
this
.
brandList
.
find
(
e
=>
e
.
id
===
this
.
form
.
brand
)
||
''
},
brandObject1
(){
return
this
.
brandList
.
find
(
e
=>
e
.
id
===
this
.
form1
.
brand
)
||
''
},
tableData
()
{
// if (!this.edit){
// return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList]
// }
// 入仓修改的时候
this
.
form
.
orderWarehouseInItemDoList
=
this
.
warehousing
.
orderWarehouseInBackItemDoList
return
this
.
form
.
orderWarehouseInItemDoList
.
map
(
e
=>
{
const
boxGauge
=
e
.
boxGauge
if
(
boxGauge
&&
boxGauge
.
length
>
0
)
{
const
boxGaugeList
=
boxGauge
.
split
(
'
*
'
)
const
[
boxGauge1
,
boxGauge2
,
boxGauge3
]
=
boxGaugeList
return
{...
e
,
boxGauge1
,
boxGauge2
,
boxGauge3
}
}
return
{...
e
,
boxGauge1
:
this
.
isJiyun
?
0
:
''
,
boxGauge2
:
this
.
isJiyun
?
0
:
''
,
boxGauge3
:
this
.
isJiyun
?
0
:
''
}
})
},
tableData1
()
{
return
this
.
form1
.
orderWarehouseInItemDoList
},
isBeian
(){
if
(
this
.
form
.
recordMode
!==
undefined
){
return
[
this
.
$t
(
'
无备案
'
),
this
.
$t
(
'
有备案
'
),
this
.
$t
(
'
中性
'
)][
this
.
form
.
recordMode
]
}
if
(
this
.
brandObject
.
filing
){
return
[
this
.
$t
(
'
无备案
'
),
this
.
$t
(
'
有备案
'
),
this
.
$t
(
'
中性
'
)][
this
.
brandObject
.
filing
]
}
else
{
return
''
}
},
isBeian1
(){
if
(
this
.
form1
.
recordMode
!==
undefined
){
return
[
this
.
$t
(
'
无备案
'
),
this
.
$t
(
'
有备案
'
),
this
.
$t
(
'
中性
'
)][
this
.
form1
.
recordMode
]
}
if
(
this
.
brandObject1
.
filing
){
return
[
this
.
$t
(
'
无备案
'
),
this
.
$t
(
'
有备案
'
),
this
.
$t
(
'
中性
'
)][
this
.
brandObject1
.
filing
]
}
else
{
return
''
}
},
/**
* 收费模式
* @returns {string} 无牌价0,有牌价1,中性品牌价2
*/
feeType
(){
const
feeType
=
parseInt
(
this
.
form
.
feeType
)
if
(
feeType
>=
0
&&
feeType
<
3
)
{
return
[
this
.
$t
(
'
无牌价
'
),
this
.
$t
(
'
有牌价
'
),
this
.
$t
(
'
中性品牌价
'
)][
feeType
]
}
return
''
},
feeType1
(){
const
feeType
=
parseInt
(
this
.
form1
.
feeType
)
if
(
feeType
>=
0
&&
feeType
<
3
)
{
return
[
this
.
$t
(
'
无牌价
'
),
this
.
$t
(
'
有牌价
'
),
this
.
$t
(
'
中性品牌价
'
)][
feeType
]
}
return
''
},
brand
(){
if
(
!!
this
.
form
.
brand
){
const
brand
=
this
.
brandList
.
find
(
e
=>
e
.
id
===
this
.
form
.
brand
)
if
(
brand
)
{
return
brand
.
titleZh
}
}
return
''
},
warehouseId
(){
return
this
.
order
?.
logisticsInfoDto
?.
startWarehouseId
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
::v-deep
.el-table__cell
{
padding-bottom
:
0
;
.cell
{
.el-form-item
{
margin-bottom
:
16px
;
}
.el-form-item__error
{
z-index
:
1
;
padding-top
:
0
;
top
:
32px
;
}
}
}
</
style
>
src/views/ecw/order/warehousing/index.vue
View file @
cc3130cc
...
...
@@ -90,7 +90,6 @@
:title=
"$t('修改')"
:order=
"order"
@
close=
"getList"
></warehouse>
<!--
<el-button
v-if=
"isEdit"
size=
"mini"
type=
"text"
@
click=
"handleWarehousing(row)"
>
{{
$t
(
'
修改
'
)
}}
</el-button>
-->
<template
v-else-if=
"
wareItem(row.orderItemId)
&& wareItem(row.orderItemId).orderWarehouseInBackItemDoList
...
...
@@ -103,7 +102,6 @@
:title=
"$t('追加')"
:order=
"order"
@
close=
"getList"
></warehouse>
<!--
<el-button
size=
"mini"
type=
"text"
@
click=
"handleWarehousing(row)"
>
{{
$t
(
'
追加
'
)
}}
</el-button>
-->
<el-button
size=
"mini"
type=
"text"
@
click=
"handleWarehousingReturn(row)"
>
{{
$t
(
'
退仓
'
)
}}
</el-button>
<!--
</
template
>
-->
</template>
...
...
@@ -114,7 +112,6 @@
:title=
"$t('入仓')"
:order=
"order"
@
close=
"getList"
></warehouse>
<!-- <el-button v-else size="mini" type="text" @click="handleWarehousing(row)">{{$t('入仓')}}</el-button>-->
</template>
</el-table-column>
</el-table>
...
...
@@ -179,8 +176,6 @@
<warehouse-area-dialog
ref=
"area"
:visible.sync=
"areaVisible"
v-model=
"form.orderLocationCreateReqVOList"
:order-id=
"orderId"
:warehouse-id=
"warehouseId"
:is-editing=
"isEdit"
></warehouse-area-dialog>
<edit-dialog
:order=
"order"
:title=
"title"
:order-id=
"order.orderId"
:visible.sync=
"warehousingVisible"
:warehousing=
"warehousing"
:edit=
"isEdit"
:is-jiyun=
"order.type === 1 || order.type === '1'"
></edit-dialog>
<!-- 完成入仓 -->
<el-dialog
:title=
"$t('确认入仓')"
...
...
@@ -231,7 +226,6 @@ import {
}
from
'
@/api/ecw/order
'
import
orderBaseInfo
from
"
@/components/OrderBaseInfo
"
import
WarehouseAreaDialog
from
'
@/components/WarehouseAreaDialog
'
import
editDialog
from
'
@/views/ecw/order/warehousing/components/editDialog
'
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
import
PrintTag
from
"
@/views/ecw/order/components/PrintTag
"
import
PrintWarehouseReceipt
from
"
@/views/ecw/order/components/PrintWarehouseReceipt
"
...
...
@@ -245,7 +239,6 @@ export default {
components
:
{
orderBaseInfo
,
WarehouseAreaDialog
,
editDialog
,
PrintTag
,
PrintWarehouseReceipt
,
imageUpload
,
...
...
@@ -477,11 +470,6 @@ export default {
}
})
},
handleWarehousing
(
row
)
{
let
wareItem
=
this
.
orderItemList
.
find
(
item
=>
item
.
orderItemId
==
row
.
orderItemId
)
||
{}
this
.
warehousing
=
{...
row
,
...
wareItem
}
this
.
warehousingVisible
=
true
},
handleWarehousingReturn
(
item
){
this
.
$confirm
(
item
.
prodTitleZh
+
this
.
$t
(
'
退仓后不可恢复,是否确认退仓?
'
),
this
.
$t
(
'
确定要退仓?
'
),
{
confirmButtonText
:
this
.
$t
(
'
确定
'
),
...
...
@@ -507,12 +495,6 @@ export default {
},
watch
:
{
warehousingVisible
(
val
)
{
if
(
!
val
){
this
.
getOrder
()
this
.
getOrderItemList
()
}
},
orderSpecialNeeds
(
val
){
val
.
forEach
(
e
=>
{
this
.
form
.
orderSpecialNeedReceivableReqVoList
.
push
({
...
...
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