Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
glsx-staging
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7f25ee9f
authored
Apr 21, 2020
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加对账管理
1 parent
37a547c7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
270 additions
and
48 deletions
.env
src/api/reconcile.js
src/plugin/axios/index.js
src/router/routes.js
src/store/modules/d2admin/modules/account.js
src/views/reconciliateManagement/index.vue
src/views/storeManagement/index.vue
src/views/system/login/index.vue
.env
View file @
7f25ee9
...
...
@@ -6,6 +6,7 @@ VUE_APP_TITLE=金融分期管理平台
# 网络请求公用地址 http://tfims.glsx.com.cn/router
#VUE_APP_API=http://tfims.test.glsx.com.cn/router
VUE_APP_API=http://llg.test.glsx.com.cn/admin/
#VUE_APP_API=http://llg.glsx.com.cn/admin/
# 仓库地址
VUE_APP_REPO=https://oss-config.test.glsx.com.cn/mock/5d638b3b6fbe9a0ac59d872e/tFIMS
...
...
src/api/reconcile.js
0 → 100644
View file @
7f25ee9
import
request
from
'./request'
import
RequestMethods
from
'./request.methods'
const
path
=
'reconcile/'
// 对账列表
function
reconcileList
(
data
)
{
data
.
method
=
`
${
path
}
search`
return
request
(
data
)
}
// 导出对账列表
function
exportList
(
data
)
{
data
.
method
=
`
${
path
}
export`
return
request
(
data
,
RequestMethods
.
GET
,
'arraybuffer'
)
}
// 导入对账数据
function
importData
()
{
data
.
method
=
`
${
path
}
import`
return
request
(
data
)
}
export
{
reconcileList
,
exportList
,
importData
}
\ No newline at end of file
src/plugin/axios/index.js
View file @
7f25ee9
...
...
@@ -45,7 +45,7 @@ function errorLog(error) {
// 创建一个 axios 实例
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_API
,
timeout
:
5
000
,
// 请求超时时间
timeout
:
60
000
,
// 请求超时时间
transformRequest
:
[
function
(
data
)
{
return
Qs
.
stringify
(
data
)
}]
...
...
src/router/routes.js
View file @
7f25ee9
...
...
@@ -21,7 +21,7 @@ const frameIn = [{
export
const
home
=
{
path
:
'/index'
,
name
:
'index'
,
icon
:
'
document
'
,
icon
:
'
s-shop
'
,
meta
:
{
title
:
'门店管理'
,
authId
:
'101'
,
...
...
@@ -127,41 +127,28 @@ export const resources = {
},
component
:
_import
(
'table2'
)
},
// '103': {
// path: '/storeManagement',
// icon: 'document',
// name: 'storeManagement',
// meta: {
// title: '门店管理',
// authId: '103',
// parentId: '0'
// },
// auth: [{
// authId: '1030001',
// parentId: '103',
// label: '删除',
// handle: 'handleDelete'
// },
// {
// authId: '1030002',
// parentId: '103',
// label: '编辑',
// handle: 'handleEdit'
// }
// ],
// component: _import('storeManagement')
// },
'104'
:
{
'103'
:
{
path
:
'/orderManagement'
,
icon
:
'document'
,
name
:
'orderManagement'
,
meta
:
{
title
:
'订单管理'
,
authId
:
'10
4
'
,
authId
:
'10
3
'
,
parentId
:
'0'
},
component
:
_import
(
'orderManagement'
)
},
'104'
:
{
path
:
'/reconciliateManagement'
,
icon
:
'reading'
,
name
:
'reconciliateManagement'
,
meta
:
{
title
:
'对账管理'
,
authId
:
'104'
,
parentId
:
'0'
},
component
:
_import
(
'reconciliateManagement'
)
},
'107'
:
{
path
:
'/users'
,
icon
:
'user'
,
...
...
src/store/modules/d2admin/modules/account.js
View file @
7f25ee9
...
...
@@ -22,11 +22,8 @@ export default {
'authId'
:
'101'
,
'parentId'
:
'0'
},
{
'authId'
:
'1010001'
,
'parentId'
:
'101'
},
{
'authId'
:
'1010002'
,
'parentId'
:
'101'
'authId'
:
'103'
,
'parentId'
:
'0'
},
{
'authId'
:
'104'
,
'parentId'
:
'0'
...
...
src/views/reconciliateManagement/index.vue
0 → 100644
View file @
7f25ee9
<
template
>
<d2-container>
<el-form
:inline=
"true"
label-width=
"140px"
>
<el-form-item
label=
"门店名称:"
>
<el-input
v-model=
"searchForm.shopName"
placeholder=
"请输入"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"选择日期:"
>
<el-date-picker
v-model=
"dateValue"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"searchTable"
>
查询
</el-button>
<el-button
@
click=
"handleExport"
>
导出Excel
</el-button>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
'handleImportExcel'
>
导入对账信息
</el-button>
</el-form-item>
</el-form>
<d2-table
ref=
"reconciliateTable"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"queryListApi"
>
</d2-table>
<el-dialog
title=
"导入对账信息"
width=
'40%'
:before-close=
"handleImportExcel"
:visible
.
sync=
'importExcelVisible'
>
<div
class=
'file-title'
>
请选择要导入的Excel文件
<!--
<el-link
type=
"primary"
class=
'file-down'
@
click=
'downLoadStoreDome'
:underline=
'false'
>
下载导入Excel模版
</el-link>
-->
</div>
<el-upload
ref=
"upload"
:action=
"uploadAction"
:on-preview=
"handlePreview"
:on-remove=
"handleRemove"
:on-success=
'onSuccess'
:auto-upload=
"false"
accept=
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
with-credentials
multiple
limit=
'1'
>
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
>
选择EXCEL文件
</el-button>
</el-upload>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"submitUpload"
>
确定导入
</el-button>
<el-button
@
click=
"handleImportExcel"
>
取消
</el-button>
</span>
</el-dialog>
</d2-container>
</
template
>
<
script
>
import
*
as
api
from
'@api/reconcile'
export
default
{
name
:
'reconciliateManagement'
,
data
()
{
return
{
searchForm
:
{},
dateValue
:
''
,
tableParams
:
{
listName
:
'list'
,
tableColumns
:
[
{
label
:
'门店编号'
,
prop
:
'merId'
,
width
:
'80'
},
{
label
:
'门店名称'
,
prop
:
'belongShop'
},
{
label
:
'客户名称'
,
prop
:
'consumerName'
},
{
label
:
'订单金额(元)'
,
prop
:
'tradeAmount'
},
{
label
:
'结算金额(元)'
,
prop
:
'settleAmount'
},
{
label
:
'费率差额(元)'
,
prop
:
'interestDifferential'
},
{
label
:
'订单时间'
,
prop
:
'payDate'
}
]
},
queryListApi
:
api
.
reconcileList
,
importExcelVisible
:
false
,
uploadAction
:
`
${
process
.
env
.
VUE_APP_API
}
reconcile/import`
,
}
},
methods
:
{
// 搜索
searchTable
()
{
this
.
handleDate
()
this
.
$refs
.
reconciliateTable
.
refreshTable
()
},
handleDate
()
{
if
(
this
.
dateValue
)
{
this
.
searchForm
.
sDate
=
this
.
dateValue
[
0
]
this
.
searchForm
.
eDate
=
this
.
dateValue
[
1
]
}
else
{
if
(
this
.
searchForm
.
sDate
)
delete
this
.
searchForm
.
sDate
if
(
this
.
searchForm
.
eDate
)
delete
this
.
searchForm
.
eDate
}
},
// 导出
handleExport
()
{
this
.
handleDate
()
api
.
exportList
(
this
.
searchForm
).
then
(
res
=>
{
let
a
=
document
.
createElement
(
'a'
)
let
blob
=
new
Blob
([
res
],
{
type
:
"application/vnd.ms-excel"
})
let
objectUrl
=
URL
.
createObjectURL
(
blob
)
a
.
setAttribute
(
"href"
,
objectUrl
)
a
.
setAttribute
(
"download"
,
'对账信息.xlsx'
)
a
.
click
()
})
},
handleImportExcel
()
{
this
.
importExcelVisible
=
!
this
.
importExcelVisible
},
onSuccess
(
res
)
{
this
.
notice
.
warningTips
(
res
.
data
.
tips
)
this
.
$refs
.
upload
.
clearFiles
()
this
.
$refs
.
reconciliateTable
.
refreshTable
()
},
submitUpload
()
{
this
.
$refs
.
upload
.
submit
()
this
.
handleImportExcel
()
},
},
}
</
script
>
\ No newline at end of file
src/views/storeManagement/index.vue
View file @
7f25ee9
...
...
@@ -107,12 +107,24 @@
width=
"35%"
:before-close=
"handleEdit"
>
<el-dialog
width=
"30%"
title=
"修改门店信息"
:visible
.
sync=
"innerVisible"
append-to-body
>
是否要修改
<span
class=
"tips-content"
>
{{
storeCopyForm
.
name
}}
</span>
门店,修改关键信息将影响资金清分!
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSave"
>
确定
</el-button>
<el-button
@
click=
"innerVisible = false"
>
取 消
</el-button>
</div>
</el-dialog>
<el-form
:model=
"storeForm"
:rules=
"storeFormRules"
ref=
"storeRuleForm"
label-width=
"140px"
>
label-width=
"140px"
>
<el-form-item
label=
"门店名称:"
prop=
"name"
...
...
@@ -209,8 +221,7 @@
title=
"批量导入门店信息"
width=
'40%'
:before-close=
"handleImportExcel"
:visible
.
sync=
'importExcelVisible'
>
:visible
.
sync=
'importExcelVisible'
>
<div
class=
'file-title'
>
请选择要导入的Excel文件
<el-link
...
...
@@ -227,6 +238,7 @@
:on-remove=
"handleRemove"
:on-success=
'onSuccess'
:auto-upload=
"false"
accept=
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
with-credentials
multiple
limit=
'1'
...
...
@@ -239,10 +251,10 @@
</el-upload>
<div
class=
'file-title tips-content'
v-if=
'fileTips'
>
v-if=
'fileTips'
>
{{
fileTips
}}
<el-link
v-if=
"failFile"
type=
"warning"
class=
'file-down'
:href=
'failFile'
...
...
@@ -301,6 +313,7 @@
:on-remove=
"handleRemove"
:on-success=
'onMerIdSuccess'
:auto-upload=
"false"
accept=
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
with-credentials
multiple
limit=
'1'
...
...
@@ -317,6 +330,7 @@
>
{{
merIdTips
}}
<el-link
v-if=
"merIdFailFile"
type=
"warning"
class=
'file-down'
:href=
'merIdFailFile'
...
...
@@ -451,7 +465,10 @@ export default {
queryListApi
:
api
.
storeList
,
storeVisible
:
false
,
importExcelVisible
:
false
,
// 编辑二次确认
innerVisible
:
false
,
storeForm
:
{},
storeCopyForm
:
{},
storeFormRules
:
{
name
:
[{
required
:
true
,
message
:
'请输入门店名称'
,
trigger
:
'blur'
}],
bank
:
[{
required
:
true
,
message
:
'请输入银行名称'
,
trigger
:
'blur'
}],
...
...
@@ -500,7 +517,6 @@ export default {
let
id
=
row
.
id
if
(
!
this
.
storeVisible
)
return
api
.
getStoreDetails
({
id
:
id
},
id
).
then
(
res
=>
{
console
.
log
(
res
)
let
obj
=
{
id
:
id
,
name
:
res
.
name
,
...
...
@@ -513,19 +529,40 @@ export default {
merId
:
res
.
merId
,
}
this
.
storeForm
=
obj
this
.
storeCopyForm
=
JSON
.
parse
(
JSON
.
stringify
(
obj
))
})
},
handleSubmit
()
{
this
.
$refs
.
storeRuleForm
.
validate
(
valid
=>
{
this
.
storeForm
.
merId
=
this
.
storeForm
.
merId
?
Number
(
this
.
storeForm
.
merId
)
:
''
if
(
valid
)
{
axios
.
post
(
`
${
process
.
env
.
VUE_APP_API
}
shop/edit`
,
this
.
storeForm
).
then
(
res
=>
{
this
.
$refs
.
storeTable
.
refreshTable
()
this
.
storeVisible
=
false
}
)
this
.
checkForm
()
if
(
!
this
.
innerVisible
){
this
.
handleSave
()
}
}
})
},
// 是否有修改
checkForm
()
{
for
(
let
key
in
this
.
storeForm
)
{
if
(
key
!=
'merId'
)
{
if
(
this
.
storeForm
[
key
]
!=
this
.
storeCopyForm
[
key
])
{
this
.
innerVisible
=
!
this
.
innerVisible
}
}
}
},
// 保存的方法
handleSave
()
{
this
.
storeForm
.
merId
=
this
.
storeForm
.
merId
?
Number
(
this
.
storeForm
.
merId
)
:
''
axios
.
post
(
`
${
process
.
env
.
VUE_APP_API
}
shop/edit`
,
this
.
storeForm
).
then
(
res
=>
{
this
.
$refs
.
storeTable
.
refreshTable
()
this
.
storeVisible
=
false
if
(
this
.
innerVisible
)
this
.
innerVisible
=
!
this
.
innerVisible
})
},
handleExport
()
{
api
.
exportExcel
(
this
.
searchForm
).
then
(
res
=>
{
let
a
=
document
.
createElement
(
'a'
)
...
...
@@ -565,13 +602,13 @@ export default {
return
this
.
$confirm
(
`确定移除
${
file
.
name
}
?`
);
},
onSuccess
(
res
)
{
console
.
log
(
res
)
this
.
fileTips
=
res
.
data
.
tips
this
.
batchId
=
res
.
data
.
batchId
if
(
res
.
data
.
failFile
)
{
let
failFile
=
`
${
res
.
data
.
failFile
.
split
(
'/'
)[
1
]}
/
${
res
.
data
.
failFile
.
split
(
'/'
)[
2
]}
`
this
.
failFile
=
`
${
process
.
env
.
VUE_APP_API
}${
failFile
}
`
}
},
submitUpload
()
{
this
.
$refs
.
upload
.
submit
()
...
...
src/views/system/login/index.vue
View file @
7f25ee9
...
...
@@ -121,8 +121,8 @@ export default {
time
:
dayjs
().
format
(
'HH:mm:ss'
),
// 表单
formLogin
:
{
username
:
''
,
password
:
''
username
:
'
admin
'
,
password
:
'
123456
'
// loginType: LOGIN_TYPE
},
// 表单校验
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment