mirror of
https://github.com/mojuncong/psi.git
synced 2025-10-09 14:25:47 +08:00
5/20
This commit is contained in:
parent
87d1ea6f18
commit
69da4f7bec
5 changed files with 135 additions and 2 deletions
|
@ -3,10 +3,19 @@
|
||||||
namespace Mobile\Controller;
|
namespace Mobile\Controller;
|
||||||
|
|
||||||
use Think\Controller;
|
use Think\Controller;
|
||||||
|
use Mobile\Service\GoodsQueryService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class GoodsQueryController extends Controller{
|
class GoodsQueryController extends Controller{
|
||||||
public function querry(){
|
public function querygoodsprice(){
|
||||||
$this->assign("uri", __ROOT__ . "/");
|
$this->assign("uri", __ROOT__ . "/");
|
||||||
$this->display();
|
$this->display();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function select(){
|
||||||
|
$this->assign("uri", __ROOT__ . "/");
|
||||||
|
$selected= new GoodsQueryService();
|
||||||
|
$this->ajaxReturn($selected->warehouse());
|
||||||
|
}
|
||||||
}
|
}
|
11
web/Application/Mobile/Service/GoodsQueryService.class.php
Normal file
11
web/Application/Mobile/Service/GoodsQueryService.class.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
namespace Mobile\Service;
|
||||||
|
class GoodsQueryService {
|
||||||
|
public function warehouse(){
|
||||||
|
$sql="select code,name from t_warehouse";
|
||||||
|
$warehouse=M()->query($sql);
|
||||||
|
return $warehouse;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
91
web/Application/Mobile/View/GoodsQuery/querygoodsprice.html
Normal file
91
web/Application/Mobile/View/GoodsQuery/querygoodsprice.html
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html >
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
||||||
|
<title>商品价格查询</title>
|
||||||
|
<link rel="stylesheet" href="{$uri}Public/mui/css/mui.min.css">
|
||||||
|
<link rel="stylesheet" href="{$uri}Public/mui/css/style.css">
|
||||||
|
<style>
|
||||||
|
.area {
|
||||||
|
margin: 20px auto 0px auto;
|
||||||
|
}
|
||||||
|
.mui-input-group {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.mui-input-group:first-child {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.mui-input-group label {
|
||||||
|
width: 22%;
|
||||||
|
}
|
||||||
|
.mui-input-row label~input,
|
||||||
|
.mui-input-row label~select,
|
||||||
|
.mui-input-row label~textarea {
|
||||||
|
width: 78%;
|
||||||
|
}
|
||||||
|
.mui-checkbox input[type=checkbox],
|
||||||
|
.mui-radio input[type=radio] {
|
||||||
|
top: 6px;
|
||||||
|
}
|
||||||
|
.mui-content-padded {
|
||||||
|
margin-top: 25px;
|
||||||
|
}
|
||||||
|
.mui-btn {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.link-area {
|
||||||
|
display: block;
|
||||||
|
margin-top: 25px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.spliter {
|
||||||
|
color: #bbb;
|
||||||
|
padding: 0px 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body >
|
||||||
|
<div class="mui-content">
|
||||||
|
<div >
|
||||||
|
<form id='querryprice-form' class="mui-input-group">
|
||||||
|
<div class="mui-input-row">
|
||||||
|
<label>商品</label>
|
||||||
|
<input id='goods' type="text" class="mui-input-clear mui-input">
|
||||||
|
</div>
|
||||||
|
<div class="mui-input-row">
|
||||||
|
<label>仓库</label>
|
||||||
|
|
||||||
|
<select id="wareHouseIdSelect" >
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="{$uri}Public/mui/js/mui.min.js"></script>
|
||||||
|
<script src="{$uri}Public/mui/js/jquery-2.1.4.min.js"></script>
|
||||||
|
<script src="{$uri}Public/mui/js/goodsquery.js"></script>
|
||||||
|
<script>
|
||||||
|
var uri="{$uri}";
|
||||||
|
var wareHouseIdSelectd=document.getElementById('wareHouseIdSelect');
|
||||||
|
window.onload=function(){
|
||||||
|
selects(wareHouseIdSelect);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<ul class="mui-table-view mui-grid-view mui-grid-9">
|
<ul class="mui-table-view mui-grid-view mui-grid-9">
|
||||||
<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
|
<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
|
||||||
<a href="{$uri}/Mobile/Index/about"> <span class="mui-icon mui-icon-list"></span>
|
<a href="{$uri}/Mobile/GoodsQuery/querygoodsprice"> <span class="mui-icon mui-icon-list"></span>
|
||||||
<div class="mui-media-body">价格查询</div>
|
<div class="mui-media-body">价格查询</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
22
web/Public/mui/js/goodsquery.js
Normal file
22
web/Public/mui/js/goodsquery.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* 商品查询
|
||||||
|
*/
|
||||||
|
|
||||||
|
function selects(wareHouseIdSelect){
|
||||||
|
wareHouseIdSelect=wareHouseIdSelect;
|
||||||
|
|
||||||
|
$.post(window.uri+"Mobile/GoodsQuery/select",
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
function(data){
|
||||||
|
$.each(data,function(key,value){
|
||||||
|
$(wareHouseIdSelectd).append("<option value="+value["code"]+">"+value["name"]+"</option>");
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue