Commit 93bab7e4 by huangqy

新增了出入库记录业务单类型及装备名称查询的功能

Signed-off-by: huangqy <huangqy@junmp.com.cn>
parent b4a44fc8
......@@ -2,6 +2,18 @@
<tabs tabs="{{tabs}}" tabsName="activeTab" activeTab="{{activeTab}}" onTabClick="handleTabClick" swipeable={{false}}>
<block a:for="{{tabs}}">
<tab-content key="{{index}}" tabId="{{index}}" activeTab="{{activeTab}}" a:if="{{index === 0}}">
<view class="page-section" style="margin-top: 15rpx;display: flex">
<view class="form-row-label-left" style="padding:10rpx 10rpx;display: flex;align-items: center;">
<view style="font-size: 34rpx">业务类型:</view>
<picker onChange="orderPickerChange" value="{{orderIndex}}" range="{{orderList}}" range-key="name">
<view style="font-size: 34rpx">{{orderList[orderIndex].name}}</view>
</picker>
</view>
<view class="form-row-label-left" style="padding: 10rpx 10rpx;display: flex;align-items: center;">
<view style="width: 100%;font-size: 34rpx">装备名称:</view>
<input maxlength="6" placeholder="装备名称" onConfirm="doneSearch"/>
</view>
</view>
<view>
<view class="page-section" a:for="{{warehouseList}}">
<container>
......@@ -13,7 +25,7 @@
<view class="form-row-label-right" a:if="{{item.actionState === 3}}">业务类型: 领用</view>
<view class="form-row-label-right" a:if="{{item.actionState === 4}}">业务类型: 调拨</view>
<view class="form-row-label-right" a:if="{{item.actionState === 6}}">业务类型: 维修</view>
<view class="form-row-label-right" a:if="{{item.actionState === 8}}">业务类型: 报废</view>
<view class="form-row-label-right" a:if="{{item.actionState === 7}}">业务类型: 报废</view>
<view class="form-row-label-right" a:if="{{item.actionState === 13 || item.actionState === 14}}">业务类型: 本库借用</view>
</flex>
<flex>
......
......@@ -17,7 +17,21 @@ Page({
orderInfo: {},
controlled: true,
approvalMsg: '',
size: 8
actionState: 0,
size: 8,
show: false,
orderList: [
{ id: 0, name: '全部' },
{ id: 1, name: '采购' },
{ id: 2, name: '借用' },
{ id: 3, name: '领用' },
{ id: 4, name: '调拨' },
{ id: 5, name: '维修' },
{ id: 6, name: '报废' },
{ id: 7, name: '本库借用' }
],
orderIndex: 0,
equipmentDetail: ''
},
onLoad(query) {
this.getWarehouseInOutHistory()
......@@ -42,9 +56,57 @@ Page({
this.getCabinetList()
}
},
orderPickerChange(e) {
this.setData({
orderIndex: e.detail.value
})
switch(e.detail.value) {
case 0:
this.setData({
actionState: 0
}); break
case 1:
this.setData({
actionState: 1
}); break
case 2:
this.setData({
actionState: 2
}); break
case 3:
this.setData({
actionState: 3
}); break
case 4:
this.setData({
actionState: 4
}); break
case 5:
this.setData({
actionState: 6
}); break
case 6:
this.setData({
actionState: 7
}); break
case 7:
this.setData({
actionState: 13
}); break
default: break
}
this.getWarehouseInOutHistory()
},
doneSearch(event) {
this.setData({
equipmentDetail: event.detail.value
})
this.getWarehouseInOutHistory()
},
getWarehouseInOutHistory () {
const _this = this
http.post('/api/Inventory/GetAllInOutHistory', {orgId: getApp().globalData.orgId || "B483A47A-0D9B-455C-B26A-FB0AEA3455D8", actionState: 0, page: 0, size: _this.data.size}).then(res => {
http.post('/api/Inventory/GetAllInOutHistory', {orgId: getApp().globalData.orgId || "B483A47A-0D9B-455C-B26A-FB0AEA3455D8",
actionState: _this.data.actionState, page: 0, size: _this.data.size, equipmentDetail: _this.data.equipmentDetail}).then(res => {
if (res.code === '10000') {
_this.setData({
warehouseList: res.data.content
......
......@@ -9,23 +9,6 @@
background-color:#f1f1f1
}
.form-row {
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 0 30rpx;
margin-top: 15rpx;
background-color:#fff
}
.form-row-label {
width: 45%;
font-size: 26rpx;
margin: 10rpx;
text-align: left;
color: #000;
}
.form-row-label-single {
width: 46%;
padding: 20rpx 10rpx;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论