Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
dbef6fb9
提交
dbef6fb9
authored
12月 10, 2019
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
汇率管理
上级
f80ec377
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
662 行增加
和
13 行删除
+662
-13
TbCfExchangeController.java
.../java/com/platform/controller/TbCfExchangeController.java
+109
-0
TbCfExchangeDao.java
...admin/src/main/java/com/platform/dao/TbCfExchangeDao.java
+13
-0
TbCfExchangeEntity.java
...src/main/java/com/platform/entity/TbCfExchangeEntity.java
+119
-0
TbCfExchangeService.java
...c/main/java/com/platform/service/TbCfExchangeService.java
+71
-0
TbCfExchangeServiceImpl.java
...va/com/platform/service/impl/TbCfExchangeServiceImpl.java
+59
-0
ItemTask.java
platform-admin/src/main/java/com/platform/task/ItemTask.java
+1
-1
TbCfExchangeDao.xml
...n/src/main/resources/com/platform/dao/TbCfExchangeDao.xml
+101
-0
platform.properties
platform-admin/src/main/resources/dev/platform.properties
+6
-6
platform.properties
platform-admin/src/main/resources/prod/platform.properties
+6
-6
tbcfexchange.html
...-admin/src/main/webapp/WEB-INF/page/sys/tbcfexchange.html
+62
-0
tbcfexchange.js
platform-admin/src/main/webapp/js/sys/tbcfexchange.js
+115
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfExchangeController.java
0 → 100644
浏览文件 @
dbef6fb9
package
com
.
platform
.
controller
;
import
com.platform.entity.TbCfExchangeEntity
;
import
com.platform.service.TbCfExchangeService
;
import
com.platform.utils.PageUtils
;
import
com.platform.utils.Query
;
import
com.platform.utils.R
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
import
java.util.Map
;
/**
* 汇率管理Controller
*
* @author lipengjun
* @date 2019-12-10 11:15:53
*/
@Controller
@RequestMapping
(
"tbcfexchange"
)
public
class
TbCfExchangeController
{
@Autowired
private
TbCfExchangeService
tbCfExchangeService
;
/**
* 查看列表
*/
@RequestMapping
(
"/list"
)
@RequiresPermissions
(
"tbcfexchange:list"
)
@ResponseBody
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
//查询列表数据
Query
query
=
new
Query
(
params
);
List
<
TbCfExchangeEntity
>
tbCfExchangeList
=
tbCfExchangeService
.
queryList
(
query
);
int
total
=
tbCfExchangeService
.
queryTotal
(
query
);
PageUtils
pageUtil
=
new
PageUtils
(
tbCfExchangeList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
return
R
.
ok
().
put
(
"page"
,
pageUtil
);
}
/**
* 查看信息
*/
@RequestMapping
(
"/info/{id}"
)
@RequiresPermissions
(
"tbcfexchange:info"
)
@ResponseBody
public
R
info
(
@PathVariable
(
"id"
)
String
id
)
{
TbCfExchangeEntity
tbCfExchange
=
tbCfExchangeService
.
queryObject
(
id
);
return
R
.
ok
().
put
(
"tbCfExchange"
,
tbCfExchange
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"tbcfexchange:save"
)
@ResponseBody
public
R
save
(
@RequestBody
TbCfExchangeEntity
tbCfExchange
)
{
tbCfExchangeService
.
save
(
tbCfExchange
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"tbcfexchange:update"
)
@ResponseBody
public
R
update
(
@RequestBody
TbCfExchangeEntity
tbCfExchange
)
{
tbCfExchangeService
.
update
(
tbCfExchange
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
@RequiresPermissions
(
"tbcfexchange:delete"
)
@ResponseBody
public
R
delete
(
@RequestBody
String
[]
ids
)
{
tbCfExchangeService
.
deleteBatch
(
ids
);
return
R
.
ok
();
}
/**
* 查看所有列表
*/
@RequestMapping
(
"/queryAll"
)
@ResponseBody
public
R
queryAll
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
List
<
TbCfExchangeEntity
>
list
=
tbCfExchangeService
.
queryList
(
params
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
platform-admin/src/main/java/com/platform/dao/TbCfExchangeDao.java
0 → 100644
浏览文件 @
dbef6fb9
package
com
.
platform
.
dao
;
import
com.platform.entity.TbCfExchangeEntity
;
/**
* 汇率管理Dao
*
* @author lipengjun
* @date 2019-12-10 11:15:53
*/
public
interface
TbCfExchangeDao
extends
BaseDao
<
TbCfExchangeEntity
>
{
}
platform-admin/src/main/java/com/platform/entity/TbCfExchangeEntity.java
0 → 100644
浏览文件 @
dbef6fb9
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 汇率管理实体
* 表名 tb_cf_exchange
*
* @author lipengjun
* @date 2019-12-10 11:15:53
*/
public
class
TbCfExchangeEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* ID
*/
private
String
id
;
/**
* 货币
*/
private
String
currency
;
/**
* 兑换货币
*/
private
String
exchangeCurrency
;
/**
* 删除标志 0:正常 1:已删除
*/
private
Integer
delFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 设置:ID
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* 获取:ID
*/
public
String
getId
()
{
return
id
;
}
/**
* 设置:货币
*/
public
void
setCurrency
(
String
currency
)
{
this
.
currency
=
currency
;
}
/**
* 获取:货币
*/
public
String
getCurrency
()
{
return
currency
;
}
/**
* 设置:兑换货币
*/
public
void
setExchangeCurrency
(
String
exchangeCurrency
)
{
this
.
exchangeCurrency
=
exchangeCurrency
;
}
/**
* 获取:兑换货币
*/
public
String
getExchangeCurrency
()
{
return
exchangeCurrency
;
}
/**
* 设置:删除标志 0:正常 1:已删除
*/
public
void
setDelFlag
(
Integer
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
/**
* 获取:删除标志 0:正常 1:已删除
*/
public
Integer
getDelFlag
()
{
return
delFlag
;
}
/**
* 设置:创建时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 设置:更新时间
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
/**
* 获取:更新时间
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
}
platform-admin/src/main/java/com/platform/service/TbCfExchangeService.java
0 → 100644
浏览文件 @
dbef6fb9
package
com
.
platform
.
service
;
import
com.platform.entity.TbCfExchangeEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 汇率管理Service接口
*
* @author lipengjun
* @date 2019-12-10 11:15:53
*/
public
interface
TbCfExchangeService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfExchangeEntity
queryObject
(
String
id
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfExchangeEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfExchange 实体
* @return 保存条数
*/
int
save
(
TbCfExchangeEntity
tbCfExchange
);
/**
* 根据主键更新实体
*
* @param tbCfExchange 实体
* @return 更新条数
*/
int
update
(
TbCfExchangeEntity
tbCfExchange
);
/**
* 根据主键删除
*
* @param id
* @return 删除条数
*/
int
delete
(
String
id
);
/**
* 根据主键批量删除
*
* @param ids
* @return 删除条数
*/
int
deleteBatch
(
String
[]
ids
);
}
platform-admin/src/main/java/com/platform/service/impl/TbCfExchangeServiceImpl.java
0 → 100644
浏览文件 @
dbef6fb9
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.TbCfExchangeDao
;
import
com.platform.entity.TbCfExchangeEntity
;
import
com.platform.service.TbCfExchangeService
;
import
com.platform.utils.IdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* 汇率管理Service实现类
*
* @author lipengjun
* @date 2019-12-10 11:15:53
*/
@Service
(
"tbCfExchangeService"
)
public
class
TbCfExchangeServiceImpl
implements
TbCfExchangeService
{
@Autowired
private
TbCfExchangeDao
tbCfExchangeDao
;
@Override
public
TbCfExchangeEntity
queryObject
(
String
id
)
{
return
tbCfExchangeDao
.
queryObject
(
id
);
}
@Override
public
List
<
TbCfExchangeEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfExchangeDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfExchangeDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfExchangeEntity
tbCfExchange
)
{
tbCfExchange
.
setId
(
IdUtil
.
createIdbyUUID
());
return
tbCfExchangeDao
.
save
(
tbCfExchange
);
}
@Override
public
int
update
(
TbCfExchangeEntity
tbCfExchange
)
{
return
tbCfExchangeDao
.
update
(
tbCfExchange
);
}
@Override
public
int
delete
(
String
id
)
{
return
tbCfExchangeDao
.
delete
(
id
);
}
@Override
public
int
deleteBatch
(
String
[]
ids
)
{
return
tbCfExchangeDao
.
deleteBatch
(
ids
);
}
}
platform-admin/src/main/java/com/platform/task/ItemTask.java
浏览文件 @
dbef6fb9
...
...
@@ -88,7 +88,7 @@ public class ItemTask {
product
.
setItemNum
(
0L
);
product
.
setPlatformCode
(
"afri-eshop"
);
product
.
setPlatformName
(
"afri-eshop"
);
product
.
setEnableFlag
(
1
);
product
.
setEnableFlag
(
0
);
product
.
setCreateTime
(
new
Date
());
tbCfStationItemDao
.
save
(
product
);
}
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfExchangeDao.xml
0 → 100644
浏览文件 @
dbef6fb9
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.platform.dao.TbCfExchangeDao"
>
<resultMap
type=
"com.platform.entity.TbCfExchangeEntity"
id=
"tbCfExchangeMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"currency"
column=
"currency"
/>
<result
property=
"exchangeCurrency"
column=
"exchange_currency"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfExchangeEntity"
>
select
`id`,
`currency`,
`exchange_currency`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_exchange
where id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfExchangeEntity"
>
select
`id`,
`currency`,
`exchange_currency`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_exchange
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_exchange
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfExchangeEntity"
>
insert into tb_cf_exchange(
`id`,
`currency`,
`exchange_currency`,
`del_flag`,
`create_time`,
`update_time`)
values(
#{id},
#{currency},
#{exchangeCurrency},
#{delFlag},
#{createTime},
#{updateTime})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfExchangeEntity"
>
update tb_cf_exchange
<set>
<if
test=
"currency != null"
>
`currency` = #{currency},
</if>
<if
test=
"exchangeCurrency != null"
>
`exchange_currency` = #{exchangeCurrency},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from tb_cf_exchange where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_exchange where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/resources/dev/platform.properties
浏览文件 @
dbef6fb9
...
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
#
jdbc.password=diaoyun666
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username
=
root
jdbc.password
=
diaoyun666
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
jdbc.password
:
Diaoyunnuli.8
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.username: root
#
jdbc.password: Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.maxActive
=
30
...
...
platform-admin/src/main/resources/prod/platform.properties
浏览文件 @
dbef6fb9
...
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/platform?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
#
jdbc.password=diaoyun666
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/platform?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username
=
root
jdbc.password
=
diaoyun666
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
jdbc.password
:
Diaoyunnuli.8
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.username: root
#
jdbc.password: Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.maxActive
=
30
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfexchange.html
0 → 100644
浏览文件 @
dbef6fb9
<!DOCTYPE html>
<html>
<head>
<title>
汇率管理
</title>
#parse("sys/header.html")
</head>
<body>
<div
id=
"rrapp"
v-cloak
style=
"height: calc(100% - 15px);"
>
<div
v-show=
"showList"
style=
"height: 100%;"
>
<Row
:gutter=
"16"
>
<div
class=
"search-group"
>
<i-col
span=
"4"
>
<i-input
v-model=
"q.name"
@
on-enter=
"query"
placeholder=
"名称"
/>
</i-col>
<i-button
@
click=
"query"
>
查询
</i-button>
<i-button
@
click=
"reloadSearch"
>
重置
</i-button>
</div>
<div
class=
"buttons-group"
>
#if($shiro.hasPermission("tbcfexchange:save"))
<i-button
type=
"info"
@
click=
"add"
><i
class=
"fa fa-plus"
></i>
新增
</i-button>
#end
#if($shiro.hasPermission("tbcfexchange:update"))
<i-button
type=
"warning"
@
click=
"update"
><i
class=
"fa fa-pencil-square-o"
></i>
修改
</i-button>
#end
#if($shiro.hasPermission("tbcfexchange:delete"))
<i-button
type=
"error"
@
click=
"del"
><i
class=
"fa fa-trash-o"
></i>
删除
</i-button>
#end
</div>
</Row>
<table
id=
"jqGrid"
></table>
</div>
<Card
v-show=
"!showList"
>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate"
:model=
"tbCfExchange"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"货币"
prop=
"currency"
>
<i-input
v-model=
"tbCfExchange.currency"
placeholder=
"货币"
/>
</Form-item>
<Form-item
label=
"兑换货币"
prop=
"exchangeCurrency"
>
<i-input
v-model=
"tbCfExchange.exchangeCurrency"
placeholder=
"兑换货币"
/>
</Form-item>
<Form-item
label=
"删除标志 0:正常 1:已删除"
prop=
"delFlag"
>
<i-input
v-model=
"tbCfExchange.delFlag"
placeholder=
"删除标志 0:正常 1:已删除"
/>
</Form-item>
<Form-item
label=
"创建时间"
prop=
"createTime"
>
<i-input
v-model=
"tbCfExchange.createTime"
placeholder=
"创建时间"
/>
</Form-item>
<Form-item
label=
"更新时间"
prop=
"updateTime"
>
<i-input
v-model=
"tbCfExchange.updateTime"
placeholder=
"更新时间"
/>
</Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"ghost"
@
click=
"handleReset('formValidate')"
style=
"margin-left: 8px"
>
重置
</i-button>
</Form-item>
</i-form>
</Card>
</div>
<script
src=
"${rc.contextPath}/js/sys/tbcfexchange.js?_${date.systemTime}"
></script>
</body>
</html>
\ No newline at end of file
platform-admin/src/main/webapp/js/sys/tbcfexchange.js
0 → 100644
浏览文件 @
dbef6fb9
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfexchange/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'货币'
,
name
:
'currency'
,
index
:
'currency'
,
width
:
80
},
{
label
:
'兑换货币'
,
name
:
'exchangeCurrency'
,
index
:
'exchange_currency'
,
width
:
80
},
{
label
:
'删除标志 0:正常 1:已删除'
,
name
:
'delFlag'
,
index
:
'del_flag'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'更新时间'
,
name
:
'updateTime'
,
index
:
'update_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfExchange
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfExchange
=
{};
},
update
:
function
(
event
)
{
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfExchange
.
id
==
null
?
"../tbcfexchange/save"
:
"../tbcfexchange/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfExchange
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfexchange/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
){
Ajax
.
request
({
url
:
"../tbcfexchange/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfExchange
=
r
.
tbCfExchange
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论