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
0d41a138
Commit
0d41a138
authored
Feb 13, 2020
by
Babin Egor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update form
parent
86ea9230
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
29 deletions
+75
-29
app-registration-form.js
src/blocks/app-registration-form/app-registration-form.js
+71
-28
app-waste-utilisation-order-form.js
...tilisation-order-form/app-waste-utilisation-order-form.js
+3
-0
index.pug
src/pages/index.pug
+1
-1
No files found.
src/blocks/app-registration-form/app-registration-form.js
View file @
0d41a138
...
...
@@ -31,7 +31,7 @@ Vue.component('app-registration-form', {
settings
:
{
searchEnabled
:
true
,
shouldSort
:
false
,
noChoicesText
:
'Пусто'
,
noChoicesText
:
'Пусто'
,
noResultsText
:
'Ничего не найдено'
,
},
helptext
:
''
...
...
@@ -86,6 +86,10 @@ Vue.component('app-registration-form', {
companyAuthLogin
:
''
,
companyAuthPass
:
''
,
companyAuthPassRepeat
:
''
,
companyTrans
:
''
,
companyGovNum
:
''
,
companyTransportCostPerKm
:
''
,
},
natural
:
{
personInfoLastname
:
''
,
...
...
@@ -111,6 +115,10 @@ Vue.component('app-registration-form', {
personAuthLogin
:
''
,
personAuthPass
:
''
,
personAuthPassRepeat
:
''
,
personTrans
:
''
,
personGovNum
:
''
,
personTransportCostPerKm
:
''
,
}
},
currentPT
:
this
.
personType
,
//текущий тип клиента
...
...
@@ -182,7 +190,7 @@ Vue.component('app-registration-form', {
return
false
;
}
}
}
}
else
if
(
this
.
currentPT
==
"natural"
)
{
if
(
this
.
currentStage
==
0
)
{
...
...
@@ -225,13 +233,25 @@ Vue.component('app-registration-form', {
(
this
.
valdateName
(
this
.
fieldsVal
.
juridical
.
companyContactLastName
))
&&
(
this
.
valdateMail
(
this
.
fieldsVal
.
juridical
.
companyContactEmail
))
&&
(
this
.
valdatePhone
(
this
.
fieldsVal
.
juridical
.
companyContactPhone
))
&&
(
this
.
valdateLogin
(
this
.
fieldsVal
.
juridical
.
companyAuthLogin
))
&&
(
this
.
valdatePass
(
this
.
fieldsVal
.
juridical
.
companyAuthPass
,
this
.
fieldsVal
.
juridical
.
companyAuthPassRepeat
))
(
this
.
valdatePhone
(
this
.
fieldsVal
.
juridical
.
companyContactPhone
))
)
{
return
true
;
if
(
this
.
personRegType
!==
"executor"
)
{
if
(
(
this
.
valdateLogin
(
this
.
fieldsVal
.
juridical
.
companyAuthLogin
))
&&
(
this
.
valdatePass
(
this
.
fieldsVal
.
juridical
.
companyAuthPass
,
this
.
fieldsVal
.
juridical
.
companyAuthPassRepeat
)))
{
return
true
;
}
}
else
{
if
(
(
this
.
valdateName
(
this
.
fieldsVal
.
juridical
.
companyTrans
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
juridical
.
companyGovNum
))
&&
(
this
.
localRecord
.
wAddress
.
region
.
name
!==
''
)
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
juridical
.
companyTransportCostPerKm
))
)
{
return
true
;
}
}
}
}
else
if
(
this
.
currentPT
==
"natural"
)
{
...
...
@@ -248,13 +268,28 @@ Vue.component('app-registration-form', {
(
this
.
valdatePassNum
(
this
.
fieldsVal
.
natural
.
personPassportNumber
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personPassportIssuedBy
))
&&
(
this
.
valdatePassDate
(
this
.
fieldsVal
.
natural
.
personPassportIssuedDate
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personPassportDepartmentCode
))
&&
(
this
.
valdateLogin
(
this
.
fieldsVal
.
natural
.
personAuthLogin
))
&&
(
this
.
valdatePass
(
this
.
fieldsVal
.
natural
.
personAuthPass
,
this
.
fieldsVal
.
natural
.
personAuthPassRepeat
))
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personPassportDepartmentCode
))
||
1
)
{
return
true
;
if
(
this
.
personRegType
!==
"executor"
)
{
if
(
(
this
.
valdateLogin
(
this
.
fieldsVal
.
natural
.
personAuthLogin
))
&&
(
this
.
valdatePass
(
this
.
fieldsVal
.
natural
.
personAuthPass
,
this
.
fieldsVal
.
natural
.
personAuthPassRepeat
))
)
{
return
true
;
}
}
else
{
if
(
//(this.localRecord.wGroup != {}) &&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personTrans
))
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personGovNum
))
&&
(
this
.
localRecord
.
wAddress
.
region
.
name
!==
''
)
&&
(
this
.
valdateName
(
this
.
fieldsVal
.
natural
.
personTransportCostPerKm
))
//&&
//(this.wUnitAmounts != [{}])
)
{
return
true
;
}
}
}
}
...
...
@@ -282,10 +317,10 @@ Vue.component('app-registration-form', {
this
.
transportUnitsLoad
();
},
addUnit
(
index
){
alert
(
this
.
wUnitsSelect
.
options
.
length
);
//
alert(this.wUnitsSelect.options.length);
this
.
wUnitAmounts
.
push
({});
},
test3
(
index
,
e
){
add
С
apacity
(
index
,
e
){
this
.
wUnitAmounts
[
index
].
value
=
e
.
value
;
this
.
wUnitAmounts
[
index
].
label
=
e
.
caption
;
//alert(JSON.stringify(e));
...
...
@@ -309,7 +344,7 @@ Vue.component('app-registration-form', {
},
transportUnitsLoad
(){
axios
.
get
(
this
.
transportUnitsUrl
())
.
get
(
this
.
transportUnitsUrl
(
this
.
localRecord
.
wGroup
.
value
))
.
then
(
response
=>
response
.
data
)
.
then
(
options
=>
{
this
.
$set
(
this
.
wUnitsSelect
,
'options'
,
options
);
...
...
@@ -371,6 +406,8 @@ Vue.component('app-registration-form', {
return
"Добавить заказчика"
}
else
if
(
this
.
personRegTypeProp
==
"executor"
)
{
return
"Добавить исполнителя"
}
else
if
(
this
.
personRegTypeProp
==
"neworder"
)
{
return
"Оформить заказ"
}
},
...
...
@@ -396,11 +433,13 @@ Vue.component('app-registration-form', {
},
sendform
()
{
let
post_data
=
this
.
fieldsVal
[
this
.
currentPT
];
if
(
this
.
formFilledRight
)
{
$
.
ajax
({
url
:
"form.php"
,
data
:
{
"date"
:
this
.
fieldsVal
[
this
.
currentPT
]
,
"date"
:
post_data
,
},
dataType
:
"html"
,
type
:
"post"
,
...
...
@@ -775,10 +814,14 @@ Vue.component('app-registration-form', {
<!-- Debug --->
<!--
<div style="display: block; position: fixed; right: 0;top: 0%; background-color:#fff; z-index:1000; width: 300px; padding: 10px; border: 1px solid #999;">
{{ buttonRegTxt }}
<pre>
{{ fieldsVal[currentPT] }}
</pre>
</div>
-->
<!-- end Debug --->
<!-- Stages -->
...
...
@@ -1140,7 +1183,7 @@ Vue.component('app-registration-form', {
<input type="text"
placeholder="Транспорт"
class="field-text__input"
v-model="fieldsVal.juridical.company
ContactPhone
"
v-model="fieldsVal.juridical.company
Trans
"
>
</span>
</label>
...
...
@@ -1155,7 +1198,7 @@ Vue.component('app-registration-form', {
<input type="text"
placeholder="Гос. номер"
class="field-text__input"
v-model="fieldsVal.juridical.company
ContactPhone
"
v-model="fieldsVal.juridical.company
GovNum
"
>
</span>
</label>
...
...
@@ -1255,7 +1298,7 @@ Vue.component('app-registration-form', {
<field-select
v-bind="wUnitsSelect"
:init="unitItem"
@change="
test3
(index,$event)"
@change="
addСapacity
(index,$event)"
>
</field-select>
</span>
...
...
@@ -1263,7 +1306,7 @@ Vue.component('app-registration-form', {
</div>
<div class="add-btn"
v-if="((index === wUnitAmounts.length-1) && (index < (wUnitsSelect.options.length -
1
)))">
v-if="((index === wUnitAmounts.length-1) && (index < (wUnitsSelect.options.length -
2
)))">
<a class="btn btn_secondary btn_icon"
href="javascript:void(0);"
@click="addUnit(index)">
...
...
@@ -1590,7 +1633,7 @@ Vue.component('app-registration-form', {
<input type="text"
placeholder="Транспорт"
class="field-text__input"
v-model="fieldsVal.
juridical.companyContactPhone
"
v-model="fieldsVal.
natural.personTrans
"
>
</span>
</label>
...
...
@@ -1605,7 +1648,7 @@ Vue.component('app-registration-form', {
<input type="text"
placeholder="Гос. номер"
class="field-text__input"
v-model="fieldsVal.
juridical.companyContactPhone
"
v-model="fieldsVal.
natural.personGovNum
"
>
</span>
</label>
...
...
@@ -1617,7 +1660,7 @@ Vue.component('app-registration-form', {
<textarea class="field-text__input"
name="comment"
placeholder="Комментарий"
v-model="fieldsVal.
juridical.company
ExtraComment"
v-model="fieldsVal.
natural.person
ExtraComment"
></textarea>
</span>
</label>
...
...
@@ -1663,7 +1706,7 @@ Vue.component('app-registration-form', {
<input type="text"
placeholder="Стоимость транспортировки"
class="field-text__input"
v-model="fieldsVal.
juridical.companyContactPhone
"
v-model="fieldsVal.
natural.personTransportCostPerKm
"
>
</span>
</label>
...
...
@@ -1705,7 +1748,7 @@ Vue.component('app-registration-form', {
<field-select
v-bind="wUnitsSelect"
:init="unitItem"
@change="
test3
(index,$event)"
@change="
addСapacity
(index,$event)"
>
</field-select>
</span>
...
...
@@ -1713,7 +1756,7 @@ Vue.component('app-registration-form', {
</div>
<div class="add-btn"
v-if="(
index < (wUnitsSelect.options.length - 2
))">
v-if="(
(index === wUnitAmounts.length-1) && (index < (wUnitsSelect.options.length - 2)
))">
<a class="btn btn_secondary btn_icon"
href="javascript:void(0);"
@click="addUnit(index)">
...
...
src/blocks/app-waste-utilisation-order-form/app-waste-utilisation-order-form.js
View file @
0d41a138
...
...
@@ -527,13 +527,16 @@ Vue.component('app-waste-utilisation-order-form', {
>
</waste-filter>
</div>
<!-- Debug --->
<!--
<div class="debug"
style="position: absolute; right: -270px;top: 500px; background-color:#fff; z-index:1000; width: 400px; height: 1000px; padding: 10px; border: 1px solid #999;">
<pre>
{{ localRecord }}
</pre>
</div>
-->
<!-- end Debug --->
<!-- Form -->
...
...
src/pages/index.pug
View file @
0d41a138
...
...
@@ -20,7 +20,7 @@ block page
h1.title!=title
app-registration(:reg_info_from="'
executo
r'")
app-registration(:reg_info_from="'
neworde
r'")
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