Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
a9e7f1ac
Commit
a9e7f1ac
authored
Apr 21, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
283ecc44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
bpo-web/app/base/api/impl/econtractApi.js
+29
-0
No files found.
bpo-web/app/base/api/impl/econtractApi.js
View file @
a9e7f1ac
...
...
@@ -55,6 +55,35 @@ class EcontractApi {
return
1
;
}
async
importETemplate
(
obj
)
{
console
.
log
(
obj
,
"===================>>>>>>>>>>>>>>>>>>>>>"
);
var
names
=
obj
.
companyNames
;
var
etemplateId
=
obj
.
etemplateId
;
var
etemplate
=
await
this
.
etemplateSve
.
findById
(
Number
(
etemplateId
||
0
));
if
(
!
etemplate
)
{
return
0
;
}
let
errors
=
[];
for
(
var
name
of
names
)
{
try
{
let
company
=
await
this
.
ecompanySve
.
findOne
({
name
:
name
});
if
(
!
company
)
{
errors
.
push
(
name
);
continue
;
}
// 创建模板
let
etemplate
=
{
};
await
this
.
etemplateSve
.
create
(
etemplate
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
return
errors
;
}
async
testpushContract
(
obj
,
req
)
{
var
ids
=
obj
.
ids
||
[];
for
(
var
id
of
ids
)
{
...
...
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