优化物品领用

This commit is contained in:
java110 2020-07-15 22:03:25 +08:00
parent 407fd45461
commit b4c8a38897
3 changed files with 51 additions and 54 deletions

View File

@ -12,25 +12,23 @@
<div class="ibox-content"> <div class="ibox-content">
<div class="row"> <div class="row">
<div class="col-sm-4"> <div class="col-sm-4">
<select class="custom-select" v-model="purchaseApplyManageInfo.conditions.state"> <div class="form-group">
<input type="text" placeholder="订单号"
v-model="itemOutManageInfo.conditions.applyOrderId" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="itemOutManageInfo.conditions.state">
<option selected value="">订单状态</option> <option selected value="">订单状态</option>
<option value="1000">未审核</option> <option value="1000">未审核</option>
<option value="1001">审核中</option> <option value="1001">审核中</option>
<option value="1002">已审核</option> <option value="1002">已审核</option>
</select> </select>
<!-- <select class="custom-select" v-model="purchaseApplyManageInfo.states">-->
<!-- <option selected disabled value="">请选择状态</option>-->
<!-- <option v-for="(item,index) in purchaseApplyManageInfo.states" :key="index"-->
<!-- v-bind:value="item.statusCd">{{item.name}}-->
<!-- </option>-->
<!-- </select>-->
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<input type="text" placeholder="请填写申请人姓名" <input type="text" placeholder="请填写申请人姓名"
v-model="purchaseApplyManageInfo.conditions.userName" class=" form-control"> v-model="itemOutManageInfo.conditions.userName" class=" form-control">
</div> </div>
</div> </div>
<div class="col-sm-1"> <div class="col-sm-1">
@ -49,11 +47,11 @@
<div class="col-lg-12"> <div class="col-lg-12">
<div class="ibox"> <div class="ibox">
<div class="ibox-title"> <div class="ibox-title">
<h5>出库申请信息</h5> <h5>物品申请信息</h5>
<div class="ibox-tools" style="top:10px;"> <div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddPurchaseApplyModal()"> <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddItemOutModal()">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
出库申请 物品申请
</button> </button>
</div> </div>
</div> </div>
@ -75,23 +73,23 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="purchaseApply in purchaseApplyManageInfo.purchaseApplys"> <tr v-for="itemOut in itemOutManageInfo.itemOuts">
<td class="text-center">{{purchaseApply.applyOrderId}}</td> <td class="text-center">{{itemOut.applyOrderId}}</td>
<td class="text-center">{{purchaseApply.stateName}}</td> <td class="text-center">{{itemOut.stateName}}</td>
<td class="text-center">{{purchaseApply.agreeMan}}</td> <td class="text-center">{{itemOut.agreeMan}}</td>
<td class="text-center">{{purchaseApply.userName}}</td> <td class="text-center">{{itemOut.userName}}</td>
<td class="text-center">{{purchaseApply.createTime}}</td> <td class="text-center">{{itemOut.createTime}}</td>
<td class="text-center">{{purchaseApply.resourceNames}}</td> <td class="text-center">{{itemOut.resourceNames}}</td>
<td class="text-center">{{purchaseApply.totalPrice}}</td> <td class="text-center">{{itemOut.totalPrice}}</td>
<td class="text-center"> <td class="text-center">
<div class="btn-group"> <div class="btn-group">
<button class="btn-white btn btn-xs" <button class="btn-white btn btn-xs"
v-on:click="_openDetailPurchaseApplyModel(purchaseApply)">查看 v-on:click="_openDetailItemOutModel(itemOut)">查看
</button> </button>
</div> </div>
<div class="btn-group" v-if="purchaseApply.state == '1000'"> <div class="btn-group" v-if="itemOut.state == '1000'">
<button class="btn-white btn btn-xs" <button class="btn-white btn btn-xs"
v-on:click="_openDeletePurchaseApplyModel(purchaseApply)">取消 v-on:click="_openDeleteItemOutModel(itemOut)">取消
</button> </button>
</div> </div>
</td> </td>
@ -114,7 +112,7 @@
</div> </div>
<vc:create path="common/editPurchaseApply"></vc:create> <vc:create path="common/editItemOut"></vc:create>
<vc:create path="common/deletePurchaseApply"></vc:create> <vc:create path="common/deleteItemOut"></vc:create>
</div> </div>

View File

