Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
3351124c
ShopXO
项目概览
jcy2004x
/
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,发现更多精彩内容 >>
提交
3351124c
编写于
2月 25, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into v1.3.0
上级
7703aea2
90b7ad03
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
36 deletion
+26
-36
application/admin/view/default/goods/save_info.html
application/admin/view/default/goods/save_info.html
+2
-2
application/service/GoodsService.php
application/service/GoodsService.php
+4
-0
config/shopxo.sql
config/shopxo.sql
+20
-34
未找到文件。
application/admin/view/default/goods/save_info.html
浏览文件 @
3351124c
...
...
@@ -188,7 +188,7 @@
<input
type=
"number"
name=
"specifications_number[]"
placeholder=
"库存"
class=
"am-radius"
min=
"1"
max=
"100000000"
pattern=
"^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$"
data-validation-message=
"库存数量 1~100000000"
required
/>
</td>
<td>
<input
type=
"number"
name=
"specifications_weight[]"
placeholder=
"重量"
class=
"am-radius"
maxlength=
"80"
data-validation-message=
"请填写有效的规格重量
"
/>
<input
type=
"number"
name=
"specifications_weight[]"
placeholder=
"重量"
class=
"am-radius"
maxlength=
"80"
min=
"0.00"
max=
"100000000.00"
step=
"0.01"
data-validation-message=
"规格重量 0.00~100000000.00
"
/>
</td>
<td>
<input
type=
"text"
name=
"specifications_coding[]"
placeholder=
"编码"
class=
"am-radius"
maxlength=
"80"
data-validation-message=
"规格编码最多80个字符"
/>
...
...
@@ -225,7 +225,7 @@
<input
type=
"number"
name=
"specifications_number[]"
placeholder=
"库存"
class=
"am-radius"
min=
"0"
max=
"100000000"
data-validation-message=
"库存数量 0~100000000"
value=
"{{$v.data.inventory}}"
required
/>
</td>
<td>
<input
type=
"number"
name=
"specifications_weight[]"
placeholder=
"重量"
class=
"am-radius"
min=
"0
"
max=
"100000000"
data-validation-message=
"规格重量 0~1000000
00"
value=
"{{if $v['data']['weight'] gt 0}}{{$v.data.weight}}{{/if}}"
/>
<input
type=
"number"
name=
"specifications_weight[]"
placeholder=
"重量"
class=
"am-radius"
min=
"0
.00"
max=
"100000000.00"
step=
"0.01"
data-validation-message=
"规格重量 0.00~100000000.
00"
value=
"{{if $v['data']['weight'] gt 0}}{{$v.data.weight}}{{/if}}"
/>
</td>
<td>
<input
type=
"text"
name=
"specifications_coding[]"
placeholder=
"编码"
class=
"am-radius"
maxlength=
"80"
data-validation-message=
"规格编码最多80个字符"
value=
"{{$v.data.coding}}"
/>
...
...
application/service/GoodsService.php
浏览文件 @
3351124c
...
...
@@ -1666,6 +1666,7 @@ class GoodsService
foreach
(
$value
as
$k
=>&
$v
)
{
$base
=
Db
::
name
(
'GoodsSpecBase'
)
->
find
(
$k
);
$base
[
'weight'
]
=
PriceBeautify
(
$base
[
'weight'
]);
$v
[]
=
[
'data_type'
=>
'base'
,
'data'
=>
$base
,
...
...
@@ -1674,6 +1675,7 @@ class GoodsService
}
}
else
{
$base
=
Db
::
name
(
'GoodsSpecBase'
)
->
where
(
$where
)
->
find
();
$base
[
'weight'
]
=
PriceBeautify
(
$base
[
'weight'
]);
$value
[][]
=
[
'data_type'
=>
'base'
,
'data'
=>
$base
,
...
...
@@ -1770,6 +1772,7 @@ class GoodsService
if
(
!
empty
(
$base_id
))
{
$base
=
Db
::
name
(
'GoodsSpecBase'
)
->
find
(
$base_id
);
$base
[
'weight'
]
=
PriceBeautify
(
$base
[
'weight'
]);
if
(
!
empty
(
$base
))
{
return
DataReturn
(
'操作成功'
,
0
,
$base
);
...
...
@@ -1779,6 +1782,7 @@ class GoodsService
}
}
else
{
$base
=
Db
::
name
(
'GoodsSpecBase'
)
->
where
(
$where
)
->
find
();
$base
[
'weight'
]
=
PriceBeautify
(
$base
[
'weight'
]);
if
(
!
empty
(
$base
))
{
return
DataReturn
(
'操作成功'
,
0
,
$base
);
...
...
config/shopxo.sql
浏览文件 @
3351124c
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录