优化采购申请

This commit is contained in:
java110 2020-05-08 00:45:33 +08:00
parent 1b56102d46
commit 04d6daa1d6
7 changed files with 113 additions and 62 deletions

View File

@ -2,12 +2,24 @@
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>申请说明</h5>
<h5>申请信息</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="form-group row">
<label class="col-sm-2 col-form-label">使用人</label>
<div class="col-sm-10">
<input placeholder="必填,请填写使用人" class="form-control"
v-model="addPurchaseApplyViewInfo.endUserName"/></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">联系电话</label>
<div class="col-sm-10">
<input placeholder="必填,请填写联系电话" class="form-control"
v-model="addPurchaseApplyViewInfo.endUserTel"/></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">申请说明</label>
<div class="col-sm-10">

View File

@ -8,8 +8,9 @@
data: {
addPurchaseApplyViewInfo: {
flowComponent: 'addPurchaseApplyView',
description:''
description:'',
endUserName:'',
endUserTel:'',
}
},
watch: {
@ -21,7 +22,7 @@
}
},
_initMethod: function () {
},
_initEvent: function () {
@ -51,6 +52,30 @@
errInfo: "申请说明不能超过200位"
},
],
'addPurchaseApplyViewInfo.endUserName': [
{
limit: "required",
param: "",
errInfo: "联系人不能为空"
},
{
limit: "maxLength",
param: "50",
errInfo: "联系人不能超过50位"
},
],
'addPurchaseApplyViewInfo.endUserTel': [
{
limit: "required",
param: "",
errInfo: "联系电话不能为空"
},
{
limit: "phone",
param: "",
errInfo: "不是有效手机号"
},
]
});
},

View File

