Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
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
fukai
vue-gjjs
Commits
a6035907
Commit
a6035907
authored
Nov 24, 2021
by
潘际乾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
按钮组件
parent
92c05d39
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
22 deletions
+106
-22
FunctionBtn.vue
src/components/FunctionBtn.vue
+11
-19
commonFuncs.js
src/mixin/commonFuncs.js
+61
-0
Status.js
src/store/Status.js
+17
-0
index.vue
src/views/Business/Ditopn/index.vue
+16
-2
Glepan.vue
src/views/Public/Glepan.vue
+1
-1
No files found.
src/components/FunctionBtn.vue
View file @
a6035907
<!-- 引用方法
<!-- 引用方法
<c-function-btn :handleS
tart="handleStart" :handleCheck="handleCheck" :handleSave="handleSave
"
<c-function-btn :handleS
ubmit="handleSubmit" :handleCheck="handleCheck" :handleStash="handleStash
"
></c-function-btn>
></c-function-btn>
-->
-->
<
template
>
<
template
>
<div
class=
"m-Btn-eContainer"
v-if=
"!buttonHide && ((!isReview && !funcBtnHide) || showSetBtn)"
>
<div
class=
"m-Btn-eContainer"
v-if=
"!buttonHide && ((!isReview && !funcBtnHide) || showSetBtn)"
>
<div
class=
"m-funcBtn-eContainer"
v-if=
"!isReview && !buttonHide && !funcBtnHide"
>
<div
class=
"m-funcBtn-eContainer"
v-if=
"!isReview && !buttonHide && !funcBtnHide"
>
<el-button
<el-button
type=
"primary"
size=
"small"
@
click=
"start"
:loading=
"$store.state.Status.loading.submit"
>
提交
</el-button>
type=
"primary"
<el-button
size=
"small"
@
click=
"check"
:loading=
"$store.state.Status.loading.check"
>
检核
</el-button>
size=
"small"
<el-button
size=
"small"
@
click=
"save"
:loading=
"$store.state.Status.loading.stash"
>
暂存
</el-button>
@
click=
"start"
:loading=
"$store.state.Status.loading.start"
>
提交
</el-button
>
<el-button
size=
"small"
@
click=
"check"
:loading=
"$store.state.Status.loading.check"
>
检核
</el-button
>
<el-button
size=
"small"
@
click=
"save"
:loading=
"$store.state.Status.loading.save"
>
暂存
</el-button
>
<el-button
size=
"small"
@
click=
"handleCancel"
>
退出
</el-button>
<el-button
size=
"small"
@
click=
"handleCancel"
>
退出
</el-button>
</div>
</div>
<div
class=
"m-zhanWei-forfuncBtn"
v-if=
"!buttonHide && showSetBtn && (funcBtnHide || isReview)"
></div>
<div
class=
"m-zhanWei-forfuncBtn"
v-if=
"!buttonHide && showSetBtn && (funcBtnHide || isReview)"
></div>
...
@@ -53,7 +43,7 @@
...
@@ -53,7 +43,7 @@
export
default
{
export
default
{
// 如果需要制裁信息按钮则给组件传 showAml 方法,如果不需要则不传
// 如果需要制裁信息按钮则给组件传 showAml 方法,如果不需要则不传
props
:
[
"handleS
tart"
,
"handleCheck"
,
"handleSave
"
,
"handleExit"
,
"hideFuncBtn"
],
props
:
[
"handleS
ubmit"
,
"handleCheck"
,
"handleStash
"
,
"handleExit"
,
"hideFuncBtn"
],
data
:
function
()
{
data
:
function
()
{
return
{
return
{
isReview
:
false
,
isReview
:
false
,
...
@@ -90,13 +80,13 @@ export default {
...
@@ -90,13 +80,13 @@ export default {
},
},
methods
:
{
methods
:
{
start
:
async
function
()
{
start
:
async
function
()
{
this
.
handleS
tart
&&
(
await
this
.
handleStar
t
());
this
.
handleS
ubmit
&&
(
await
this
.
handleSubmi
t
());
},
},
check
:
async
function
()
{
check
:
async
function
()
{
this
.
handleCheck
&&
(
await
this
.
handleCheck
());
this
.
handleCheck
&&
(
await
this
.
handleCheck
());
},
},
save
:
async
function
()
{
save
:
async
function
()
{
this
.
handleS
ave
&&
(
await
this
.
handleSave
());
this
.
handleS
tash
&&
(
await
this
.
handleStash
());
},
},
handleCancel
:
function
()
{
handleCancel
:
function
()
{
this
.
$confirm
(
"确认退出?"
,
""
,
{
this
.
$confirm
(
"确认退出?"
,
""
,
{
...
@@ -113,7 +103,7 @@ export default {
...
@@ -113,7 +103,7 @@ export default {
},
500
)
},
500
)
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$router
.
push
(
'/business/
hom
e'
)
this
.
$router
.
push
(
'/business/
offic
e'
)
},
500
)
},
500
)
}
}
})
})
...
@@ -173,7 +163,9 @@ export default {
...
@@ -173,7 +163,9 @@ export default {
.m-openleft-item
>
span
{
.m-openleft-item
>
span
{
display
:
inline-block
;
display
:
inline-block
;
}
}
.m-openleft-item
.el-button
+
.el-button
{
margin
:
0
;
}
.m-openleft-item
>
button
,
.m-openleft-item
>
button
,
.m-openleft-item
>
span
>
button
,
.m-openleft-item
>
span
>
button
,
.m-openleft-item
>
span
>
div
>
button
{
.m-openleft-item
>
span
>
div
>
button
{
...
...
src/mixin/commonFuncs.js
0 → 100644
View file @
a6035907
import
Utils
from
"~/utils"
;
export
default
{
methods
:
{
// 表单提交
async
handleSubmit
()
{
let
result
=
await
this
.
save
();
if
(
result
.
respCode
==
SUCCESS
)
{
this
.
$notify
({
title
:
"成功"
,
message
:
"保存成功"
,
type
:
"success"
,
});
this
.
$router
.
history
.
push
(
"/business/trnrel"
);
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
"保存失败"
,
type
:
"error"
,
});
}
},
// 表单暂存
async
handleStash
()
{
let
result
=
await
this
.
pedding
();
if
(
result
.
respCode
==
SUCCESS
)
{
this
.
$notify
({
title
:
"成功"
,
message
:
"暂存成功"
,
type
:
"success"
,
});
this
.
$router
.
history
.
push
(
"/business/sptsel"
);
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
"暂存失败"
,
type
:
"error"
,
});
}
},
// 表单校验
async
handleCheck
()
{
let
result
=
await
this
.
checkAll
();
if
(
result
.
respCode
!=
SUCCESS
)
{
this
.
$notify
.
error
({
title
:
"错误"
,
message
:
result
.
respMsg
});
}
else
{
// 清除之前的校验状态
this
.
$refs
.
modelForm
.
clearValidate
();
const
fields
=
this
.
$refs
.
modelForm
.
fields
;
const
fieldErrors
=
result
.
fieldErrors
;
this
.
updateModel
(
result
.
data
);
Utils
.
positioningErrorMsg
(
fieldErrors
,
fields
);
const
tab
=
Utils
.
positioningErrorMsg
(
fieldErrors
,
fields
);
if
(
tab
)
{
// tab切换之后,需出发tab-click的事件
this
.
tabClick
(
tab
);
}
}
},
},
};
src/store/Status.js
View file @
a6035907
...
@@ -13,6 +13,14 @@ const Status = {
...
@@ -13,6 +13,14 @@ const Status = {
params
:
undefined
,
params
:
undefined
,
searchParams
:
undefined
,
searchParams
:
undefined
,
activeName
:
undefined
activeName
:
undefined
},
loading
:
{
// 提交
submit
:
false
,
// 校验
check
:
false
,
// 暂存
stash
:
false
}
}
},
},
mutations
:
{
mutations
:
{
...
@@ -61,6 +69,15 @@ const Status = {
...
@@ -61,6 +69,15 @@ const Status = {
searchParams
:
undefined
,
searchParams
:
undefined
,
activeName
:
undefined
activeName
:
undefined
}
}
},
setLoadingSubmit
(
state
,
value
)
{
state
.
loading
.
submit
=
value
;
},
setLoadingCheck
(
state
,
value
)
{
state
.
loading
.
check
=
value
;
},
setLoadingStash
(
state
,
value
)
{
state
.
loading
.
stash
=
value
;
}
}
}
}
}
}
...
...
src/views/Business/Ditopn/index.vue
View file @
a6035907
<
template
>
<
template
>
<c-page
title=
"买方信用证开立"
>
<c-page
title=
"买方信用证开立"
>
<div
class=
"eContainer"
>
<div
class=
"eContainer"
>
<c-bus-button
:
$
pntvm=
"this"
></c-bus-button>
<!--
<c-bus-button
:
$
pntvm=
"this"
></c-bus-button>
-->
<c-function-btn
:handleSubmit=
"handleSubmit"
:handleCheck=
"handleCheck"
:handleStash=
"handleStash"
>
<el-button
size=
"small"
>
备忘录
</el-button>
<el-button
size=
"small"
>
影像信息
</el-button>
<el-button
size=
"small"
>
保存模板
</el-button>
<el-button
size=
"small"
>
使用模板
</el-button>
<el-button
size=
"small"
>
制裁信息
</el-button>
<el-button
size=
"small"
>
拆分报文
</el-button>
<el-button
size=
"small"
>
提示
</el-button>
</c-function-btn>
<el-form
<el-form
:model=
"model"
:model=
"model"
:rules=
"rules"
:rules=
"rules"
...
@@ -109,6 +122,7 @@ import Utils from "~/utils/index";
...
@@ -109,6 +122,7 @@ import Utils from "~/utils/index";
import
CodeTable
from
"~/config/CodeTable"
;
import
CodeTable
from
"~/config/CodeTable"
;
import
Ditopn
from
"~/model/Ditopn"
;
import
Ditopn
from
"~/model/Ditopn"
;
import
CommonProcess
from
"~/mixin/CommonProcess"
;
import
CommonProcess
from
"~/mixin/CommonProcess"
;
import
CommonFuncs
from
"~/mixin/CommonFuncs"
;
import
Pattern
from
"~/model/Ditopn/Pattern"
;
import
Pattern
from
"~/model/Ditopn/Pattern"
;
import
Default
from
"~/model/Ditopn/Default"
;
import
Default
from
"~/model/Ditopn/Default"
;
import
Check
from
"~/model/Ditopn/Check"
;
import
Check
from
"~/model/Ditopn/Check"
;
...
@@ -158,7 +172,7 @@ export default {
...
@@ -158,7 +172,7 @@ export default {
root
:
this
,
root
:
this
,
};
};
},
},
mixins
:
[
CommonProcess
],
// 里面包含了Default、Check等的公共处理
mixins
:
[
CommonProcess
,
CommonFuncs
],
// 里面包含了Default、Check等的公共处理
computed
:
{},
computed
:
{},
data
()
{
data
()
{
return
{
return
{
...
...
src/views/Public/Glepan.vue
View file @
a6035907
<
template
>
<
template
>
<div
class=
"eibs-tab"
>
<div
class=
"eibs-tab"
>
<c-col
:span=
"22"
:offset=
"1"
>
<c-col
:span=
"22"
:offset=
"1"
>
<c-istream-table
:list=
"data"
:colu
c-istream-table
mns=
"columns"
></c-istream-table>
<c-istream-table
:list=
"data"
:columns=
"columns"
></c-istream-table>
</c-col>
</c-col>
</div>
</div>
</
template
>
</
template
>
...
...
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