Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
9e7037d0
ShopXO
项目概览
starsw001
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9e7037d0
编写于
7月 30, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
弹窗支持全屏操作
上级
33f1ff9b
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
91 addition
and
28 deletion
+91
-28
application/admin/view/default/goods/module/operate.html
application/admin/view/default/goods/module/operate.html
+4
-0
application/admin/view/default/goods/save_info.html
application/admin/view/default/goods/save_info.html
+1
-1
application/admin/view/default/warehousegoods/goods_search.html
...ation/admin/view/default/warehousegoods/goods_search.html
+16
-18
application/admin/view/default/warehousegoods/index.html
application/admin/view/default/warehousegoods/index.html
+5
-3
application/service/WarehouseGoodsService.php
application/service/WarehouseGoodsService.php
+1
-1
public/static/admin/default/js/warehousegoods.js
public/static/admin/default/js/warehousegoods.js
+20
-5
public/static/common/css/common.css
public/static/common/css/common.css
+32
-0
public/static/common/js/common.js
public/static/common/js/common.js
+12
-0
未找到文件。
application/admin/view/default/goods/module/operate.html
浏览文件 @
9e7037d0
...
...
@@ -7,6 +7,10 @@
<i
class=
"am-icon-edit"
></i>
<span>
编辑
</span>
</a>
<a
class=
"am-btn am-btn-success am-btn-xs am-radius am-btn-block"
href=
"{{:MyUrl('admin/goods/saveinfo', array_merge($params, ['id'=>$module_data['id'], 'is_copy'=>1]))}}"
>
<i
class=
"am-icon-copy"
></i>
<span>
复制
</span>
</a>
<button
type=
"button"
class=
"am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete"
data-url=
"{{:MyUrl('admin/goods/delete')}}"
data-id=
"{{$module_data.id}}"
data-key=
"ids"
>
<i
class=
"am-icon-trash-o"
></i>
<span>
删除
</span>
...
...
application/admin/view/default/goods/save_info.html
浏览文件 @
9e7037d0
...
...
@@ -546,7 +546,7 @@
</div>
<div
class=
"am-form-group am-form-group-refreshing"
>
<input
type=
"hidden"
name=
"id"
{{
if
!
empty
($
data
)}}
value=
"{{$data.id}}"
{{/
if
}}
/>
<input
type=
"hidden"
name=
"id"
{{
if
isset
($
data
)
and
!
empty
($
data
['
id
'])
and
(!
isset
($
params
['
is_copy
'])
or
$
params
['
is_copy
']
neq
1
)}}
value=
"{{$data.id}}"
{{/
if
}}
/>
<button
type=
"submit"
class=
"am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block"
data-am-loading=
"{loadingText:'处理中...'}"
>
保存
</button>
</div>
</form>
...
...
application/admin/view/default/warehousegoods/goods_search.html
浏览文件 @
9e7037d0
{{if !empty($data)}}
<ul
class=
"am-gallery am-avg-sm-2 am-avg-md-4 am-avg-lg-4 am-gallery-bordered"
>
{{foreach $data as $v}}
<li
data-gid=
"{{$v.id}}"
data-add-html=
'<a href="javascript:;" class="am-icon-btn am-icon-plus am-success goods-add-submit" data-type="add"></a>'
data-del-html=
'<a href="javascript:;" class="am-icon-btn am-icon-remove am-danger goods-del-submit" data-type="del"></a>'
>
<div
class=
"am-gallery-item am-radius"
>
...
...
@@ -17,7 +16,6 @@
</div>
</li>
{{/foreach}}
</ul>
{{else /}}
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
没有相关商品
</div>
{{/if}}
\ No newline at end of file
application/admin/view/default/warehousegoods/index.html
浏览文件 @
9e7037d0
...
...
@@ -15,8 +15,8 @@
<div
class=
"am-popup-inner"
>
<div
class=
"am-popup-hd"
>
<h4
class=
"am-popup-title"
>
商品添加
</h4>
<span
data-am-modal-close
class=
"am-close"
>
×
</span>
<span
class=
"am-icon-arrows-alt am-full"
></span>
<span
data-am-modal-close
class=
"am-close"
>
×
</span>
</div>
<div
class=
"am-popup-bd am-padding-0"
>
<form
class=
"am-form am-padding-sm goods-add-container"
>
...
...
@@ -54,7 +54,9 @@
<!-- 商品列表 -->
<div
class=
"am-scrollable-vertical am-margin-top-sm am-padding-bottom-xs goods-list-container"
data-loading-msg=
"搜索中..."
data-add-url=
"{{:MyUrl('admin/warehousegoods/goodsadd')}}"
data-del-url=
"{{:MyUrl('admin/warehousegoods/goodsdel')}}"
>
<ul
class=
"am-gallery am-avg-sm-3 am-avg-md-4 am-avg-lg-5 am-gallery-bordered"
>
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
请搜索商品
</div>
</ul>
</div>
<!-- 分页 -->
...
...
application/service/WarehouseGoodsService.php
浏览文件 @
9e7037d0
...
...
@@ -756,7 +756,7 @@ class WarehouseGoodsService
'inventory'
=>
$inventory_total
,
'upd_time'
=>
time
(),
];
if
(
!
Db
::
name
(
'Goods'
)
->
where
([
'id'
=>
$goods_id
])
->
update
(
$data
)
)
if
(
Db
::
name
(
'Goods'
)
->
where
([
'id'
=>
$goods_id
])
->
update
(
$data
)
===
false
)
{
return
DataReturn
(
'商品库存同步失败'
,
-
21
);
}
...
...
public/static/admin/default/js/warehousegoods.js
浏览文件 @
9e7037d0
...
...
@@ -40,7 +40,7 @@ $(function()
var
$this
=
$
(
this
);
$this
.
button
(
'
loading
'
);
$
(
'
.goods-list-container
'
).
html
(
'
<div class="table-no"><i class="am-icon-spinner am-icon-pulse"></i>
'
+
(
$
(
'
.goods-list-container
'
).
data
(
'
loading-msg
'
))
+
'
</div>
'
);
$
(
'
.goods-list-container
ul.am-gallery
'
).
html
(
'
<div class="table-no"><i class="am-icon-spinner am-icon-pulse"></i>
'
+
(
$
(
'
.goods-list-container
'
).
data
(
'
loading-msg
'
))
+
'
</div>
'
);
$
.
ajax
({
url
:
url
,
type
:
'
post
'
,
...
...
@@ -52,18 +52,18 @@ $(function()
if
(
res
.
code
==
0
)
{
$
(
'
.goods-list-container
'
).
attr
(
'
data-is-init
'
,
0
);
$
(
'
.goods-list-container
'
).
html
(
res
.
data
.
data
);
$
(
'
.goods-list-container
ul.am-gallery
'
).
html
(
res
.
data
.
data
);
$
(
'
.goods-page-container
'
).
html
(
PageLibrary
(
res
.
data
.
total
,
res
.
data
.
page_size
,
res
.
data
.
page
,
4
));
}
else
{
Prompt
(
res
.
msg
);
$
(
'
.goods-list-container
'
).
html
(
'
<div class="table-no"><i class="am-icon-warning"></i>
'
+
res
.
msg
+
'
</div>
'
);
$
(
'
.goods-list-container
ul.am-gallery
'
).
html
(
'
<div class="table-no"><i class="am-icon-warning"></i>
'
+
res
.
msg
+
'
</div>
'
);
}
},
error
:
function
(
res
)
{
$this
.
button
(
'
reset
'
);
Prompt
(
'
请求失败
'
);
$
(
'
.goods-list-container
'
).
html
(
'
<div class="table-no"><i class="am-icon-warning"></i> 请求失败</div>
'
);
$
(
'
.goods-list-container
ul.am-gallery
'
).
html
(
'
<div class="table-no"><i class="am-icon-warning"></i> 请求失败</div>
'
);
}
});
});
...
...
@@ -105,5 +105,20 @@ $(function()
});
});
// 弹窗全屏
$
(
'
#warehouse-goods-popup
'
).
on
(
'
click
'
,
'
.am-popup-hd .am-full
'
,
function
()
{
var
width
=
$
(
window
).
width
();
var
height
=
$
(
window
).
height
();
if
(
width
>=
630
&&
height
>=
630
)
{
var
$parent
=
$
(
this
).
parents
(
'
.am-popup
'
);
if
(
$parent
.
hasClass
(
'
popup-full
'
))
{
$parent
.
find
(
'
.am-gallery
'
).
addClass
(
'
am-avg-lg-5
'
).
removeClass
(
'
am-avg-lg-8
'
);
}
else
{
$parent
.
find
(
'
.am-gallery
'
).
addClass
(
'
am-avg-lg-8
'
).
removeClass
(
'
am-avg-lg-6
'
);
}
}
});
});
\ No newline at end of file
public/static/common/css/common.css
浏览文件 @
9e7037d0
...
...
@@ -107,6 +107,38 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view, .content-app-ite
.popup-not-title
.am-close
:hover
{
background
:
#f22a30
;
}
.am-popup-hd
.am-close
,
.am-popup-hd
.am-full
{
width
:
26px
;
height
:
26px
;
line-height
:
26px
;
color
:
#999
;
text-align
:
center
;
}
.am-popup-hd
.am-close
{
font-size
:
22px
;
opacity
:
1
;
}
.am-popup-hd
.am-close
:hover
{
color
:
#f22a30
;
transform
:
none
;
}
.am-popup-hd
.am-full
{
position
:
absolute
;
right
:
40px
;
top
:
11px
;
cursor
:
pointer
;
}
.am-popup-hd
.am-full
:hover
{
color
:
#03A9F4
;
}
.popup-full
{
width
:
100%
;
height
:
100%
;
left
:
0
;
top
:
0
;
margin-left
:
0
;
margin-top
:
0
;
}
/**
...
...
public/static/common/js/common.js
浏览文件 @
9e7037d0
...
...
@@ -2498,4 +2498,16 @@ $(function()
MapInit
(
lng
,
lat
,
null
,
null
,
false
);
});
// 弹窗全屏
$
(
document
).
on
(
'
click
'
,
'
.am-popup-hd .am-full
'
,
function
()
{
var
$parent
=
$
(
this
).
parents
(
'
.am-popup
'
);
if
(
$parent
.
hasClass
(
'
popup-full
'
))
{
$parent
.
removeClass
(
'
popup-full
'
);
}
else
{
$parent
.
addClass
(
'
popup-full
'
);
}
});
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录