提交出库页面

This commit is contained in:
曾成 2020-04-03 16:01:51 +08:00
parent 117d88d336
commit 7555ee2f30
5 changed files with 127 additions and 148 deletions

View File

@ -12,12 +12,15 @@
resourceStores:[],
description:'',
file:'',
resOrderType:'10000'
resOrderType:''
}
}
},
_initMethod: function () {
vc.component._initStep();
//10000 采购 20000出库
vc.component.addPurchaseApplyStepInfo.purchaseApply.resOrderType = vc.getParam('resOrderType');
console.log("订单类型:"+vc.getParam('resOrderType'));
},
_initEvent: function () {
vc.on("addPurchaseApplyStep", "notify", function (viewResourceStoreInfo2) {
@ -85,7 +88,12 @@
if (res.status == 200) {
//关闭model
vc.jumpToPage("/admin.html#/purchaseApplyManage");
if(vc.component.addPurchaseApplyStepInfo.purchaseApply.resOrderType == "10000"){
vc.jumpToPage("/admin.html#/purchaseApplyManage");
}else{
vc.jumpToPage("/admin.html#/itemOutManage");
}
return;
}
vc.message(json);

View File

@ -1,4 +1,5 @@
<div class="animated fadeInRight ecommerce">
<div id="component" class="wrapper wrapper-content animated fadeInRight ecommerce">
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
@ -11,78 +12,88 @@
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入物品ID"
v-model="resourceStoreManageInfo.conditions.resId" class=" form-control">
</div>
<select class="custom-select" v-model="purchaseApplyManageInfo.conditions.state">
<option selected value="">订单状态</option>
<option value="1000">未审核</option>
<option value="1001">审核中</option>
<option value="1002">已审核</option>
</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 class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入物品名称"
v-model="resourceStoreManageInfo.conditions.resName" class=" form-control">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请输入物品编码"
v-model="resourceStoreManageInfo.conditions.resCode" class=" form-control">
<input type="text" placeholder="请填写申请人姓名"
v-model="purchaseApplyManageInfo.conditions.userName" class=" form-control">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryResourceStoreMethod()">
v-on:click="_queryInspectionPlanMethod()">
<i class="fa fa-search"></i> 查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-9">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>物品信息</h5>
<!-- <div class="ibox-tools" style="top:10px;">-->
<!-- <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddResourceStoreModal()">-->
<!-- <i class="fa fa-plus"></i>-->
<!-- 添加-->
<!-- </button>-->
<!-- </div>-->
<h5>采购申请信息</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddPurchaseApplyModal()">
<i class="fa fa-plus"></i>
出库申请
</button>
</div>
</div>
<div class="ibox-content">
<table class="table shoping-cart-table"
<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>
<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 resourceStoreManageInfo.resourceStores">
<td class="desc">
<h3>
<a class="text-navy">
{{resourceStore.resName}}
</a>
</h3>
<p class="small">
{{resourceStore.description}}
</p>
</td>
<td>{{resourceStore.price}}</td>
<td width="65">
<input type="text" class="form-control" :placeholder="resourceStore.stock" v-model="resourceStore.stock">
<!-- <button class="btn btn-default" type="button" @click="_resourceStoreLess(resourceStore.stock)">-</button>-->
</td>
<td>
<button class="btn btn-default" type="button" @click="_resourceStoreLess(resourceStore.stock)">-</button>
</td>
<td>
<h4>
{{resourceStore.price}}
</h4>
<tr v-for="purchaseApply in purchaseApplyManageInfo.purchaseApplys">
<td class="text-center">{{purchaseApply.applyOrderId}}</td>
<td class="text-center">{{purchaseApply.stateName}}</td>
<td class="text-center">{{purchaseApply.agreeMan}}</td>
<td class="text-center">{{purchaseApply.userName}}</td>
<td class="text-center">{{purchaseApply.createTime}}</td>
<td class="text-center">{{purchaseApply.resourceNames}}</td>
<td class="text-center">{{purchaseApply.totalPrice}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDetailPurchaseApplyModel(purchaseApply)">查看
</button>
</div>
<div class="btn-group" v-if="purchaseApply.state == '0000'">
<button class="btn-white btn btn-xs"
v-on:click="_openDeletePurchaseApplyModel(purchaseApply)">取消
</button>
</div>
</td>
</tr>
@ -100,46 +111,10 @@
</div>
</div>
</div>
<div class="col-md-3">
<div class="ibox">
<div class="ibox-title">
<h5>物品摘要</h5>
</div>
<div class="ibox-content">
<span>
总价
</span>
<h2 class="font-bold">
390,00 元
</h2>
<hr/>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>当前申请人</h5>
</div>
<div class="ibox-content text-center">
<h3><i class="fa fa-adn"></i> 系统登陆人</h3>
<h3><i class="fa fa-dashcube"></i> 登陆时间</h3>
</div>
</div>
</div>
</div>
<!-- <vc:create name="addResourceStore"-->
<!-- callBackListener=""-->
<!-- callBackFunction=""-->
<!-- ></vc:create>-->
<vc:create name="editItemNumberStore"></vc:create>
<!-- <vc:create name="deleteResourceStore"></vc:create>-->
<vc:create name="editPurchaseApply"></vc:create>
<vc:create name="deletePurchaseApply"></vc:create>
</div>

View File

@ -1,89 +1,85 @@
/**
入驻小区
**/
(function (vc) {
(function(vc){
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
resourceStoreManageInfo: {
resourceStores: [],
total: 0,
records: 1,
moreCondition: false,
resName: '',
conditions: {
resId: '',
resName: '',
resCode: '',
description:'',
stock:''
data:{
purchaseApplyManageInfo:{
purchaseApplys:[],
total:0,
records:1,
moreCondition:false,
applyOrderId:'',
states:'',
conditions:{
state:'',
userName:'',
resOrderType:'20000'
}
}
},
_initMethod: function () {
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
_initMethod:function(){
vc.component._listPurchaseApplys(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('resourceStoreManage', 'listResourceStore', function (_param) {
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
_initEvent:function(){
vc.on('purchaseApplyManage','listPurchaseApply',function(_param){
vc.component._listPurchaseApplys(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
vc.component._listResourceStores(_currentPage, DEFAULT_ROWS);
vc.on('pagination','page_event',function(_currentPage){
vc.component._listPurchaseApplys(_currentPage,DEFAULT_ROWS);
});
},
methods: {
_resourceStoreLess:function(stock){
vc.component.$data.resourceStoreManageInfo.conditions.stock=parseInt(stock--);
},
methods:{
_listPurchaseApplys:function(_page, _rows){
_listResourceStores: function (_page, _rows) {
vc.component.resourceStoreManageInfo.conditions.page = _page;
vc.component.resourceStoreManageInfo.conditions.row = _rows;
vc.component.purchaseApplyManageInfo.conditions.page = _page;
vc.component.purchaseApplyManageInfo.conditions.row = _rows;
var param = {
params: vc.component.resourceStoreManageInfo.conditions
params:vc.component.purchaseApplyManageInfo.conditions
};
//发送get请求
vc.http.get('resourceStoreManage',
vc.http.get('purchaseApplyManage',
'list',
param,
function (json, res) {
var _resourceStoreManageInfo = JSON.parse(json);
vc.component.resourceStoreManageInfo.total = _resourceStoreManageInfo.total;
vc.component.resourceStoreManageInfo.records = _resourceStoreManageInfo.records;
vc.component.resourceStoreManageInfo.resourceStores = _resourceStoreManageInfo.resourceStores;
vc.emit('pagination', 'init', {
total: vc.component.resourceStoreManageInfo.records,
currentPage: _page
function(json,res){
var _purchaseApplyManageInfo=JSON.parse(json);
vc.component.purchaseApplyManageInfo.total = _purchaseApplyManageInfo.total;
vc.component.purchaseApplyManageInfo.records = _purchaseApplyManageInfo.records;
vc.component.purchaseApplyManageInfo.purchaseApplys = _purchaseApplyManageInfo.purchaseApplys;
vc.emit('pagination','init',{
total:vc.component.purchaseApplyManageInfo.records,
currentPage:_page
});
}, function (errInfo, error) {
},function(errInfo,error){
console.log('请求失败处理');
}
);
},
_openAddResourceStoreModal: function () {
vc.emit('addResourceStore', 'openAddResourceStoreModal', {});
_openAddPurchaseApplyModal:function(){
vc.jumpToPage("/admin.html#/addPurchaseApplyStep?resOrderType="+vc.component.purchaseApplyManageInfo.conditions.resOrderType);
},
_openEditResourceStoreModel: function (_resourceStore) {
vc.emit('editItemNumberStore', 'openEditItemNumberStoreModal', _resourceStore);
_openDetailPurchaseApplyModel:function(_purchaseApply){
vc.jumpToPage("/admin.html#/purchaseApplyDetail?applyOrderId="+_purchaseApply.applyOrderId);
},
_openDeleteResourceStoreModel: function (_resourceStore) {
vc.emit('deleteResourceStore', 'openDeleteResourceStoreModal', _resourceStore);
_openDeletePurchaseApplyModel:function(_purchaseApply){
vc.emit('deletePurchaseApply','openDeletePurchaseApplyModal',_purchaseApply);
},
_queryResourceStoreMethod: function () {
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
_queryPurchaseApplyMethod:function(){
vc.component._listPurchaseApplys(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if (vc.component.resourceStoreManageInfo.moreCondition) {
vc.component.resourceStoreManageInfo.moreCondition = false;
} else {
vc.component.resourceStoreManageInfo.moreCondition = true;
_moreCondition:function(){
if(vc.component.purchaseApplyManageInfo.moreCondition){
vc.component.purchaseApplyManageInfo.moreCondition = false;
}else{
vc.component.purchaseApplyManageInfo.moreCondition = true;
}
},
_queryInspectionPlanMethod:function () {
vc.component._listPurchaseApplys(DEFAULT_PAGE, DEFAULT_ROWS);
}

View File

@ -59,7 +59,7 @@
);
},
_openAddPurchaseApplyModal:function(){
vc.jumpToPage("/admin.html#/addPurchaseApplyStep");
vc.jumpToPage("/admin.html#/addPurchaseApplyStep?resOrderType="+this.purchaseApplyManageInfo.conditions.resOrderType);
},
_openDetailPurchaseApplyModel:function(_purchaseApply){
vc.jumpToPage("/admin.html#/purchaseApplyDetail?applyOrderId="+_purchaseApply.applyOrderId);

View File

@ -22,7 +22,7 @@
<th class="text-center">物品编码</th>
<th class="text-center">物品价格</th>
<th class="text-center">物品库存</th>
<th class="text-center">采购数量</th>
<th class="text-center">申请数量</th>
<th class="text-center">备注</th>
@ -36,7 +36,7 @@
<td class="text-center">{{resourceStore.stock}}</td>
<td class="text-center">
<input v-model="resourceStore.quantity" type="text"
placeholder="必填,请填写采购数量" class="form-control">
placeholder="必填,请填写申请数量" class="form-control">
</td>
<td class="text-center">
<input v-model="resourceStore.remark" type="text" class="form-control">
@ -60,4 +60,4 @@
emitLoadData="viewResourceStoreInfo"
></vc:create>
</div>
</div>
</div>