mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
加入我我的物品
This commit is contained in:
parent
0f947fe265
commit
65e9db5d26
@ -0,0 +1,82 @@
|
||||
<div class="animated fadeInRight ecommerce">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>查询条件</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入物品ID"
|
||||
v-model="myResourceStoreManageInfo.conditions.resId" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入物品名称"
|
||||
v-model="myResourceStoreManageInfo.conditions.resName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入物品编码"
|
||||
v-model="myResourceStoreManageInfo.conditions.resCode" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryResourceStoreMethod()">
|
||||
<i class="fa fa-search"></i> 查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>我的物品</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">物品名称</th>
|
||||
<th class="text-center">物品类型</th>
|
||||
<th class="text-center">物品编码</th>
|
||||
<th class="text-center">物品库存</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="resourceStore in myResourceStoreManageInfo.resourceStores">
|
||||
<td class="text-center">{{resourceStore.resName}}</td>
|
||||
<td class="text-center">{{resourceStore.goodsTypeName}}</td>
|
||||
<td class="text-center">{{resourceStore.resCode}}</td>
|
||||
<td class="text-center">{{resourceStore.stock}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,81 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
myResourceStoreManageInfo: {
|
||||
resourceStores: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
resName: '',
|
||||
conditions: {
|
||||
resId: '',
|
||||
resName: '',
|
||||
resCode: '',
|
||||
shId: ''
|
||||
},
|
||||
storehouses: []
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('myResourceStoreManage', 'listResourceStore', function (_param) {
|
||||
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listResourceStores(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//查询方法
|
||||
_listResourceStores: function (_page, _rows) {
|
||||
vc.component.myResourceStoreManageInfo.conditions.page = _page;
|
||||
vc.component.myResourceStoreManageInfo.conditions.row = _rows;
|
||||
vc.component.myResourceStoreManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
|
||||
var param = {
|
||||
params: vc.component.myResourceStoreManageInfo.conditions
|
||||
};
|
||||
param.params.resId = param.params.resId.trim();
|
||||
param.params.resName = param.params.resName.trim();
|
||||
param.params.resCode = param.params.resCode.trim();
|
||||
//发送get请求
|
||||
vc.http.apiGet('resourceStore.listUserStorehouses',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _myResourceStoreManageInfo = JSON.parse(json);
|
||||
vc.component.myResourceStoreManageInfo.total = _myResourceStoreManageInfo.total;
|
||||
vc.component.myResourceStoreManageInfo.records = _myResourceStoreManageInfo.records;
|
||||
vc.component.myResourceStoreManageInfo.resourceStores = _myResourceStoreManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.myResourceStoreManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
//查询
|
||||
_queryResourceStoreMethod: function () {
|
||||
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
//重置
|
||||
_resetResourceStoreMethod: function () {
|
||||
vc.component._resetResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.myResourceStoreManageInfo.moreCondition) {
|
||||
vc.component.myResourceStoreManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.myResourceStoreManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user