@ -13,7 +13,7 @@
<label class="col-sm-2 col-form-label">员工名称</label>
<div class="col-sm-10">
<input v-model="addStaffViewInfo.username" type="text" placeholder="必填,请填写员工名称"
class="form-control">
class="form-control">
</div>
</div>
<div class="form-group row">
@ -31,15 +31,16 @@
<div class="col-sm-10">
<select class="custom-select" v-model="addStaffViewInfo.relCd">
<option selected disabled value="">必填,请选择岗位</option>
<option value="10000">普通员工</option>
<option value="20000">部门经理</option>
<option v-for="(item,index) in addStaffViewInfo.relCds" :key="index"
v-bind:value="item.statusCd">{{item.name}}
</option>
</select></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">员工邮箱</label>
<div class="col-sm-10">
<input v-model="addStaffViewInfo.email" type="text" placeholder="可选,请填写员工邮箱"
class="form-control">
class="form-control">
</div>
</div>
@ -54,11 +55,11 @@
<label class="col-sm-2 col-form-label">家庭住址</label>
<div class="col-sm-10">
<input v-model="addStaffViewInfo.address" type="text" placeholder="必填,请填写家庭住址"
class="form-control">
class="form-control">
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -15,6 +15,7 @@
tel: '',
address: '',
relCd: '',
relCds:[],
}
},
watch: {
@ -26,7 +27,9 @@
}
},
_initMethod: function() {
vc.getDict('u_org_staff_rel',"rel_cd",function(_data){
vc.component.addStaffViewInfo.relCds = _data;
});
},
_initEvent: function() {

View File

@ -11,13 +11,20 @@
callBackFunction="notify"
></vc:create>
</div>
<!-- 申请说明 -->
<!-- 联系人 -->
<div v-if="addPurchaseApplyStepInfo.index == 1">
<vc:create path="common/addPurchaseApplyView"
callBackListener="addPurchaseApplyStep"
callBackFunction="notify2"
></vc:create>
</div>
<!-- 联系人 -->
<div v-if="addPurchaseApplyStepInfo.index == 2">
<vc:create path="common/addPurchaseApplyView"
callBackListener="addPurchaseApplyStep"
callBackFunction="notify2"
></vc:create>
</div>
@ -25,10 +32,10 @@
<div class="col-md-10"></div>
<div class="col-md-2 " style="margin-bottom:10px; text-align:right">
<button type="button" class="btn btn-secondary" v-on:click="_prevStep()">上一步</button>
<button v-if="addPurchaseApplyStepInfo.index != 1" type="button" class="btn btn-primary"
<button v-if="addPurchaseApplyStepInfo.index != 2" type="button" class="btn btn-primary"
style="margin-left:10px;" v-on:click="_nextStep()">下一步
</button>
<button v-if="addPurchaseApplyStepInfo.index == 1" type="button" class="btn btn-primary"
<button v-if="addPurchaseApplyStepInfo.index == 2" type="button" class="btn btn-primary"
style="margin-left:10px;" v-on:click="_finishStep()">提交
</button>
</div>

View File

@ -11,6 +11,8 @@
purchaseApply:{
resourceStores:[],
description:'',
endUserName:'',
endUserTel:'',
file:'',
resOrderType:''
}
@ -29,6 +31,8 @@
vc.on("addPurchaseApplyStep", "notify2", function (info) {
vc.component.addPurchaseApplyStepInfo.purchaseApply.description = info.description;
vc.component.addPurchaseApplyStepInfo.purchaseApply.endUserName = info.endUserName;
vc.component.addPurchaseApplyStepInfo.purchaseApply.endUserTel = info.endUserTel;
});
},
@ -38,7 +42,7 @@
vc.component.addPurchaseApplyStepInfo.$step.step({
index: 0,
time: 500,
title: ["选择物品", "申请说明"]
title: ["选择物品", "申请信息","审批人"]
});
vc.component.addPurchaseApplyStepInfo.index = vc.component.addPurchaseApplyStepInfo.$step.getIndex();
},
@ -54,12 +58,12 @@
vc.emit('viewResourceStoreInfo2', 'getSelectResourceStores', null);
var _resourceStores = vc.component.addPurchaseApplyStepInfo.purchaseApply.resourceStores;
if (_resourceStores.length == 0) {
vc.toast("请完善需要采购的物品信息");
vc.toast("请完善物品信息");
return;
}
for( var i = 0; i < _resourceStores.length; i++){
if(_resourceStores[i].quantity <= 0){
vc.toast("请完善需要采购的物品信息");
vc.toast("请完善物品信息");
return;
}
if(vc.component.addPurchaseApplyStepInfo.purchaseApply.resOrderType == "20000"){

View File

@ -1,4 +1,3 @@
<div id="component" class="wrapper wrapper-content animated fadeInRight ecommerce">
<div class="row">
<div class="col-lg-12">
@ -14,29 +13,29 @@
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="订单号"
v-model="purchaseApplyManageInfo.conditions.applyOrderId" class=" form-control">
v-model="purchaseApplyManageInfo.conditions.applyOrderId" class=" form-control">
</div>
</div>
<div class="col-sm-3">
<select class="custom-select" v-model="purchaseApplyManageInfo.conditions.state">
<option selected disabled value="">请选择状态</option>
<option v-for="(item,index) in purchaseApplyManageInfo.states" :key="index"
v-bind:value="item.statusCd">{{item.name}}
v-bind:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
<div class="col-sm-3">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请填写申请人姓名"
v-model="purchaseApplyManageInfo.conditions.userName" class=" form-control">
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="_queryInspectionPlanMethod()">
v-on:click="_queryInspectionPlanMethod()">
<i class="fa fa-search"></i> 查询
</button>
</div>
@ -49,7 +48,7 @@
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>采购申请信息</h5>
<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>
@ -59,51 +58,51 @@
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny"
data-page-size="15"
>
<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>
<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>
<th class="text-right">操作</th>
</tr>
</thead>
<tbody>
<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"
<tr v-for="purchaseApply in purchaseApplyManageInfo.purchaseApplys">
<td class="text-center">{{purchaseApply.applyOrderId}}</td>
<td class="text-center">{{purchaseApply.userName}}</td>
<td class="text-center">{{purchaseApply.userName}}</td>
<td class="text-center">{{purchaseApply.resourceNames}}</td>
<td class="text-center">{{purchaseApply.createTime}}</td>
<td class="text-center">{{purchaseApply.totalPrice}}</td>
<td class="text-center">{{purchaseApply.agreeMan}}</td>
<td class="text-center">{{purchaseApply.stateName}}</td>
<td class="text-right">
<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 == '1000'">
<button class="btn-white btn btn-xs"
</button>
</div>
<div class="btn-group" v-if="purchaseApply.state == '1000'">
<button class="btn-white btn btn-xs"
v-on:click="_openDeletePurchaseApplyModel(purchaseApply)">取消
</button>
</div>
</td>
</button>
</div>
</td>
</tr>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
@ -117,4 +116,4 @@
<vc:create path="common/editPurchaseApply"></vc:create>
<vc:create path="common/deletePurchaseApply"></vc:create>
</div>
</div>