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
c0f187f8
Commit
c0f187f8
authored
Aug 27, 2024
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
无收货人的发货人默认控货
parent
aef45d70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
edit.vue
src/views/ecw/order/edit.vue
+21
-10
No files found.
src/views/ecw/order/edit.vue
View file @
c0f187f8
...
...
@@ -775,22 +775,22 @@ export default {
},
computed
:{
rules
(){
return
{
const
rules
=
{
marks
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
请填写唛头
'
)},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
/* 20240823 新需求:唛头数据校验修改成字母+数字组合,去掉原必须字母开头的限制
if(!/[a-zA-Z]/.test(value.charAt(0))){
return callback(new Error(this.$t('唛头必须以字母开头')))
} */
// 必须是字母和数字
let
reg
=
/^
[
a-zA-Z0-9
]
*$/
;
if
(
!
reg
.
test
(
value
))
{
return
callback
(
new
Error
(
this
.
$t
(
'
唛头只能是字母和数字
'
)));
}
callback
()
},
trigger
:
'
blur
'
}
],
consignorContactsId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
发货人不能为空
'
)}],
consigneeContactsId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
收货人不能为空
'
)}],
transportId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择运输方式
'
)}],
departureId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择始发城市
'
)}],
objectiveId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择目的城市
'
)}],
...
...
@@ -806,6 +806,11 @@ export default {
warehouseType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择入仓类型
'
)}],
harvestMethod
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择收货方式
'
)}]
}
// 有收货人则添加收货人校验
if
(
this
.
hasConsignee
){
rules
.
consigneeContactsId
=
[{
required
:
true
,
message
:
this
.
$t
(
'
收货人不能为空
'
)}]
}
return
rules
},
// 是否已完成入仓
inWarehouse
(){
...
...
@@ -1342,12 +1347,18 @@ export default {
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
Name
'
,
contact
.
contactsName
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
NameEn
'
,
contact
.
contactsNameEn
||
''
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
Phone
'
,
contact
.
phoneNew
)
this
.
noConsignee
=
contact
.
noConsignee
if
(
this
.
contactChooseType
==
'
consignor
'
){
this
.
noConsignee
=
contact
.
noConsignee
// 如果允许无收货人,则默认无收货人、控货
if
(
this
.
noConsignee
){
this
.
hasConsignee
=
false
}
// 如果发货人不允许无收货人,则重置为有收货人
if
(
!
this
.
noConsignee
&&
!
this
.
hasConsignee
){
this
.
$set
(
this
,
'
hasConsignee
'
,
true
)
}
}
this
.
contactChooseType
=
null
this
.
quickCreateType
=
null
...
...
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