Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rbc-demo
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王衍超
rbc-demo
Commits
28e241c6
Commit
28e241c6
authored
Jan 21, 2022
by
fengjiansheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop-fengjiansheng
parents
0eb366df
db554a79
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
16 deletions
+49
-16
copyBillAction.js
.../@gms/gms-plugin-billexpand/src/actions/copyBillAction.js
+11
-2
copy-bill-modal.vue
...gms/gms-plugin-billexpand/src/control/copy-bill-modal.vue
+23
-6
emcon.js
develop/@gms/gms-plugin-billexpand/src/emcon.js
+15
-8
No files found.
develop/@gms/gms-plugin-billexpand/src/actions/copyBillAction.js
View file @
28e241c6
...
@@ -6,14 +6,23 @@ export default {
...
@@ -6,14 +6,23 @@ export default {
let
name
=
GMS
.
$hideContainer
.
addComponent
(
addInfoModal
,
{},
function
(
c
)
{
let
name
=
GMS
.
$hideContainer
.
addComponent
(
addInfoModal
,
{},
function
(
c
)
{
component
=
c
;
component
=
c
;
c
.
bill
=
bill
;
c
.
bill
=
bill
;
c
.
selectBill
=
bill
.
curForm
.
name
;
if
(
!
param
.
param
.
viewName
){
GAMS
.
Common
.
messagePrompt
(
'请在设计期配置复制的模板名称。'
);
}
c
.
selectBill
=
param
.
param
.
viewName
;
let
obj
=
bill
.
getBuillData
(
param
.
param
);
let
obj
=
bill
.
getBuillData
(
param
.
param
);
if
(
obj
.
id
)
{
if
(
obj
.
id
)
{
c
.
billId
=
obj
.
id
;
c
.
billId
=
obj
.
id
;
//添加忽略字段,如果出现有引用关系的字段,需要置为空,不然会出问题
let
ignoreTempFields
=
'id,billCode,billState,flowState,BILLSTATEAUDIT,SHLLDEFINE,SHLLID,SQDH,'
;
if
(
'ignoreFields'
in
param
.
param
&&
param
.
param
.
ignoreFields
.
length
>
0
)
{
ignoreTempFields
+=
param
.
param
.
ignoreFields
}
c
.
ignoreFields
=
ignoreTempFields
.
split
(
','
);
c
.
modal_visible
=
true
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
c
.
getNewBillId
();
c
.
getNewBillId
();
},
1000
)
},
1000
)
c
.
modal_visible
=
true
;
}
else
{
}
else
{
GAMS
.
Common
.
messagePrompt
(
'请在单据中录入数据'
);
GAMS
.
Common
.
messagePrompt
(
'请在单据中录入数据'
);
}
}
...
...
develop/@gms/gms-plugin-billexpand/src/control/copy-bill-modal.vue
View file @
28e241c6
...
@@ -64,6 +64,7 @@ export default {
...
@@ -64,6 +64,7 @@ export default {
bill
:
null
,
bill
:
null
,
data
:
{},
data
:
{},
selectBill
:
""
,
selectBill
:
""
,
ignoreFields
:[],
};
};
},
},
created
()
{},
created
()
{},
...
@@ -71,7 +72,8 @@ export default {
...
@@ -71,7 +72,8 @@ export default {
props
:
{},
props
:
{},
methods
:
{
methods
:
{
getNewBillId
()
{
getNewBillId
()
{
let
billdefine
=
this
.
bill
.
curForm
.
content
.
billdefine
;
let
that
=
this
;
let
billdefine
=
this
.
bill
.
curForm
.
content
.
billdefine
;
GAMS
.
Util
.
invokeServer
({
GAMS
.
Util
.
invokeServer
({
path
:
"/gms/bill/newed/"
+
billdefine
,
path
:
"/gms/bill/newed/"
+
billdefine
,
type
:
"GET"
,
type
:
"GET"
,
...
@@ -79,15 +81,30 @@ export default {
...
@@ -79,15 +81,30 @@ export default {
})
})
.
then
(
.
then
(
function
(
data
,
textStatus
,
response
)
{
function
(
data
,
textStatus
,
response
)
{
this
.
$refs
.
copyRefs
.
context
.
bill
.
getMasterData
().
setValue
(
'id'
,
data
.
content
.
id
?
data
.
content
.
id
:
GAMS
.
Util
.
newId
());
that
.
$nextTick
(()
=>
{
this
.
$refs
.
copyRefs
.
context
.
bill
.
getMasterData
().
setValue
(
"billCode"
,
data
.
content
.
billCode
);
//需要考虑其他忽略的字段
let
tableObj
=
this
.
$refs
.
copyRefs
.
context
.
bill
.
getAllSubData
();
//处理主表忽略字段置为空 id取一个新值
that
.
$refs
.
copyRefs
.
context
.
bill
.
getMasterData
().
setValue
(
'id'
,
data
.
content
.
id
?
data
.
content
.
id
:
GAMS
.
Util
.
newId
());
that
.
$refs
.
copyRefs
.
context
.
bill
.
getMasterData
().
setValue
(
"billCode"
,
data
.
content
.
billCode
);
that
.
ignoreFields
.
forEach
(
v
=>
{
if
(
v
&&
(
v
!=
'id'
||
v
!=
'billCode'
)){
that
.
$refs
.
copyRefs
.
context
.
bill
.
getMasterData
().
setValue
(
v
,
null
);
}
})
//处理子表忽略字段置为空
let
tableObj
=
that
.
$refs
.
copyRefs
.
context
.
bill
.
getAllSubData
();
if
(
tableObj
){
for
(
let
i
in
tableObj
){
for
(
let
i
in
tableObj
){
tableObj
[
i
].
forEach
(
element
=>
{
tableObj
[
i
].
forEach
(
element
=>
{
element
.
setValue
(
'id'
,
''
);
that
.
ignoreFields
.
forEach
(
v
=>
{
if
(
v
){
element
.
setValue
(
v
,
null
);
}
})
});
});
}
}
console
.
log
(
tableObj
);
}
})
}.
bind
(
this
)
}.
bind
(
this
)
)
)
.
catch
((
XMLHttpRequest
,
textStatus
,
errorThrown
)
=>
{});
.
catch
((
XMLHttpRequest
,
textStatus
,
errorThrown
)
=>
{});
...
...
develop/@gms/gms-plugin-billexpand/src/emcon.js
View file @
28e241c6
...
@@ -1125,16 +1125,10 @@ export default {
...
@@ -1125,16 +1125,10 @@ export default {
"param"
:
[
"param"
:
[
{
{
"isRequired"
:
false
,
"isRequired"
:
false
,
"type"
:
"Boolean"
,
"title"
:
"启用自动忽略字段"
,
"key"
:
"isAutoIgnoreField"
},
{
"isRequired"
:
false
,
"title"
:
"自定义忽略字段"
,
"title"
:
"自定义忽略字段"
,
"key"
:
"ignoreFields"
,
"key"
:
"ignoreFields"
,
"type"
:
"String"
,
"type"
:
"String"
,
}
,
}
]
]
},
},
"description"
:
""
,
"description"
:
""
,
...
@@ -1167,7 +1161,20 @@ export default {
...
@@ -1167,7 +1161,20 @@ export default {
"discard"
:
false
,
"discard"
:
false
,
"path"
:
"单据/复制单据"
,
"path"
:
"单据/复制单据"
,
"extends"
:
{
"extends"
:
{
"param"
:
[]
"param"
:
[
{
"isRequired"
:
false
,
"title"
:
"自定义忽略字段"
,
"key"
:
"ignoreFields"
,
"type"
:
"String"
,
},
{
"ref"
:
"bill"
,
"type"
:
"metaData"
,
"title"
:
"选择复制单据"
,
"key"
:
"viewName"
}
]
},
},
"description"
:
""
,
"description"
:
""
,
"title"
:
"复制单据[copyBillAction]"
,
"title"
:
"复制单据[copyBillAction]"
,
...
...
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