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
bfb2e374
Commit
bfb2e374
authored
May 23, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善新建订单后重置数据
parent
17a9efc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
+20
-17
index.vue
src/components/AreaCodeSelector/index.vue
+2
-2
edit.vue
src/views/ecw/order/edit.vue
+18
-15
No files found.
src/components/AreaCodeSelector/index.vue
View file @
bfb2e374
...
...
@@ -21,7 +21,7 @@ export default {
this
.
$emit
(
'
input
'
,
this
.
valueSync
.
replace
(
'
+
'
,
''
))
},
value
(){
if
(
this
.
value
)
this
.
valueSync
=
this
.
value
this
.
valueSync
=
this
.
value
}
},
created
(){
...
...
@@ -39,4 +39,4 @@ export default {
}
}
</
script
>
\ No newline at end of file
</
script
>
src/views/ecw/order/edit.vue
View file @
bfb2e374
...
...
@@ -552,7 +552,19 @@ import WorkFlow from '@/components/WorkFlow'
import
{
getCustomer
}
from
"
@/api/ecw/customer
"
;
// 缓存默认的表单数据
let
defaultFormData
=
null
let
makeDefaultFormData
=
()
=>
{
return
{
status
:
0
,
sendstatus
:
0
,
isCargoControl
:
false
,
isCollection
:
false
,
type
:[],
isExternalWarehouse
:
false
,
externalWarehouseDtoList
:[],
orderItemVOList
:[],
drawee
:
2
}
}
window
.
Decimal
=
Decimal
export
default
{
...
...
@@ -592,17 +604,7 @@ export default {
couponTypeList
:
[],
fee
:
{},
// 费用
// 表单参数
form
:
{
status
:
0
,
sendstatus
:
0
,
isCargoControl
:
false
,
isCollection
:
false
,
type
:[],
isExternalWarehouse
:
false
,
externalWarehouseDtoList
:[],
orderItemVOList
:[],
drawee
:
2
},
form
:
makeDefaultFormData
(),
ccIdArr
:
[],
// 表单校验
labelStyle
:
'
width:120px
'
,
...
...
@@ -888,7 +890,6 @@ export default {
}
},
async
created
()
{
defaultFormData
=
Object
.
assign
({},
this
.
form
)
this
.
productAttrList
=
(
await
getProductAttrList
()).
data
this
.
channelList
=
(
await
getChannelList
()).
data
...
...
@@ -1056,7 +1057,7 @@ export default {
// 检查正整数
checkPositiveInterge
(
row
,
field
){
console
.
log
(
'
checkPositiveInterge
'
,
field
,
row
[
field
])
row
[
field
]
=
row
[
field
].
replace
(
/
[^\d]
/g
,
''
)
row
[
field
]
=
row
[
field
].
toString
().
replace
(
/
[^\d]
/g
,
''
)
},
onProductChange
(
row
,
product
){
console
.
log
(
product
)
...
...
@@ -1194,7 +1195,9 @@ export default {
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
));
// 重置数据
this
.
form
=
{...
defaultFormData
}
this
.
form
=
{...
makeDefaultFormData
()}
this
.
routerList
=
[]
this
.
addProduct
()
this
.
$nextTick
(()
=>
{
this
.
$refs
.
form
.
clearValidate
()
this
.
$redirect
(
'
success?orderId=
'
+
response
.
data
)
...
...
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