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
dc12a435
authored
Mar 15, 2019
by
PRY5YKGJ82EZEPX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
v1.0
parent
06a51f05
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
33 additions
and
30 deletions
app/Http/function.php
app/Jobs/UploadChangePrice.php
app/Model/Server/ServerFinanceModel.php
app/Model/Server/ServerPurModel.php
public/pc/js/controller/AbnormalDetail.js
public/pc/js/controller/AbnormalList.js
public/pc/js/controller/CheckingDetail.js
public/pc/js/controller/CheckingList.js
public/pc/js/controller/GoodsAuditList.js
public/pc/js/controller/GoodsList.js
public/pc/js/controller/Login.js
public/pc/js/controller/OrderDetail.js
public/pc/js/controller/OrderList.js
app/Http/function.php
View file @
dc12a435
...
...
@@ -1021,17 +1021,17 @@ function SelectDb($db,$sql){
}
function
Export
(
$errcode
=
0
,
$errmsg
=
'成功'
,
$data
=
''
){
if
(
is_array
(
$errcode
)){
echo
json_encode
([
'
errcode'
=>
$errcode
[
0
],
'err
msg'
=>
$errcode
[
1
],
'data'
=>!
empty
(
@
$errcode
[
2
])
?@
$errcode
[
2
]
:
''
],
JSON_UNESCAPED_UNICODE
|
JSON_UNESCAPED_SLASHES
);
echo
json_encode
([
'
code'
=>
$errcode
[
0
],
'
msg'
=>
$errcode
[
1
],
'data'
=>!
empty
(
@
$errcode
[
2
])
?@
$errcode
[
2
]
:
''
],
JSON_UNESCAPED_UNICODE
|
JSON_UNESCAPED_SLASHES
);
}
else
{
echo
json_encode
([
'
errcode'
=>
$errcode
,
'err
msg'
=>
$errmsg
,
'data'
=>
$data
],
JSON_UNESCAPED_UNICODE
|
JSON_UNESCAPED_SLASHES
);
echo
json_encode
([
'
code'
=>
$errcode
,
'
msg'
=>
$errmsg
,
'data'
=>
$data
],
JSON_UNESCAPED_UNICODE
|
JSON_UNESCAPED_SLASHES
);
}
exit
();
}
function
ExportLayui
(
$errcode
=
0
,
$errmsg
=
0
,
$data
=
[],
$count
=
0
,
$other
=
''
){
if
(
is_array
(
$errcode
)){
echo
json_encode
([
'code'
=>
$errcode
[
0
],
'
err
msg'
=>
$errcode
[
1
],
'data'
=>@
$errcode
[
2
],
'count'
=>@
$errcode
[
3
],
'other'
=>!
empty
(
@
$errcode
[
4
])
?
@
$errcode
[
4
]
:
''
],
JSON_UNESCAPED_UNICODE
|
JSON_UNESCAPED_SLASHES
);
echo
json_encode
([
'code'
=>
$errcode
[
0
],
'msg'
=>
$errcode
[
1
],
'data'
=>@
$errcode
[
2
],
'count'
=>@
$errcode
[
3
],
'other'
=>!
empty
(
@
$errcode
[
4
])
?
@
$errcode
[
4
]
:
''
],
JSON_UNESCAPED_UNICODE
|
JSON_UNESCAPED_SLASHES
);
}
else
{
echo
json_encode
([
'
errcode'
=>
$errcode
,
'err
msg'
=>
$errmsg
,
'data'
=>
$data
,
'count'
=>
$count
,
'other'
=>
$other
],
JSON_UNESCAPED_UNICODE
|
JSON_UNESCAPED_SLASHES
);
echo
json_encode
([
'
code'
=>
$errcode
,
'
msg'
=>
$errmsg
,
'data'
=>
$data
,
'count'
=>
$count
,
'other'
=>
$other
],
JSON_UNESCAPED_UNICODE
|
JSON_UNESCAPED_SLASHES
);
}
exit
();
}
...
...
app/Jobs/UploadChangePrice.php
View file @
dc12a435
...
...
@@ -96,13 +96,12 @@ class UploadChangePrice extends Job implements ShouldQueue
$res
[
2
]
.=
"商家商品编码不得为空
\n
"
;
$Push
=
false
;
}
if
(
!
$res
[
'1'
]){
$res
[
2
]
.=
'价格不得为空'
.
"
\n
"
;
$Push
=
false
;
}
$datas
[]
=
$res
;
}
}
#查询商品编码
if
(
$Push
===
true
){
//验证通过
$result
=
(
new
GoodsAuditModel
())
->
BacthAdd
(
$datas
);
if
(
$result
){
...
...
app/Model/Server/ServerFinanceModel.php
View file @
dc12a435
...
...
@@ -33,11 +33,13 @@ class ServerFinanceModel
print_r
(
$res
);
die
();
}
$p
=
json_decode
(
$res
,
true
);
$p
[
'code'
]
=
$p
[
'errcode'
];
unset
(
$p
[
'errcode'
]);
if
(
$type
==
1
){
echo
$res
;
exit
();
echo
json_encode
(
$p
);
}
else
{
return
json_decode
(
$res
,
true
)
;
return
$p
;
}
}
//获取对账单列表
...
...
app/Model/Server/ServerPurModel.php
View file @
dc12a435
...
...
@@ -33,11 +33,13 @@ class ServerPurModel
print_r
(
$res
);
die
();
}
$p
=
json_decode
(
$res
,
true
);
$p
[
'code'
]
=
$p
[
'errcode'
];
unset
(
$p
[
'errcode'
]);
if
(
$type
==
1
){
echo
$res
;
exit
();
echo
json_encode
(
$p
);
}
else
{
return
json_decode
(
$res
,
true
)
;
return
$p
;
}
}
//获取库存变化列表
...
...
public/pc/js/controller/AbnormalDetail.js
View file @
dc12a435
...
...
@@ -9,7 +9,7 @@
},
tableList
:
function
(
page
)
{
var
res
=
ajax_push
(
URL_YUNXIN
+
'/api/ApiAbnormalDetail'
,{
'p'
:
page
,
'abnormal_id'
:
$
(
"#abnormal_id"
).
val
()})
if
(
res
.
err
code
==
0
)
{
if
(
res
.
code
==
0
)
{
var
other
=
res
.
other
;
$
(
".abnormal_sn"
).
html
(
other
.
abnormal_sn
);
$
(
".create_time"
).
html
(
other
.
create_time
);
...
...
@@ -45,7 +45,7 @@
});
}
else
{
alert_err
(
res
.
err
msg
)
alert_err
(
res
.
msg
)
return
false
;
}
}
...
...
public/pc/js/controller/AbnormalList.js
View file @
dc12a435
...
...
@@ -31,7 +31,7 @@
'create_time2'
:
$
(
"input[name='create_time2']"
).
val
(),
}
var
res
=
ajax_push
(
URL_YUNXIN
+
'/api/ApiAbnormalList'
,
postData
)
if
(
res
.
err
code
==
0
)
{
if
(
res
.
code
==
0
)
{
var
html
=
""
;
if
(
res
.
data
.
length
>
0
)
{
for
(
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
...
...
@@ -62,7 +62,7 @@
}
});
}
else
{
alert_err
(
res
.
err
msg
)
alert_err
(
res
.
msg
)
return
false
;
}
}
...
...
public/pc/js/controller/CheckingDetail.js
View file @
dc12a435
...
...
@@ -10,7 +10,7 @@
$
(
"#changeChecking"
).
click
(
function
()
{
alert_confirm
(
"确定对账完成?"
,
function
()
{
var
res
=
ajax_push
(
"/api/ApiAccountChangeChecking"
,{
"checking_id"
:
$
(
"#checking_id"
).
val
()});
res
.
errcode
>
0
?
alert_err
(
res
.
errmsg
)
:
alert_succ
(
res
.
err
msg
,
function
()
{
res
.
code
>
0
?
alert_err
(
res
.
msg
)
:
alert_succ
(
res
.
msg
,
function
()
{
window
.
location
.
reload
()
});
})
...
...
@@ -64,7 +64,7 @@
});
}
else
{
alert_err
(
res
.
err
msg
)
alert_err
(
res
.
msg
)
return
false
;
}
}
...
...
public/pc/js/controller/CheckingList.js
View file @
dc12a435
...
...
@@ -30,7 +30,7 @@
'create_time2'
:
$
(
"#create_time2"
).
val
(),
}
var
res
=
ajax_push
(
URL_YUNXIN
+
'/api/ApiAccountCheckingList'
,
postData
)
if
(
res
.
err
code
==
0
)
{
if
(
res
.
code
==
0
)
{
var
html
=
""
;
if
(
res
.
data
.
length
>
0
)
{
for
(
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
...
...
@@ -65,7 +65,7 @@
}
});
}
else
{
alert_err
(
res
.
err
msg
)
alert_err
(
res
.
msg
)
return
false
;
}
}
...
...
public/pc/js/controller/GoodsAuditList.js
View file @
dc12a435
...
...
@@ -75,7 +75,7 @@
return
false
;
}
var
res
=
ajax_push
(
'/api/ApiGoodsAuditExmine'
,{
id
:
ids
.
join
(
','
),
'status'
:
status
})
res
.
errcode
>
0
?
alert_err
(
res
.
errmsg
)
:
alert_succ
(
res
.
err
msg
,
function
()
{
res
.
code
>
0
?
alert_err
(
res
.
msg
)
:
alert_succ
(
res
.
msg
,
function
()
{
app
.
tableList
();
})
})
...
...
public/pc/js/controller/GoodsList.js
View file @
dc12a435
...
...
@@ -76,7 +76,7 @@
,
exts
:
'csv'
,
done
:
function
(
res
){
if
(
!
res
)
return
layer
.
msg
(
'网络连接失败,请重试'
,{
icon
:
6
});
return
layer
.
msg
(
res
.
err
msg
,{
icon
:
6
});
return
layer
.
msg
(
res
.
msg
,{
icon
:
6
});
}
,
error
:
function
(){
return
layer
.
msg
(
'上传异常'
,{
icon
:
5
});
...
...
public/pc/js/controller/Login.js
View file @
dc12a435
...
...
@@ -35,10 +35,10 @@
dataType
:
'json'
,
timeout
:
10000
,
success
:
function
(
res
)
{
if
(
res
.
err
code
==
0
)
{
if
(
res
.
code
==
0
)
{
typeof
callback
==
'function'
&&
callback
(
res
);
}
else
{
$
(
".error"
).
show
().
text
(
res
.
err
msg
);
$
(
".error"
).
show
().
text
(
res
.
msg
);
return
false
;
}
},
...
...
public/pc/js/controller/OrderDetail.js
View file @
dc12a435
...
...
@@ -9,7 +9,7 @@
},
tableList
:
function
(
page
)
{
var
res
=
ajax_push
(
URL_YUNXIN
+
'/api/ApiOrderDetail'
,{
'p'
:
page
,
'order_id'
:
$
(
"#order_id"
).
val
()})
if
(
res
.
err
code
==
0
)
{
if
(
res
.
code
==
0
)
{
var
other
=
res
.
other
;
$
(
".order_sn"
).
html
(
other
.
order_sn
);
$
(
".putaway_time"
).
html
(
other
.
putaway_time
);
...
...
@@ -46,7 +46,7 @@
});
}
else
{
alert_err
(
res
.
err
msg
)
alert_err
(
res
.
msg
)
return
false
;
}
}
...
...
public/pc/js/controller/OrderList.js
View file @
dc12a435
...
...
@@ -31,7 +31,7 @@
'create_time2'
:
$
(
"input[name='create_time2']"
).
val
(),
}
var
res
=
ajax_push
(
URL_YUNXIN
+
'/api/ApiOrderList'
,
postData
)
if
(
res
.
err
code
==
0
)
{
if
(
res
.
code
==
0
)
{
var
html
=
""
;
if
(
res
.
data
.
length
>
0
)
{
for
(
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
...
...
@@ -63,7 +63,7 @@
}
});
}
else
{
alert_err
(
res
.
err
msg
)
alert_err
(
res
.
msg
)
return
false
;
}
}
...
...
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