Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
synergy-components
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
synergy-components
Commits
bde6da39
Commit
bde6da39
authored
Feb 17, 2022
by
Irina Oleynik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Создание новой записи реестра
parent
db05a72b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
interpreter/registry entry
interpreter/registry entry
+58
-0
No files found.
interpreter/registry entry
0 → 100644
View file @
bde6da39
```
var synergyHost = AS.OPTIONS.coreUrl + "rest/api/";
var departmentFormCode = "nce_forma_subdivision_card_copy2";
//Поля заполнения
var dataLabels = {
workflow_form_personal_card_rus_adress_1: "",
workflow_form_personal_card_idcard_number: "",
workflow_form_personal_card_idcard_date: "",
workflow_form_personal_card_rus_idcard_govag: "",
workflow_form_personal_card_id: ""
}
//загрузка данных
function loadUserData(id, _callback) {
jQuery.when(AS.FORMS.ApiUtils.simpleAsyncGet("rest/api/personalrecord/forms/" + id))
.then(function(result){
var card = result.filter(x => x.formCode === "workflow_form_personal_card")[0];
jQuery.when(AS.FORMS.ApiUtils.simpleAsyncGet("rest/api/asforms/data/" + card['data-uuid']))
.then(function(result) {
var data = result.data;
//TODO: rewrite
for (var i in data)
{
for (var j in dataLabels)
{
if (j.toString() === data[i].id) {
dataLabels[j] = data[i].value;
}
}
}
_callback();
});
});
}
function getUserId() {
var person = model.getValue();
return person[0].personID;
}
//Заполнение полей по ключам из массива
function fillFields() {
console.log("hello world!");
for (var i in dataLabels)
{
model.playerModel.getModelWithId(i.toString()).setValue(dataLabels[i]);
}
}
var changeFunction = function(_1, _2, value) {
var id = getUserId();
loadUserData(id, fillFields);
}
```
\ No newline at end of file
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