Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
f54d3733
提交
f54d3733
authored
1月 18, 2021
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
条目管理
上级
3f9cf84b
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
332 行增加
和
196 行删除
+332
-196
TermController.java
...src/main/java/com/platform/controller/TermController.java
+8
-5
TbCfOrderListEntity.java
...rc/main/java/com/platform/entity/TbCfOrderListEntity.java
+9
-0
TermEntity.java
...m-admin/src/main/java/com/platform/entity/TermEntity.java
+1
-0
TermService.java
...admin/src/main/java/com/platform/service/TermService.java
+5
-4
TermServiceImpl.java
.../main/java/com/platform/service/impl/TermServiceImpl.java
+35
-17
TbCfOrderListDao.xml
.../src/main/resources/com/platform/dao/TbCfOrderListDao.xml
+2
-0
TermDao.xml
...orm-admin/src/main/resources/com/platform/dao/TermDao.xml
+16
-13
tbcforderlist.html
...admin/src/main/webapp/WEB-INF/page/sys/tbcforderlist.html
+3
-0
term.html
platform-admin/src/main/webapp/WEB-INF/page/sys/term.html
+75
-42
common.js
platform-admin/src/main/webapp/js/common.js
+1
-1
tbcforderList.js
platform-admin/src/main/webapp/js/sys/tbcforderList.js
+12
-10
term.js
platform-admin/src/main/webapp/js/sys/term.js
+165
-104
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TermController.java
浏览文件 @
f54d3733
...
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.io.UnsupportedEncodingException
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -42,7 +43,7 @@ public class TermController {
//查询列表数据
Query
query
=
new
Query
(
params
);
List
<
Term
Vo
>
termList
=
termService
.
queryList
(
query
);
List
<
Term
Entity
>
termList
=
termService
.
queryList
(
query
);
int
total
=
termService
.
queryTotal
(
query
);
PageUtils
pageUtil
=
new
PageUtils
(
termList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
...
...
@@ -72,7 +73,7 @@ public class TermController {
@RequestMapping
(
"/info/{id}"
)
@RequiresPermissions
(
"term:info"
)
@ResponseBody
public
R
info
(
@PathVariable
(
"id"
)
String
id
)
{
public
R
info
(
@PathVariable
(
"id"
)
String
id
)
throws
UnsupportedEncodingException
{
TermEntity
term
=
termService
.
queryObject
(
id
);
return
R
.
ok
().
put
(
"term"
,
term
);
...
...
@@ -84,7 +85,7 @@ public class TermController {
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"term:save"
)
@ResponseBody
public
R
save
(
@RequestBody
TermEntity
term
)
{
public
R
save
(
@RequestBody
TermEntity
term
)
throws
UnsupportedEncodingException
{
termService
.
save
(
term
);
return
R
.
ok
();
...
...
@@ -96,7 +97,7 @@ public class TermController {
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"term:update"
)
@ResponseBody
public
R
update
(
@RequestBody
TermEntity
term
)
{
public
R
update
(
@RequestBody
TermEntity
term
)
throws
UnsupportedEncodingException
{
termService
.
update
(
term
);
return
R
.
ok
();
...
...
@@ -121,8 +122,10 @@ public class TermController {
@ResponseBody
public
R
queryAll
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
List
<
Term
Vo
>
list
=
termService
.
queryList
(
params
);
List
<
Term
Entity
>
list
=
termService
.
queryList
(
params
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
platform-admin/src/main/java/com/platform/entity/TbCfOrderListEntity.java
浏览文件 @
f54d3733
...
...
@@ -31,6 +31,15 @@ public class TbCfOrderListEntity implements Serializable {
private
String
deliveryFlag
;
private
BigDecimal
itemsPrice
;
private
String
itemUrl
;
private
String
email
;
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getItemUrl
()
{
return
itemUrl
;
...
...
platform-admin/src/main/java/com/platform/entity/TermEntity.java
浏览文件 @
f54d3733
...
...
@@ -53,6 +53,7 @@ public class TermEntity implements Serializable {
/**
* 设置:条款ID
*/
...
...
platform-admin/src/main/java/com/platform/service/TermService.java
浏览文件 @
f54d3733
...
...
@@ -3,6 +3,7 @@ package com.platform.service;
import
com.platform.entity.TermEntity
;
import
com.platform.vo.TermVo
;
import
java.io.UnsupportedEncodingException
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -20,7 +21,7 @@ public interface TermService {
* @param id 主键
* @return 实体
*/
TermEntity
queryObject
(
String
id
);
TermEntity
queryObject
(
String
id
)
throws
UnsupportedEncodingException
;
/**
* 分页查询
...
...
@@ -28,7 +29,7 @@ public interface TermService {
* @param map 参数
* @return list
*/
List
<
Term
Vo
>
queryList
(
Map
<
String
,
Object
>
map
);
List
<
Term
Entity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
...
...
@@ -44,7 +45,7 @@ public interface TermService {
* @param term 实体
* @return 保存条数
*/
int
save
(
TermEntity
term
);
int
save
(
TermEntity
term
)
throws
UnsupportedEncodingException
;
/**
* 根据主键更新实体
...
...
@@ -52,7 +53,7 @@ public interface TermService {
* @param term 实体
* @return 更新条数
*/
int
update
(
TermEntity
term
);
int
update
(
TermEntity
term
)
throws
UnsupportedEncodingException
;
/**
* 根据主键删除
...
...
platform-admin/src/main/java/com/platform/service/impl/TermServiceImpl.java
浏览文件 @
f54d3733
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.TermDao
;
import
com.platform.entity.TermEntity
;
import
com.platform.service.TermService
;
import
com.platform.utils.IdUtil
;
...
...
@@ -9,6 +10,8 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -25,20 +28,37 @@ public class TermServiceImpl implements TermService {
private
TermDao
termDao
;
@Override
public
TermEntity
queryObject
(
String
id
)
{
return
termDao
.
queryObject
(
id
);
public
TermEntity
queryObject
(
String
id
)
throws
UnsupportedEncodingException
{
TermEntity
term
=
termDao
.
queryObject
(
id
);
term
.
setTermContent
(
URLDecoder
.
decode
(
term
.
getTermContent
(),
"UTF-8"
));
return
term
;
}
// @Override
// public List<TermVo> queryList(Map<String, Object> map) {
// //查询所有一级条款
// map.put("parentId", "0");
// List<TermVo> termList = termDao.queryTermsList(map);
// for (TermVo term : termList) {
// List<TermEntity> childrenTerms = termDao.queryChildrenTerms(term.getId());
// term.setChildrenList(childrenTerms);
// }
// return termList;
// }
@Override
public
List
<
TermVo
>
queryList
(
Map
<
String
,
Object
>
map
)
{
//查询所有一级条款
map
.
put
(
"parentId"
,
"0"
);
List
<
TermVo
>
termList
=
termDao
.
queryTermsList
(
map
);
for
(
TermVo
term
:
termList
)
{
List
<
TermEntity
>
childrenTerms
=
termDao
.
queryChildrenTerms
(
term
.
getId
());
term
.
setChildrenList
(
childrenTerms
);
}
return
termList
;
public
List
<
TermEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
List
<
TermEntity
>
list
=
termDao
.
queryList
(
map
);
list
.
forEach
(
t
->
{
try
{
t
.
setTermContent
(
URLDecoder
.
decode
(
t
.
getTermContent
(),
"UTF-8"
));
if
(
"0"
.
equals
(
t
.
getParentId
()))
{
t
.
setParentName
(
"一级条款"
);
}
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
});
return
list
;
}
@Override
...
...
@@ -47,20 +67,18 @@ public class TermServiceImpl implements TermService {
}
@Override
public
int
save
(
TermEntity
term
)
{
public
int
save
(
TermEntity
term
)
throws
UnsupportedEncodingException
{
term
.
setId
(
IdUtil
.
createIdbyUUID
());
term
.
setCreateTime
(
new
Date
());
term
.
setUpdateTime
(
new
Date
());
if
(
StringUtils
.
isBlank
(
term
.
getParentId
()))
{
//一级条款父Id为0
term
.
setParentId
(
"0"
);
}
term
.
setTermContent
(
URLDecoder
.
decode
(
term
.
getTermContent
(),
"UTF-8"
));
return
termDao
.
save
(
term
);
}
@Override
public
int
update
(
TermEntity
term
)
{
public
int
update
(
TermEntity
term
)
throws
UnsupportedEncodingException
{
term
.
setUpdateTime
(
new
Date
());
term
.
setTermContent
(
URLDecoder
.
decode
(
term
.
getTermContent
(),
"UTF-8"
));
return
termDao
.
update
(
term
);
}
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfOrderListDao.xml
浏览文件 @
f54d3733
...
...
@@ -35,6 +35,7 @@
o.delivery_name,
o.delivery_phone,
o.delivery_address,
a.email,
f.pay_way_code,
o.order_status,
o.pay_id,
...
...
@@ -47,6 +48,7 @@
LEFT JOIN tb_cf_finance f on f.order_id=o.order_id
LEFT JOIN tb_cf_user_info u on u.user_id=o.user_id
LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
LEFT JOIN tb_cf_address a on a.user_id=u.user_id
WHERE 1=1 and o.enable_flag=1
<if
test=
"name != null and name.trim() != ''"
>
AND o.order_no LIKE concat('%',#{name},'%')
...
...
platform-admin/src/main/resources/com/platform/dao/TermDao.xml
浏览文件 @
f54d3733
...
...
@@ -28,23 +28,26 @@
where id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.
vo.TermVo
"
>
<select
id=
"queryList"
resultType=
"com.platform.
entity.TermEntity
"
>
select
`id`,
`parent_id`,
`term_name`,
`term_content`,
`create_time`,
`update_time`,
`status`,
`sort`
from term
t.`id`,
t.`term_name`,
t.parent_id,
p.`term_name` parentName,
t.`term_content`,
t.`create_time`,
t.`update_time`,
t.`status`,
t.`sort`
from term t
left join term p
on t.parent_id=p.id
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND
name
LIKE concat('%',#{name},'%')
AND
t.`term_name`
LIKE concat('%',#{name},'%')
</if>
<if
test=
"parentId != null and parentId.trim() != ''"
>
AND parent_id=#{parentId}
AND
t.
parent_id=#{parentId}
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
...
...
@@ -109,7 +112,7 @@
select count(*) from term
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND
name
LIKE concat('%',#{name},'%')
AND
`term_name`
LIKE concat('%',#{name},'%')
</if>
<if
test=
"parentId != null and parentId.trim() != ''"
>
AND parent_id=#{parentId}
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcforderlist.html
浏览文件 @
f54d3733
...
...
@@ -14,6 +14,9 @@
<script
type=
"text/javascript"
src=
"http://vuejs.org/js/vue.min.js"
></script>
<script
type=
"text/javascript"
src=
"http://unpkg.com/view-design/dist/iview.min.js"
></script>
<style>
#jqGrid
tr
td
{
text-align
:
center
;
}
p
,
li
,
span
,
h1
,
h2
,
h3
,
h4
,
h5
{
/* line-height: 2em; */
}
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/term.html
浏览文件 @
f54d3733
...
...
@@ -4,9 +4,15 @@
<title></title>
#parse("sys/header.html")
</head>
<style>
.ivu-select-dropdown
{
position
:
relative
!important
;
top
:
0
!important
;
}
</style>
<body>
<div
id=
"rrapp"
v-cloak
style=
"height: calc(100% - 15px);"
>
<div
v-show=
"showList"
style=
"height: 100%;"
>
<div
v-show=
"showList"
style=
"height: 100%;"
>
<Row
:gutter=
"16"
>
<div
class=
"search-group"
>
<i-col
span=
"4"
>
...
...
@@ -27,49 +33,63 @@
#end
</div>
</Row>
<table
id=
"jqGrid"
></table>
<table
id=
"jqGrid"
></table>
</div>
<Card
v-show=
"!showList"
>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate"
:model=
"term"
:rules=
"ruleValidate"
:label-width=
"80"
>
<!-- <Form-item label="父条款ID,一级条款为0" prop="parentId">-->
<!-- <i-input v-model="term.parentId" placeholder="父条款ID,一级条款为0"/>-->
<!-- </Form-item>-->
<Form-item
label=
"条款名称"
prop=
"termName"
>
<i-form
ref=
"formValidate"
:model=
"term"
:rules=
"ruleValidate"
:label-width=
"80"
>
<!-- <Form-item label="父条款ID,一级条款为0" prop="parentId">-->
<!-- <i-input v-model="term.parentId" placeholder="父条款ID,一级条款为0"/>-->
<!-- </Form-item>-->
<Form-item
label=
"条款目录"
prop=
"parentId"
style=
"width: 800px"
:disabled=
"disabled"
>
<i-select
placeholder=
"请选择"
v-model=
"term.parentId"
v-show=
"disabled"
@
on-change=
"changeType"
>
<i-option
v-for=
"(el,i) in typeList"
:key=
'i'
:value=
"el.value"
>
{{el.label}}
</i-option>
</i-select>
<div
v-show=
"!disabled"
>
{{typelistname}}
</div>
</Form-item>
<Form-item
label=
"条款名称"
prop=
"termName"
style=
"width: 800px"
>
<i-input
v-model=
"term.termName"
placeholder=
"条款名称"
/>
</Form-item>
<span>
条款目录
</span>
<select
@
change=
"changeProduct($event)"
>
<!-- <option v-model="term.termName">Volvo</option>-->
<option
value=
"0"
>
上级目录
</option>
<option
v-for=
"(el,index) in Allfa.list"
:key=
"index"
:value=
"el.id"
>
{{el.termName}}
</option>
<!-- <option :value="audi">Audi</option>-->
</select>
<!-- <Form-item label="上级菜单" v-if="term.type == 2" prop="parentName">-->
<!-- <i-input v-model="menu.parentName" @on-click="termTree" icon="eye" readonly="readonly"-->
<!-- placeholder="一级菜单"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="上级菜单" v-if="term.type != 2">-->
<!-- <i-input v-model="menu.parentName" @on-click="termTree" icon="eye" readonly="readonly"-->
<!-- placeholder="一级菜单"/>-->
<!-- </Form-item>-->
<Form-item
label=
"条款内容"
prop=
"termContent"
v-if=
"flag"
>
<i-input
v-model=
"term.termContent"
placeholder=
"条款内容"
/>
<Form-item
label=
"序号"
prop=
"sort"
style=
"width: 800px"
>
<i-input
v-model=
"term.sort"
placeholder=
"序号"
/>
</Form-item>
<Form-item
label=
"条款内容"
prop=
"termContent"
v-if=
"!flag"
>
<i-input
v-model=
"term.termContent"
placeholder=
"父级不可用"
readonly=
"readonly"
/>
<br/>
<!-- <span>条款目录</span>-->
<!-- <select @change="changeProduct($event)">-->
<!-- <!– <option v-model="term.termName">Volvo</option>–>-->
<!-- <option value="0">上级目录</option>-->
<!-- <option v-for="(el,index) in Allfa.list" :key="index" :value="el.id">{{el.termName}}</option>-->
<!-- <!– <option :value="audi">Audi</option>–>-->
<!-- </select>-->
<!-- <Form-item label="上级菜单" v-if="term.type == 2" prop="parentName">-->
<!-- <i-input v-model="menu.parentName" @on-click="termTree" icon="eye" readonly="readonly"-->
<!-- placeholder="一级菜单"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="上级菜单" v-if="term.type != 2">-->
<!-- <i-input v-model="menu.parentName" @on-click="termTree" icon="eye" readonly="readonly"-->
<!-- placeholder="一级菜单"/>-->
<!-- </Form-item>-->
<Form-item
label=
"条款内容"
prop=
"termContent"
v-show=
"showContent"
>
<!-- <i-input v-model="term.termContent" placeholder="条款内容"/>-->
<textarea
id=
"termContent"
style=
"width: 800px;height: 600px;"
></textarea>
</Form-item>
<!-- <Form-item label="创建时间" prop="createTime">-->
<!-- <i-input v-model="term.createTime" placeholder="创建时间"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="更新时间" prop="updateTime">-->
<!-- <i-input v-model="term.updateTime" placeholder="更新时间"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="状态 0:无效 1:有效" prop="status">-->
<!-- <i-input v-model="term.status" placeholder="状态 0:无效 1:有效"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="条款内容" prop="termContent" v-if="!flag">-->
<!-- <i-input v-model="term.termContent" placeholder="父级不可用" readonly="readonly"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="创建时间" prop="createTime">-->
<!-- <i-input v-model="term.createTime" placeholder="创建时间"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="更新时间" prop="updateTime">-->
<!-- <i-input v-model="term.updateTime" placeholder="更新时间"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="状态 0:无效 1:有效" prop="status">-->
<!-- <i-input v-model="term.status" placeholder="状态 0:无效 1:有效"/>-->
<!-- </Form-item>-->
<Form-item
label=
"状态"
prop=
"status"
>
<Radio-group
v-model=
"term.status"
>
<Radio
label=
"1"
>
...
...
@@ -80,18 +100,31 @@
</Radio>
</Radio-group>
</Form-item>
<!-- <Form-item label="排序" prop="sort">-->
<!-- <i-input v-model="term.sort" placeholder="排序"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="排序" prop="sort">-->
<!-- <i-input v-model="term.sort" 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=
"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>
</Card>
</div>
<script
src=
"${rc.contextPath}/js/sys/term.js?_${date.systemTime}"
></script>
<script
type=
"text/javascript"
>
var
content
=
UE
.
getEditor
(
'termContent'
);
UE
.
Editor
.
prototype
.
_bkGetActionUrl
=
UE
.
Editor
.
prototype
.
getActionUrl
;
UE
.
Editor
.
prototype
.
getActionUrl
=
function
(
action
)
{
if
(
action
==
'uploadimage'
||
action
==
'uploadscrawl'
||
action
==
'uploadimage'
)
{
return
'${rc.contextPath}/api/osstest/uploaditemimage'
;
}
else
{
return
this
.
_bkGetActionUrl
.
call
(
this
,
action
);
}
};
</script>
</body>
</html>
\ No newline at end of file
</html>
platform-admin/src/main/webapp/js/common.js
浏览文件 @
f54d3733
...
...
@@ -603,7 +603,7 @@ statusFormat = function (cellvalue) {
*/
statusFormat1
=
function
(
cellvalue
)
{
return
cellvalue
==
1
?
'正常'
:
'
已删除
'
;
return
cellvalue
==
1
?
'正常'
:
'
无效
'
;
};
//状态 0:已删除 1:活动进行中 2:活动已关闭 3:活动已结束
...
...
platform-admin/src/main/webapp/js/sys/tbcforderList.js
浏览文件 @
f54d3733
...
...
@@ -8,19 +8,21 @@ $(function () {
{
label
:
'订单编号'
,
name
:
'orderNo'
,
index
:
'order_no'
},
{
label
:
'用户名称'
,
name
:
'userName'
,
index
:
'user_name'
},
{
label
:
'下单时间'
,
name
:
'orderTime'
,
index
:
'order_time'
},
{
label
:
'支付方式'
,
name
:
'payWayCode'
,
index
:
'pay_way_code'
},
{
label
:
'支付方式'
,
name
:
'payWayCode'
,
index
:
'pay_way_code'
,
width
:
80
},
{
label
:
'订单金额'
,
width
:
100
,
name
:
'realityPay'
,
index
:
'reality_pay'
,
formatter
:
"currency"
,
formatoptions
:
{
prefix
:
"$"
}
},
{
label
:
'订单状态'
,
name
:
'orderStatus'
,
index
:
'order_status'
,
formatter
:
orderStatusFormat
},
{
label
:
'代购状态'
,
name
:
'deliveryFlag'
,
index
:
'delivery_flag'
,
formatter
:
deliveryFlagFormat
},
{
label
:
'订单状态'
,
name
:
'orderStatus'
,
index
:
'order_status'
,
width
:
100
,
formatter
:
orderStatusFormat
},
{
label
:
'代购状态'
,
name
:
'deliveryFlag'
,
index
:
'delivery_flag'
,
width
:
100
,
formatter
:
deliveryFlagFormat
},
{
label
:
'收货人'
,
name
:
'deliveryName'
,
index
:
'delivery_name'
,
hidden
:
true
},
{
label
:
'收货人手机'
,
name
:
'deliveryPhone'
,
index
:
'delivery_phone'
,
hidden
:
true
},
{
label
:
'收货地址'
,
name
:
'deliveryAddress'
,
index
:
'delivery_address'
,
hidden
:
true
},
{
label
:
'收货人邮箱'
,
name
:
'email'
,
index
:
'email'
},
{
label
:
'流水ID'
,
name
:
'payId'
,
index
:
'pay_id'
,
hidden
:
true
},
{
label
:
'税费'
,
name
:
'tax'
,
index
:
'tax'
,
hidden
:
true
},
{
label
:
'手续费'
,
name
:
'fee'
,
index
:
'fee'
,
hidden
:
true
},
...
...
@@ -30,7 +32,7 @@ $(function () {
name
:
'操作'
,
index
:
'operate'
,
width
:
'160px'
,
formatter
:
function
(
value
,
grid
,
rows
)
{
console
.
log
(
grid
.
colModel
.
formatter
.
arguments
[
2
].
orderStatus
)
if
(
grid
.
colModel
.
formatter
.
arguments
[
2
].
orderStatus
==
10
||
grid
.
colModel
.
formatter
.
arguments
[
2
].
orderStatus
==
60
)
{
if
(
grid
.
colModel
.
formatter
.
arguments
[
2
].
orderStatus
==
10
||
grid
.
colModel
.
formatter
.
arguments
[
2
].
orderStatus
==
60
)
{
return
'<button onclick="closeList" style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; '
+
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单'
+
'</button><button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #999c9e;font-size: 10px; '
+
...
...
@@ -842,12 +844,12 @@ let vm = new Vue({
vm
.
orderClose
=
true
;
}
let
source
;
if
(
r
.
orderBasicVo
.
source
==
1
)
{
source
=
'APP'
;
}
else
if
(
r
.
orderBasicVo
.
source
==
2
)
{
source
=
'PC'
;
}
else
if
(
r
.
orderBasicVo
.
source
==
3
)
{
source
=
'MOBILE'
;
if
(
r
.
orderBasicVo
.
source
==
1
)
{
source
=
'APP'
;
}
else
if
(
r
.
orderBasicVo
.
source
==
2
)
{
source
=
'PC'
;
}
else
if
(
r
.
orderBasicVo
.
source
==
3
)
{
source
=
'MOBILE'
;
}
vm
.
basicInfoData
[
0
].
data
=
r
.
orderBasicVo
.
orderNo
;
vm
.
basicInfoData
[
1
].
data
=
r
.
orderBasicVo
.
userName
;
...
...
platform-admin/src/main/webapp/js/sys/term.js
浏览文件 @
f54d3733
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../term/list'
,
colModel
:
[
// {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
// {label: '父条款ID,一级条款为0', name: 'parentId', index: 'parent_id
', width: 80},
{
label
:
'条款名称'
,
name
:
'termName'
,
index
:
'term_n
ame'
,
width
:
80
},
{
label
:
'条款内容'
,
name
:
'termContent'
,
index
:
'term_content'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
// {label: '更新时间', name: 'updateTime', index: 'update_time', width: 80},
{
label
:
'状态 0:无效 1:有效'
,
name
:
'status'
,
index
:
'status'
,
width
:
80
},
// {label: '排序', name: 'sort', index: 'sort', width: 80}
]
colModel
:
[
// {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
{
label
:
'条款名称'
,
name
:
'termName'
,
index
:
'term_name
'
,
width
:
80
},
{
label
:
'父条款名称'
,
name
:
'parentName'
,
index
:
'parentN
ame'
,
width
:
80
},
{
label
:
'条款内容'
,
name
:
'termContent'
,
index
:
'term_content'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
// {label: '更新时间', name: 'updateTime', index: 'update_time', width: 80},
{
label
:
'状态'
,
name
:
'status'
,
index
:
'status'
,
width
:
80
,
formatter
:
statusFormat1
},
// {label: '排序', name: 'sort', index: 'sort', width: 80}
]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
el
:
'#rrapp'
,
data
:
{
disabled
:
true
,
showContent
:
false
,
typeList
:
[],
typelistname
:
''
,
showList
:
true
,
title
:
null
,
term
:
{
parentId
:
'0'
},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
},
Allfa
:{},
flag
:
false
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
term
=
{};
vm
.
getFainfo
();
},
update
:
function
(
event
)
{
term
:
{
parentId
:
'0'
},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
},
Allfa
:
{},
flag
:
false
},
methods
:
{
reloadType
(){
$
.
get
(
'../term/queryAll?parentId=0'
,
res
=>
{
console
.
log
(
'term'
,
JSON
.
parse
(
res
).
list
)
this
.
typeList
.
push
({
label
:
'一级条款'
,
value
:
"0"
});
JSON
.
parse
(
res
).
list
.
forEach
((
term
)
=>
{
console
.
log
(
'termName'
,
term
.
termName
)
this
.
typeList
.
push
({
label
:
term
.
termName
,
value
:
term
.
id
,
});
})
})
},
changeType
()
{
let
parentId
=
vm
.
term
.
parentId
;
if
(
parentId
!=
0
)
{
vm
.
showContent
=
true
}
else
{
vm
.
showContent
=
false
}
},
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showContent
=
false
;
vm
.
showList
=
false
;
vm
.
disabled
=
true
;
vm
.
title
=
"新增"
;
vm
.
term
=
{};
vm
.
getFainfo
();
},
update
:
function
(
event
)
{
vm
.
disabled
=
false
;
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
if
(
id
==
null
)
{
return
;
}
vm
.
showContent
=
false
;
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
},
saveOrUpdate
:
function
(
event
)
{
vm
.
term
.
termContent
=
encodeURI
(
UE
.
getEditor
(
'termContent'
).
getContent
());
// 富文本取值
vm
.
term
.
termContent
=
vm
.
term
.
termContent
.
replace
(
/ /g
,
" "
).
replace
(
null
,
" "
);
let
url
=
vm
.
term
.
id
==
null
?
"../term/save"
:
"../term/update"
;
Ajax
.
request
({
url
:
url
,
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
term
),
type
:
"POST"
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
if
(
ids
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../term/delete"
,
url
:
"../term/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
){
}
});
});
},
getInfo
:
function
(
id
)
{
// this.typeList=[];
Ajax
.
request
({
url
:
"../term/info/"
+
id
,
url
:
"../term/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
term
=
r
.
term
;
vm
.
typelistname
=
r
.
term
.
termName
UE
.
getEditor
(
'termContent'
).
setContent
(
vm
.
term
.
termContent
);
// 富文本赋值
let
parentId
=
vm
.
term
.
parentId
;
if
(
parentId
!=
"0"
)
{
this
.
isParent
=
true
}
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
...
...
@@ -116,43 +161,59 @@ let vm = new Vue({
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
changeProduct
(
e
)
{
vm
.
term
.
parentId
=
e
.
target
.
value
console
.
log
(
vm
.
term
.
parentId
)
if
(
vm
.
term
.
parentId
==
0
){
vm
.
flag
=
false
;
}
else
{
vm
.
flag
=
true
;
}
},
getFainfo
(){
Ajax
.
request
({
url
:
"../term/queryAll"
,
async
:
true
,
successCallback
:
function
(
r
)
{
console
.
log
(
r
)
vm
.
Allfa
=
r
}
});
}
},
created
(){
// Ajax.request({
// url: "../term/queryAll",
// async: true,
// successCallback: function (r) {
// console.log(r)
// vm.Allfa = r
// }
// });
// Ajax.request({
// url: "../term/list",
// // async: true,
// successCallback: function (r) {
// console.log(r)
// // vm.Allfa = r
// }
// });
// console.log(this.term.parentId)
}
});
\ No newline at end of file
changeProduct
(
e
)
{
vm
.
term
.
parentId
=
e
.
target
.
value
console
.
log
(
vm
.
term
.
parentId
)
if
(
vm
.
term
.
parentId
==
0
)
{
vm
.
flag
=
false
;
}
else
{
vm
.
flag
=
true
;
}
},
getFainfo
()
{
Ajax
.
request
({
url
:
"../term/queryAll"
,
async
:
true
,
successCallback
:
function
(
r
)
{
console
.
log
(
r
)
vm
.
Allfa
=
r
}
});
}
},
created
()
{
this
.
reloadType
();
// $.get('../term/queryAll?parentId=0', res => {
// console.log('term', JSON.parse(res).list)
// this.typeList.push({
// label: '一级条款',
// value: "0"
// });
// JSON.parse(res).list.forEach((term) => {
// console.log('termName', term.termName)
// this.typeList.push({
// label: term.termName,
// value: term.id,
// });
// })
//
// })
// Ajax.request({
// url: "../term/queryAll",
// async: true,
// successCallback: function (r) {
// console.log(r)
// vm.Allfa = r
// }
// });
// Ajax.request({
// url: "../term/list",
// // async: true,
// successCallback: function (r) {
// console.log(r)
// // vm.Allfa = r
// }
// });
// console.log(this.term.parentId)
}
});
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论