@ -6,8 +6,8 @@
var DEFAULT_ROWS = 10; var DEFAULT_ROWS = 10;
vc.extends({ vc.extends({
data:{ data:{
purchaseApplyManageInfo:{ itemOutManageInfo:{
purchaseApplys:[], itemOuts:[],
total:0, total:0,
records:1, records:1,
moreCondition:false, moreCondition:false,
@ -21,23 +21,23 @@
} }
}, },
_initMethod:function(){ _initMethod:function(){
vc.component._listPurchaseApplys(DEFAULT_PAGE, DEFAULT_ROWS); vc.component._listItemOuts(DEFAULT_PAGE, DEFAULT_ROWS);
}, },
_initEvent:function(){ _initEvent:function(){
vc.on('purchaseApplyManage','listPurchaseApply',function(_param){ vc.on('itemOutManage','listItemOut',function(_param){
vc.component._listPurchaseApplys(DEFAULT_PAGE, DEFAULT_ROWS); vc.component._listItemOuts(DEFAULT_PAGE, DEFAULT_ROWS);
}); });
vc.on('pagination','page_event',function(_currentPage){ vc.on('pagination','page_event',function(_currentPage){
vc.component._listPurchaseApplys(_currentPage,DEFAULT_ROWS); vc.component._listItemOuts(_currentPage,DEFAULT_ROWS);
}); });
}, },
methods:{ methods:{
_listPurchaseApplys:function(_page, _rows){ _listItemOuts:function(_page, _rows){
vc.component.purchaseApplyManageInfo.conditions.page = _page; vc.component.itemOutManageInfo.conditions.page = _page;
vc.component.purchaseApplyManageInfo.conditions.row = _rows; vc.component.itemOutManageInfo.conditions.row = _rows;
var param = { var param = {
params:vc.component.purchaseApplyManageInfo.conditions params:vc.component.itemOutManageInfo.conditions
}; };
//发送get请求 //发送get请求
@ -45,12 +45,12 @@
'list', 'list',
param, param,
function(json,res){ function(json,res){
var _purchaseApplyManageInfo=JSON.parse(json); var _itemOutManageInfo=JSON.parse(json);
vc.component.purchaseApplyManageInfo.total = _purchaseApplyManageInfo.total; vc.component.itemOutManageInfo.total = _itemOutManageInfo.total;
vc.component.purchaseApplyManageInfo.records = _purchaseApplyManageInfo.records; vc.component.itemOutManageInfo.records = _itemOutManageInfo.records;
vc.component.purchaseApplyManageInfo.purchaseApplys = _purchaseApplyManageInfo.purchaseApplys; vc.component.itemOutManageInfo.itemOuts = _itemOutManageInfo.purchaseApplys;
vc.emit('pagination','init',{ vc.emit('pagination','init',{
total:vc.component.purchaseApplyManageInfo.records, total:vc.component.itemOutManageInfo.records,
currentPage:_page currentPage:_page
}); });
},function(errInfo,error){ },function(errInfo,error){
@ -58,28 +58,28 @@
} }
); );
}, },
_openAddPurchaseApplyModal:function(){ _openAddItemOutModal:function(){
vc.jumpToPage("/admin.html#/pages/common/addPurchaseApplyStep?resOrderType="+vc.component.purchaseApplyManageInfo.conditions.resOrderType); vc.jumpToPage("/admin.html#/pages/common/addItemOutStep?resOrderType="+vc.component.itemOutManageInfo.conditions.resOrderType);
}, },
_openDetailPurchaseApplyModel:function(_purchaseApply){ _openDetailItemOutModel:function(_itemOut){
vc.jumpToPage("/admin.html#/pages/common/purchaseApplyDetail?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+vc.component.purchaseApplyManageInfo.conditions.resOrderType); vc.jumpToPage("/admin.html#/pages/common/purchaseApplyDetail?applyOrderId="+_itemOut.applyOrderId+"&resOrderType="+vc.component.itemOutManageInfo.conditions.resOrderType);
}, },
_openDeletePurchaseApplyModel:function(_purchaseApply){ _openDeleteItemOutModel:function(_itemOut){
vc.emit('deletePurchaseApply','openDeletePurchaseApplyModal',_purchaseApply); vc.emit('deleteItemOut','openDeleteItemOutModal',_itemOut);
}, },
_queryPurchaseApplyMethod:function(){ _queryItemOutMethod:function(){
vc.component._listPurchaseApplys(DEFAULT_PAGE, DEFAULT_ROWS); vc.component._listItemOuts(DEFAULT_PAGE, DEFAULT_ROWS);
}, },
_moreCondition:function(){ _moreCondition:function(){
if(vc.component.purchaseApplyManageInfo.moreCondition){ if(vc.component.itemOutManageInfo.moreCondition){
vc.component.purchaseApplyManageInfo.moreCondition = false; vc.component.itemOutManageInfo.moreCondition = false;
}else{ }else{
vc.component.purchaseApplyManageInfo.moreCondition = true; vc.component.itemOutManageInfo.moreCondition = true;
} }
}, },
_queryInspectionPlanMethod:function () { _queryInspectionPlanMethod:function () {
vc.component._listPurchaseApplys(DEFAULT_PAGE, DEFAULT_ROWS); vc.component._listItemOuts(DEFAULT_PAGE, DEFAULT_ROWS);
} }

View File

@ -25,7 +25,6 @@
</select> </select>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<input type="text" placeholder="请填写申请人姓名" <input type="text" placeholder="请填写申请人姓名"