Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
ecouniversal
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Babin Egor
ecouniversal
Commits
6e276fdd
Commit
6e276fdd
authored
Feb 18, 2020
by
Babin Egor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade form
parent
0d41a138
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
app-registration-form.js
src/blocks/app-registration-form/app-registration-form.js
+19
-11
index.pug
src/pages/index.pug
+1
-1
No files found.
src/blocks/app-registration-form/app-registration-form.js
View file @
6e276fdd
...
@@ -247,7 +247,7 @@ Vue.component('app-registration-form', {
...
@@ -247,7 +247,7 @@ Vue.component('app-registration-form', {
(
this
.
valdateName
(
this
.
fieldsVal
.
juridical
.
companyTrans
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
juridical
.
companyTrans
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
juridical
.
companyGovNum
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
juridical
.
companyGovNum
))
&&
(
this
.
localRecord
.
wAddress
.
region
.
name
!==
''
)
&&
(
this
.
localRecord
.
wAddress
.
region
.
name
!==
''
)
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
juridical
.
companyTransportCostPerKm
)
)
(
this
.
fieldsVal
.
juridical
.
companyTransportCostPerKm
!==
''
)
)
{
)
{
return
true
;
return
true
;
}
}
...
@@ -268,8 +268,7 @@ Vue.component('app-registration-form', {
...
@@ -268,8 +268,7 @@ Vue.component('app-registration-form', {
(
this
.
valdatePassNum
(
this
.
fieldsVal
.
natural
.
personPassportNumber
))
&&
(
this
.
valdatePassNum
(
this
.
fieldsVal
.
natural
.
personPassportNumber
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personPassportIssuedBy
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personPassportIssuedBy
))
&&
(
this
.
valdatePassDate
(
this
.
fieldsVal
.
natural
.
personPassportIssuedDate
))
&&
(
this
.
valdatePassDate
(
this
.
fieldsVal
.
natural
.
personPassportIssuedDate
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personPassportDepartmentCode
))
||
1
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personPassportDepartmentCode
))
)
{
)
{
if
(
this
.
personRegType
!==
"executor"
)
{
if
(
this
.
personRegType
!==
"executor"
)
{
if
(
if
(
...
@@ -284,7 +283,7 @@ Vue.component('app-registration-form', {
...
@@ -284,7 +283,7 @@ Vue.component('app-registration-form', {
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personTrans
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personTrans
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personGovNum
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personGovNum
))
&&
(
this
.
localRecord
.
wAddress
.
region
.
name
!==
''
)
&&
(
this
.
localRecord
.
wAddress
.
region
.
name
!==
''
)
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personTransportCostPerKm
))
//&&
(
this
.
fieldsVal
.
natural
.
personTransportCostPerKm
!=
''
)
//(this.wUnitAmounts != [{}])
//(this.wUnitAmounts != [{}])
)
{
)
{
return
true
;
return
true
;
...
@@ -316,7 +315,7 @@ Vue.component('app-registration-form', {
...
@@ -316,7 +315,7 @@ Vue.component('app-registration-form', {
this
.
localRecord
.
wGroup
=
e
;
this
.
localRecord
.
wGroup
=
e
;
this
.
transportUnitsLoad
();
this
.
transportUnitsLoad
();
},
},
addUnit
(
index
){
addUnit
(){
//alert(this.wUnitsSelect.options.length);
//alert(this.wUnitsSelect.options.length);
this
.
wUnitAmounts
.
push
({});
this
.
wUnitAmounts
.
push
({});
},
},
...
@@ -326,10 +325,10 @@ Vue.component('app-registration-form', {
...
@@ -326,10 +325,10 @@ Vue.component('app-registration-form', {
//alert(JSON.stringify(e));
//alert(JSON.stringify(e));
},
},
transportGroupUrl
(){
transportGroupUrl
(){
return
'
https://r52.ru
/api/transport/getTypes/'
;
return
'/api/transport/getTypes/'
;
},
},
transportUnitsUrl
(
id
){
transportUnitsUrl
(
id
){
return
'
https://r52.ru
/api/transport/getUnits/'
+
id
;
return
'/api/transport/getUnits/'
+
id
;
},
},
transportGroupLoad
(){
transportGroupLoad
(){
axios
axios
...
@@ -440,6 +439,7 @@ Vue.component('app-registration-form', {
...
@@ -440,6 +439,7 @@ Vue.component('app-registration-form', {
url
:
"form.php"
,
url
:
"form.php"
,
data
:
{
data
:
{
"date"
:
post_data
,
"date"
:
post_data
,
"record"
:
this
.
localRecord
},
},
dataType
:
"html"
,
dataType
:
"html"
,
type
:
"post"
,
type
:
"post"
,
...
@@ -448,7 +448,15 @@ Vue.component('app-registration-form', {
...
@@ -448,7 +448,15 @@ Vue.component('app-registration-form', {
data
=
JSON
.
parse
(
data
);
data
=
JSON
.
parse
(
data
);
if
(
data
.
success
)
{
if
(
data
.
success
)
{
if
(
this
.
personRegType
==
"executor"
)
{
window
.
location
.
href
=
"/executor/"
+
data
.
ID
+
'/'
;
}
else
if
(
this
.
personRegType
==
"customer"
)
{
window
.
location
.
href
=
"/customers/"
+
data
.
ID
+
'/'
;
window
.
location
.
href
=
"/customers/"
+
data
.
ID
+
'/'
;
}
else
if
(
this
.
personRegType
==
"neworder"
)
{
window
.
location
.
href
=
"/orders/"
+
data
.
ID
+
'/'
;
}
else
{
window
.
location
.
href
=
"/orders/"
;
}
}
else
{
}
else
{
alert
=
'<div class=
\'
row wrap_alert_error
\'
>'
+
alert
=
'<div class=
\'
row wrap_alert_error
\'
>'
+
'<div class=
\'
offset-lg-1 col-lg-10 offset-xl-2 col-xl-8
\'
>'
+
'<div class=
\'
offset-lg-1 col-lg-10 offset-xl-2 col-xl-8
\'
>'
+
...
@@ -725,7 +733,7 @@ Vue.component('app-registration-form', {
...
@@ -725,7 +733,7 @@ Vue.component('app-registration-form', {
valdateName
(
name
)
{
valdateName
(
name
)
{
name
=
name
.
replace
(
/
[^
a-zA-Z0-9
]
/g
,
''
)
name
=
name
.
replace
(
/
[^
a-zA-Z
а-яА-Я
0-9
]
/g
,
''
)
if
(
name
.
length
>=
2
)
{
if
(
name
.
length
>=
2
)
{
return
true
;
return
true
;
}
}
...
@@ -739,7 +747,6 @@ Vue.component('app-registration-form', {
...
@@ -739,7 +747,6 @@ Vue.component('app-registration-form', {
return
valid
;
return
valid
;
},
},
valdatePhone
(
phone
)
{
valdatePhone
(
phone
)
{
var
re
=
/^
\d[\d\(\)\
-
]{7,14}\d
$/
;
var
re
=
/^
\d[\d\(\)\
-
]{7,14}\d
$/
;
var
valid
=
re
.
test
(
phone
);
var
valid
=
re
.
test
(
phone
);
...
@@ -1139,6 +1146,7 @@ Vue.component('app-registration-form', {
...
@@ -1139,6 +1146,7 @@ Vue.component('app-registration-form', {
<span class="field-text__input-wrap">
<span class="field-text__input-wrap">
<input type="text"
<input type="text"
placeholder="Контактный телефон"
placeholder="Контактный телефон"
v-mask="'##/##/####'"
class="field-text__input"
class="field-text__input"
v-model="fieldsVal.juridical.companyContactPhone"
v-model="fieldsVal.juridical.companyContactPhone"
>
>
...
...
src/pages/index.pug
View file @
6e276fdd
...
@@ -20,7 +20,7 @@ block page
...
@@ -20,7 +20,7 @@ block page
h1.title!=title
h1.title!=title
app-registration(:reg_info_from="'
neworde
r'")
app-registration(:reg_info_from="'
executo
r'")
br
br
br
br
...
...
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