Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
yunxin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c157aefb
authored
Jun 03, 2019
by
PRY5YKGJ82EZEPX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新修改联营sku库存
parent
8d8fe6e6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
app/Http/function.php
app/Model/Server/ServerFoostoneModel.php
public/pc/js/controller/GoodsComList.js
app/Http/function.php
View file @
c157aefb
...
...
@@ -905,11 +905,10 @@ function arrayToCommaStr($data,$col,$type=''){
}
}
/*
* /^[1-9]{1}\d{0,9}$/
* 判断是否大于0的数字,包括小数
* 判断是否大于0的正整数
*/
function
checkIn
(
$str
){
if
(
preg_match
(
"/^[1-9]
{
1}\d{0,9
}
$/"
,
$str
))
//大于0的数字,包括小数
if
(
preg_match
(
"/^[1-9]
{
1}\d{0,9
}
$/"
,
$str
))
{
return
true
;
}
else
{
...
...
app/Model/Server/ServerFoostoneModel.php
View file @
c157aefb
...
...
@@ -115,8 +115,8 @@ class ServerFoostoneModel
$purchases
=
$data
[
'purchases'
];
//梯度价
//检测梯度
foreach
(
$purchases
as
$k
=>
$v
){
if
(
empty
(
$v
)
)
continue
;
if
(
!
(
int
)
$v
)
return
[
1002
,
'阶梯数量填写不对:'
.
$v
];
if
(
$v
===
""
)
continue
;
if
(
!
checkIn
(
$v
)
)
return
[
1002
,
'阶梯数量填写不对:'
.
$v
];
if
(
$k
>
0
&&
$purchases
[
$k
]
<=
$purchases
[
$k
-
1
])
return
[
1003
,
'第'
.
(
$k
+
1
)
.
'行阶梯数量必须比上一行阶梯数量大'
];
if
(
empty
(
$price_cn
[
$k
])
&&
empty
(
$price_us
[
$k
])
)
return
[
1004
,
'阶梯数量对应国内含税价或香港交货价必填写一个'
.
$price_cn
[
$k
]];
if
(
$k
>
0
&&
$price_cn
[
$k
]
!=
""
&&
$price_cn
[
$k
]
>=
$price_cn
[
$k
-
1
])
return
[
1005
,
'第'
.
(
$k
+
1
)
.
'行国内含税价必须比上一行国内含税价小'
];
...
...
public/pc/js/controller/GoodsComList.js
View file @
c157aefb
...
...
@@ -190,7 +190,7 @@ function pureEditStock(goods_id,stock) {
},
yes
:
function
(
index
,
layero
){
//事件
//layer.close(indx
ex);
layer
.
close
(
ind
ex
);
}
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment