Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_53077510
production_ssm
提交
010c69d8
P
production_ssm
项目概览
weixin_53077510
/
production_ssm
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
production_ssm
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
010c69d8
编写于
9月 30, 2016
作者:
M
megagao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除了文件
上级
f4a0217e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
42 addition
and
194 deletion
+42
-194
src/main/java/org/hqu/production_ms/domain/Custom.java
src/main/java/org/hqu/production_ms/domain/Custom.java
+0
-10
src/main/java/org/hqu/production_ms/domain/CustomExample.java
...main/java/org/hqu/production_ms/domain/CustomExample.java
+0
-70
src/main/java/org/hqu/production_ms/mapper/CustomMapper.xml
src/main/java/org/hqu/production_ms/mapper/CustomMapper.xml
+4
-18
src/main/webapp/WEB-INF/jsp/custom_list.jsp
src/main/webapp/WEB-INF/jsp/custom_list.jsp
+38
-96
未找到文件。
src/main/java/org/hqu/production_ms/domain/Custom.java
浏览文件 @
010c69d8
...
...
@@ -19,8 +19,6 @@ public class Custom {
private
Integer
status
;
private
String
managerTel
;
private
String
note
;
public
String
getCustomId
()
{
...
...
@@ -95,14 +93,6 @@ public class Custom {
this
.
status
=
status
;
}
public
String
getManagerTel
()
{
return
managerTel
;
}
public
void
setManagerTel
(
String
managerTel
)
{
this
.
managerTel
=
managerTel
==
null
?
null
:
managerTel
.
trim
();
}
public
String
getNote
()
{
return
note
;
}
...
...
src/main/java/org/hqu/production_ms/domain/CustomExample.java
浏览文件 @
010c69d8
...
...
@@ -724,76 +724,6 @@ public class CustomExample {
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelIsNull
()
{
addCriterion
(
"manager_tel is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelIsNotNull
()
{
addCriterion
(
"manager_tel is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelEqualTo
(
String
value
)
{
addCriterion
(
"manager_tel ="
,
value
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelNotEqualTo
(
String
value
)
{
addCriterion
(
"manager_tel <>"
,
value
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelGreaterThan
(
String
value
)
{
addCriterion
(
"manager_tel >"
,
value
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"manager_tel >="
,
value
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelLessThan
(
String
value
)
{
addCriterion
(
"manager_tel <"
,
value
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"manager_tel <="
,
value
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelLike
(
String
value
)
{
addCriterion
(
"manager_tel like"
,
value
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelNotLike
(
String
value
)
{
addCriterion
(
"manager_tel not like"
,
value
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelIn
(
List
<
String
>
values
)
{
addCriterion
(
"manager_tel in"
,
values
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"manager_tel not in"
,
values
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"manager_tel between"
,
value1
,
value2
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andManagerTelNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"manager_tel not between"
,
value1
,
value2
,
"managerTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNoteIsNull
()
{
addCriterion
(
"note is null"
);
return
(
Criteria
)
this
;
...
...
src/main/java/org/hqu/production_ms/mapper/CustomMapper.xml
浏览文件 @
010c69d8
...
...
@@ -11,7 +11,6 @@
<result
column=
"owner_name"
property=
"ownerName"
jdbcType=
"VARCHAR"
/>
<result
column=
"owner_tel"
property=
"ownerTel"
jdbcType=
"VARCHAR"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"INTEGER"
/>
<result
column=
"manager_tel"
property=
"managerTel"
jdbcType=
"VARCHAR"
/>
<result
column=
"note"
property=
"note"
jdbcType=
"VARCHAR"
/>
</resultMap>
...
...
@@ -40,6 +39,7 @@
</update>
<sql
id=
"Example_Where_Clause"
>
<where
>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
...
...
@@ -100,7 +100,7 @@
</sql>
<sql
id=
"Base_Column_List"
>
custom_id, custom_name, full_name, address, fax, email, owner_name, owner_tel, status,
manager_tel,
note
note
</sql>
<select
id=
"selectByExample"
resultMap=
"BaseResultMap"
parameterType=
"org.hqu.production_ms.domain.CustomExample"
>
select
...
...
@@ -136,11 +136,11 @@
insert into custom (custom_id, custom_name, full_name,
address, fax, email,
owner_name, owner_tel, status,
manager_tel,
note)
note)
values (#{customId,jdbcType=VARCHAR}, #{customName,jdbcType=VARCHAR}, #{fullName,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{fax,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
#{ownerName,jdbcType=VARCHAR}, #{ownerTel,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{
managerTel,jdbcType=VARCHAR}, #{
note,jdbcType=VARCHAR})
#{note,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"org.hqu.production_ms.domain.Custom"
>
insert into custom
...
...
@@ -172,9 +172,6 @@
<if
test=
"status != null"
>
status,
</if>
<if
test=
"managerTel != null"
>
manager_tel,
</if>
<if
test=
"note != null"
>
note,
</if>
...
...
@@ -207,9 +204,6 @@
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"managerTel != null"
>
#{managerTel,jdbcType=VARCHAR},
</if>
<if
test=
"note != null"
>
#{note,jdbcType=VARCHAR},
</if>
...
...
@@ -251,9 +245,6 @@
<if
test=
"record.status != null"
>
status = #{record.status,jdbcType=INTEGER},
</if>
<if
test=
"record.managerTel != null"
>
manager_tel = #{record.managerTel,jdbcType=VARCHAR},
</if>
<if
test=
"record.note != null"
>
note = #{record.note,jdbcType=VARCHAR},
</if>
...
...
@@ -273,7 +264,6 @@
owner_name = #{record.ownerName,jdbcType=VARCHAR},
owner_tel = #{record.ownerTel,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
manager_tel = #{record.managerTel,jdbcType=VARCHAR},
note = #{record.note,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -306,9 +296,6 @@
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"managerTel != null"
>
manager_tel = #{managerTel,jdbcType=VARCHAR},
</if>
<if
test=
"note != null"
>
note = #{note,jdbcType=VARCHAR},
</if>
...
...
@@ -325,7 +312,6 @@
owner_name = #{ownerName,jdbcType=VARCHAR},
owner_tel = #{ownerTel,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
manager_tel = #{managerTel,jdbcType=VARCHAR},
note = #{note,jdbcType=VARCHAR}
where custom_id = #{customId,jdbcType=VARCHAR}
</update>
...
...
src/main/webapp/WEB-INF/jsp/custom_list.jsp
浏览文件 @
010c69d8
<%@ page
language=
"java"
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%>
<table
class=
"easyui-datagrid"
id=
"
itemList"
title=
"商品
列表"
data-options=
"singleSelect:false,collapsible:true,pagination:true,url:'
/ite
m/list',method:'get',pageSize:30,toolbar:toolbar"
>
<table
class=
"easyui-datagrid"
id=
"
customList"
title=
"订单
列表"
data-options=
"singleSelect:false,collapsible:true,pagination:true,url:'
custo
m/list',method:'get',pageSize:30,toolbar:toolbar"
>
<thead>
<tr>
<th
data-options=
"field:'ck',checkbox:true"
></th>
<th
data-options=
"field:'
id',width:60"
>
商品ID
</th>
<th
data-options=
"field:'
title',width:200"
>
商品标题
</th>
<th
data-options=
"field:'
cid',width:100"
>
叶子类目
</th>
<th
data-options=
"field:'
sellPoint',width:100"
>
卖点
</th>
<th
data-options=
"field:'
price',width:70,align:'right',formatter:TAOTAO.formatPrice"
>
价格
</th>
<th
data-options=
"field:'
num',width:70,align:'right'"
>
库存数量
</th>
<th
data-options=
"field:'
barcode',width:100"
>
条形码
</th>
<th
data-options=
"field:'
status',width:60,align:'center',formatter:TAOTAO.formatItemStatus"
>
状态
</th>
<th
data-options=
"field:'
created',width:130,align:'center',formatter:TAOTAO.formatDateTime"
>
创建日期
</th>
<th
data-options=
"field:'
updated',width:130,align:'center',formatter:TAOTAO.formatDateTime"
>
更新日期
</th>
<th
data-options=
"field:'
customId',width:100"
>
客户编号
</th>
<th
data-options=
"field:'
customName',width:100"
>
客户名称
</th>
<th
data-options=
"field:'
fullName',width:200"
>
客户全称
</th>
<th
data-options=
"field:'
address',width:100"
>
地址
</th>
<th
data-options=
"field:'
fax',width:100,align:'right'"
>
传真
</th>
<th
data-options=
"field:'
email',width:100,align:'right'"
>
邮箱
</th>
<th
data-options=
"field:'
ownerName',width:60,align:'center'"
>
经理姓名
</th>
<th
data-options=
"field:'
ownerTel',width:100,align:'center'"
>
联系电话
</th>
<th
data-options=
"field:'
status',width:60,align:'center',formatter:TAOTAO.formatCustomStatus"
>
客户状态
</th>
<th
data-options=
"field:'
note',width:130,align:'center'"
>
备注
</th>
</tr>
</thead>
</table>
<div
id=
"
itemEditWindow"
class=
"easyui-window"
title=
"编辑商品"
data-options=
"modal:true,closed:true,iconCls:'icon-save',href:'/rest/page/item-edit'"
style=
"width:80
%;height:80%;padding:10px;"
>
<div
id=
"
customEditWindow"
class=
"easyui-window"
title=
"编辑订单"
data-options=
"modal:true,closed:true,iconCls:'icon-save',href:'custom/edit'"
style=
"width:65
%;height:80%;padding:10px;"
>
</div>
<script>
function
getSelectionsIds
(){
var
itemList
=
$
(
"
#ite
mList
"
);
var
sels
=
ite
mList
.
datagrid
(
"
getSelections
"
);
var
customList
=
$
(
"
#custo
mList
"
);
var
sels
=
custo
mList
.
datagrid
(
"
getSelections
"
);
var
ids
=
[];
for
(
var
i
in
sels
){
ids
.
push
(
sels
[
i
].
i
d
);
ids
.
push
(
sels
[
i
].
customI
d
);
}
ids
=
ids
.
join
(
"
,
"
);
ids
=
ids
.
join
(
"
,
"
);
return
ids
;
}
...
...
@@ -36,72 +37,29 @@
text
:
'
新增
'
,
iconCls
:
'
icon-add
'
,
handler
:
function
(){
$
(
"
.tree-title:contains('新增
商品
')
"
).
parent
().
click
();
$
(
"
.tree-title:contains('新增
客户
')
"
).
parent
().
click
();
}
},{
text
:
'
编辑
'
,
iconCls
:
'
icon-edit
'
,
handler
:
function
(){
var
ids
=
getSelectionsIds
();
if
(
ids
.
length
==
0
){
$
.
messager
.
alert
(
'
提示
'
,
'
必须选择一个
商品
才能编辑!
'
);
$
.
messager
.
alert
(
'
提示
'
,
'
必须选择一个
客户
才能编辑!
'
);
return
;
}
if
(
ids
.
indexOf
(
'
,
'
)
>
0
){
$
.
messager
.
alert
(
'
提示
'
,
'
只能选择一个
商品
!
'
);
$
.
messager
.
alert
(
'
提示
'
,
'
只能选择一个
客户
!
'
);
return
;
}
$
(
"
#
ite
mEditWindow
"
).
window
({
$
(
"
#
custo
mEditWindow
"
).
window
({
onLoad
:
function
(){
//回显数据
var
data
=
$
(
"
#itemList
"
).
datagrid
(
"
getSelections
"
)[
0
];
data
.
priceView
=
TAOTAO
.
formatPrice
(
data
.
price
);
$
(
"
#itemeEditForm
"
).
form
(
"
load
"
,
data
);
// 加载商品描述
$
.
getJSON
(
'
/rest/item/query/item/desc/
'
+
data
.
id
,
function
(
_data
){
if
(
_data
.
status
==
200
){
//UM.getEditor('itemeEditDescEditor').setContent(_data.data.itemDesc, false);
itemEditEditor
.
html
(
_data
.
data
.
itemDesc
);
}
});
var
data
=
$
(
"
#customList
"
).
datagrid
(
"
getSelections
"
)[
0
];
$
(
"
#customEditForm
"
).
form
(
"
load
"
,
data
);
//加载商品规格
$
.
getJSON
(
'
/rest/item/param/item/query/
'
+
data
.
id
,
function
(
_data
){
if
(
_data
&&
_data
.
status
==
200
&&
_data
.
data
&&
_data
.
data
.
paramData
){
$
(
"
#itemeEditForm .params
"
).
show
();
$
(
"
#itemeEditForm [name=itemParams]
"
).
val
(
_data
.
data
.
paramData
);
$
(
"
#itemeEditForm [name=itemParamId]
"
).
val
(
_data
.
data
.
id
);
//回显商品规格
var
paramData
=
JSON
.
parse
(
_data
.
data
.
paramData
);
var
html
=
"
<ul>
"
;
for
(
var
i
in
paramData
){
var
pd
=
paramData
[
i
];
html
+=
"
<li><table>
"
;
html
+=
"
<tr><td colspan=
\"
2
\"
class=
\"
group
\"
>
"
+
pd
.
group
+
"
</td></tr>
"
;
for
(
var
j
in
pd
.
params
){
var
ps
=
pd
.
params
[
j
];
html
+=
"
<tr><td class=
\"
param
\"
><span>
"
+
ps
.
k
+
"
</span>: </td><td><input autocomplete=
\"
off
\"
type=
\"
text
\"
value='
"
+
ps
.
v
+
"
'/></td></tr>
"
;
}
html
+=
"
</li></table>
"
;
}
html
+=
"
</ul>
"
;
$
(
"
#itemeEditForm .params td
"
).
eq
(
1
).
html
(
html
);
}
});
TAOTAO
.
init
({
"
pics
"
:
data
.
image
,
"
cid
"
:
data
.
cid
,
fun
:
function
(
node
){
TAOTAO
.
changeItemParam
(
node
,
"
itemeEditForm
"
);
}
});
}
}).
window
(
"
open
"
);
}
...
...
@@ -111,16 +69,16 @@
handler
:
function
(){
var
ids
=
getSelectionsIds
();
if
(
ids
.
length
==
0
){
$
.
messager
.
alert
(
'
提示
'
,
'
未选中
商品
!
'
);
$
.
messager
.
alert
(
'
提示
'
,
'
未选中
客户
!
'
);
return
;
}
$
.
messager
.
confirm
(
'
确认
'
,
'
确定删除ID为
'
+
ids
+
'
的
商品
吗?
'
,
function
(
r
){
$
.
messager
.
confirm
(
'
确认
'
,
'
确定删除ID为
'
+
ids
+
'
的
客户
吗?
'
,
function
(
r
){
if
(
r
){
var
params
=
{
"
ids
"
:
ids
};
$
.
post
(
"
/rest/item/delete
"
,
params
,
function
(
data
){
$
.
post
(
"
custom/delete_batch
"
,
params
,
function
(
data
){
if
(
data
.
status
==
200
){
$
.
messager
.
alert
(
'
提示
'
,
'
删除
商品
成功!
'
,
undefined
,
function
(){
$
(
"
#
ite
mList
"
).
datagrid
(
"
reload
"
);
$
.
messager
.
alert
(
'
提示
'
,
'
删除
客户
成功!
'
,
undefined
,
function
(){
$
(
"
#
custo
mList
"
).
datagrid
(
"
reload
"
);
});
}
});
...
...
@@ -133,16 +91,16 @@
handler
:
function
(){
var
ids
=
getSelectionsIds
();
if
(
ids
.
length
==
0
){
$
.
messager
.
alert
(
'
提示
'
,
'
未选中
商品
!
'
);
$
.
messager
.
alert
(
'
提示
'
,
'
未选中
客户
!
'
);
return
;
}
$
.
messager
.
confirm
(
'
确认
'
,
'
确定下架ID为
'
+
ids
+
'
的
商品
吗?
'
,
function
(
r
){
$
.
messager
.
confirm
(
'
确认
'
,
'
确定下架ID为
'
+
ids
+
'
的
客户
吗?
'
,
function
(
r
){
if
(
r
){
var
params
=
{
"
ids
"
:
ids
};
$
.
post
(
"
/rest/
ite
m/instock
"
,
params
,
function
(
data
){
$
.
post
(
"
/rest/
custo
m/instock
"
,
params
,
function
(
data
){
if
(
data
.
status
==
200
){
$
.
messager
.
alert
(
'
提示
'
,
'
下架
商品
成功!
'
,
undefined
,
function
(){
$
(
"
#
ite
mList
"
).
datagrid
(
"
reload
"
);
$
.
messager
.
alert
(
'
提示
'
,
'
下架
客户
成功!
'
,
undefined
,
function
(){
$
(
"
#
custo
mList
"
).
datagrid
(
"
reload
"
);
});
}
});
...
...
@@ -150,26 +108,10 @@
});
}
},{
text
:
'
上架
'
,
iconCls
:
'
icon-re
move
'
,
text
:
'
刷新
'
,
iconCls
:
'
icon-re
load
'
,
handler
:
function
(){
var
ids
=
getSelectionsIds
();
if
(
ids
.
length
==
0
){
$
.
messager
.
alert
(
'
提示
'
,
'
未选中商品!
'
);
return
;
}
$
.
messager
.
confirm
(
'
确认
'
,
'
确定上架ID为
'
+
ids
+
'
的商品吗?
'
,
function
(
r
){
if
(
r
){
var
params
=
{
"
ids
"
:
ids
};
$
.
post
(
"
/rest/item/reshelf
"
,
params
,
function
(
data
){
if
(
data
.
status
==
200
){
$
.
messager
.
alert
(
'
提示
'
,
'
上架商品成功!
'
,
undefined
,
function
(){
$
(
"
#itemList
"
).
datagrid
(
"
reload
"
);
});
}
});
}
});
$
(
"
#customList
"
).
datagrid
(
"
reload
"
);
}
}];
</script>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录