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
d5e6fdda
Commit
d5e6fdda
authored
Jan 30, 2023
by
LiRui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apf静态交易修改
parent
1fc24ec4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
166 additions
and
165 deletions
+166
-165
apf.js
src/service/test/apf.js
+7
-7
index.vue
src/views/Statics/Dbiapf/index.vue
+159
-158
No files found.
src/service/test/apf.js
View file @
d5e6fdda
import
Api
from
"~/service/Api"
export
function
queryByPage
(
data
)
{
return
Api
.
post
(
"/manager/a
ct
/queryByPage"
,
data
)
return
Api
.
post
(
"/manager/a
pf
/queryByPage"
,
data
)
}
export
function
query
DetailById
(
inr
)
{
return
Api
.
post
(
`/manager/a
ct/queryDetailById?inr=
${
inr
}
`
)
export
function
query
ById
(
data
)
{
return
Api
.
post
(
`/manager/a
pf/queryById`
,
data
)
}
export
function
add
(
data
)
{
return
Api
.
post
(
"/manager/a
ct
/add"
,
data
)
return
Api
.
post
(
"/manager/a
pf
/add"
,
data
)
}
export
function
edit
(
data
)
{
return
Api
.
post
(
"/manager/a
ct
/edit"
,
data
)
return
Api
.
post
(
"/manager/a
pf
/edit"
,
data
)
}
export
function
deleteById
(
inr
)
{
return
Api
.
post
(
`/manager/a
ct/deleteById?inr=
${
inr
}
`
)
export
function
deleteById
(
data
)
{
return
Api
.
post
(
`/manager/a
pf/deleteById`
,
data
)
}
src/views/Statics/Dbiapf/index.vue
View file @
d5e6fdda
<
template
>
<div
class=
"eContainer"
>
<c-page
:title=
"title"
>
<el-form
ref=
"modelForm"
label-width=
"160px"
size=
"small"
label-position=
"right"
:model=
"model"
:rules=
"rules"
:validate-on-rule-change=
"false"
:disabled=
"isDisabled"
<div
class=
"eContainer"
>
<c-page
:title=
"title"
>
<el-form
ref=
"modelForm"
label-width=
"160px"
size=
"small"
label-position=
"right"
:model=
"model"
:rules=
"rules"
:validate-on-rule-change=
"false"
:disabled=
"isDisabled"
>
<c-tabs
v-model=
"tabVal"
ref=
"elment"
type=
"card"
>
<el-tab-pane
label=
"基本信息"
name=
"apf"
>
<c-content>
<m-apf-info
:model=
"model"
/>
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<div
style=
"text-align: center"
>
<c-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"commitAdd"
v-if=
"type === 'add'"
>
提 交
</c-button
>
<c-tabs
v-model=
"tabVal"
ref=
"elment"
type=
"card"
>
<el-tab-pane
label=
"基本信息"
name=
"apf"
>
<c-content>
<m-apf-info
:model=
"model"
/>
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<div
style=
"text-align: center"
>
<c-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"commitAdd"
v-if=
"type === 'add'"
>
提 交
</c-button
>
<c-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"commitEdit"
v-if=
"type === 'edit'"
>
提 交
</c-button
>
<c-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"commitDelete"
v-if=
"type === 'delete'"
>
提 交
</c-button
>
<c-button
type=
"primary"
@
click=
"goBack"
>
返 回
</c-button>
</div>
</c-page>
</div>
</
template
>
<c-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"commitEdit"
v-if=
"type === 'edit'"
>
提 交
</c-button
>
<c-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"commitDelete"
v-if=
"type === 'delete'"
>
提 交
</c-button
>
<c-button
type=
"primary"
@
click=
"goBack"
>
返 回
</c-button>
</div>
</c-page>
</div>
</
template
>
<
script
>
import
Utils
from
"~/utils"
;
import
Apf
,
{
Pattern
}
from
"./Apf.js"
;
import
ApfInfo
from
"./ApfInfo.vue"
;
import
{
queryDetailById
,
add
,
edit
,
deleteById
}
from
"~/service/test/apf.js"
;
export
default
{
name
:
"StaticsDbiapf"
,
components
:
{
"m-apf-info"
:
ApfInfo
,
import
Utils
from
"~/utils"
;
import
Apf
,
{
Pattern
}
from
"./Apf.js"
;
import
ApfInfo
from
"./ApfInfo.vue"
;
import
{
queryById
,
add
,
edit
,
deleteById
}
from
"~/service/test/apf.js"
;
export
default
{
name
:
"StaticsDbiapf"
,
components
:
{
"m-apf-info"
:
ApfInfo
,
},
provide
()
{
return
{
root
:
this
,
};
},
props
:
{
type
:
{
type
:
String
,
default
:
"info"
,
},
provide
()
{
return
{
root
:
this
,
};
title
:
{
type
:
String
,
default
:
"dbiapf"
,
},
props
:
{
type
:
{
type
:
String
,
default
:
"info"
},
title
:
{
type
:
String
,
default
:
"dbiapf"
}
},
data
()
{
return
{
model
:
new
Apf
().
data
,
tabVal
:
"apf"
,
rules
:
Pattern
,
};
},
data
()
{
return
{
model
:
new
Apf
().
data
,
tabVal
:
"apf"
,
rules
:
Pattern
,
};
},
computed
:
{
isDisabled
()
{
return
this
.
type
===
"info"
||
this
.
type
===
"delete"
;
},
computed
:
{
isDisabled
()
{
return
this
.
type
===
"info"
||
this
.
type
===
"delete"
;
},
},
created
()
{
if
(
this
.
type
!==
"add"
)
{
const
inr
=
this
.
$route
.
params
.
inr
;
const
data
=
{
inr
:
inr
};
queryById
(
data
).
then
((
res
)
=>
{
if
(
res
.
inr
)
{
this
.
model
=
res
;
}
else
{
this
.
$message
.
error
(
"客户不存在"
);
}
});
}
},
methods
:
{
commitAdd
()
{
this
.
$refs
.
modelForm
.
validate
((
validated
)
=>
{
if
(
validated
)
{
add
(
this
.
model
)
.
then
((
res
)
=>
{
this
.
$message
.
success
(
"保存成功!"
);
this
.
goBack
(
true
);
})
.
catch
((
err
)
=>
{
this
.
$message
.
error
(
"保存失败!"
);
});
}
else
{
Utils
.
formValidateTips
(
this
.
$refs
.
modelForm
.
fields
);
}
});
},
created
()
{
if
(
this
.
type
!==
"add"
)
{
const
inr
=
this
.
$route
.
params
.
inr
;
queryDetailById
(
inr
).
then
((
res
)
=>
{
if
(
res
.
inr
)
{
this
.
model
=
res
;
}
else
{
this
.
$message
.
error
(
"客户不存在"
)
}
});
}
commitEdit
()
{
this
.
$refs
.
modelForm
.
validate
((
validated
)
=>
{
if
(
validated
)
{
edit
(
this
.
model
)
.
then
((
res
)
=>
{
this
.
$message
.
success
(
"保存成功!"
);
this
.
goBack
();
})
.
catch
((
err
)
=>
{
this
.
$message
.
error
(
"保存失败!"
);
});
}
else
{
Utils
.
formValidateTips
(
this
.
$refs
.
modelForm
.
fields
);
}
});
},
methods
:
{
commitAdd
()
{
this
.
$refs
.
modelForm
.
validate
((
validated
)
=>
{
if
(
validated
)
{
add
(
this
.
model
)
.
then
((
res
)
=>
{
this
.
$message
.
success
(
"保存成功!"
);
this
.
goBack
(
true
)
})
.
catch
((
err
)
=>
{
this
.
$message
.
error
(
"保存失败!"
);
});
}
else
{
Utils
.
formValidateTips
(
this
.
$refs
.
modelForm
.
fields
)
}
});
},
commitEdit
()
{
this
.
$refs
.
modelForm
.
validate
((
validated
)
=>
{
if
(
validated
)
{
edit
(
this
.
model
)
.
then
((
res
)
=>
{
this
.
$message
.
success
(
"保存成功!"
);
this
.
goBack
()
})
.
catch
((
err
)
=>
{
this
.
$message
.
error
(
"保存失败!"
);
});
}
else
{
Utils
.
formValidateTips
(
this
.
$refs
.
modelForm
.
fields
)
}
});
},
commitDelete
()
{
this
.
$confirm
(
"是否确认删除?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
deleteById
(
this
.
model
.
inr
)
.
then
((
res
)
=>
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
goBack
(
true
)
})
.
catch
((
err
)
=>
{
this
.
$message
.
error
(
"删除失败!"
);
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
commitDelete
()
{
this
.
$confirm
(
"是否确认删除?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
const
data
=
{
inr
:
this
.
model
.
inr
};
deleteById
(
data
)
.
then
((
res
)
=>
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
goBack
(
true
);
})
.
catch
((
err
)
=>
{
this
.
$message
.
error
(
"删除失败!"
);
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
},
/**
* update 是否更新infapf的查询列表
*/
goBack
(
update
)
{
this
.
$store
.
dispatch
(
"TagsView/delView"
,
this
.
$route
);
this
.
$router
.
push
({
name
:
"StaticsDblapf"
,
params
:
{
update
}
});
},
});
},
/**
* update 是否更新infapf的查询列表
*/
goBack
(
update
)
{
this
.
$store
.
dispatch
(
"TagsView/delView"
,
this
.
$route
);
this
.
$router
.
push
({
name
:
"StaticsDblapf"
,
params
:
{
update
}
});
},
};
</
script
>
},
};
</
script
>
<
style
>
</
style
>
\ No newline at end of file
</
style
>
\ 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