王志国
4 weeks ago
8 changed files with 599 additions and 0 deletions
@ -0,0 +1,211 @@ |
|||
<template> |
|||
<view style=" "> |
|||
<uni-drawer ref="showRight" mode="left" :mask-click="true" :width="330"> |
|||
<view style="height:100vh;display:flex;flex-direction:column;"> |
|||
<view class="uni-flex" style="justify-content: center; |
|||
background-color:#007AFF ; |
|||
color: #fff; |
|||
padding: 15rpx; |
|||
font-size: 35rpx;"> |
|||
库存查询 |
|||
</view> |
|||
<scroll-view v-if="true" style="height: calc(100vh - 180rpx)" scroll-y="true"> |
|||
<!-- <button @click="closeDrawer" type="primary">关闭Drawer</button> --> |
|||
<!-- <view v-for="item in 110" :key="item">可滚动内容 {{ item }}</view> --> |
|||
<view class="" style="margin: 10rpx; font-size: 35rpx;"> |
|||
物料号: |
|||
</view> |
|||
<view style=" margin: 10rpx; display: flex; align-items: center;"> |
|||
<uni-easyinput class="uni-mt-5" prefixIcon="search" v-model="itemCode" placeholder="请输入物料号" |
|||
@clear="clearItemCode" @confirm="onConfirmItemCode"></uni-easyinput> |
|||
<!-- <view>查询</view> --> |
|||
<!-- <button style="height: 80rpx; align-items: center; text-align: center;" type="primary" size="mini" >查询</button> --> |
|||
</view> |
|||
|
|||
<view v-for="(item, index) in itemCodeResult" :key="index" @click="selectItemCode(item)"> |
|||
<view class="" style="font-size: 30rpx; margin: 20rpx;"> |
|||
<view class=""> |
|||
({{index+1}}) 物料代码 : {{item.code}} |
|||
</view> |
|||
<view class=""> |
|||
名称 : {{item.name}} |
|||
</view> |
|||
<view class=""> |
|||
描述1 : {{item.desc1}} |
|||
</view> |
|||
<view class=""> |
|||
描述2 : {{item.desc1}} |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
</view> |
|||
<scroll-view scroll-x="true" v-if="tableData.length>0" |
|||
style="width: 330px; display: flex; align-items: center; justify-content: center; "> |
|||
<view |
|||
style="width: 330px; display: flex;justify-content: center; background-color: #fff; padding-bottom: 150rpx;"> |
|||
<uni-table border stripe emptyText="暂无更多数据"> |
|||
<!-- 表头行 --> |
|||
<uni-tr> |
|||
<uni-th width="60" align="left">批次</uni-th> |
|||
<uni-th width="100" align="left">库位</uni-th> |
|||
<uni-th width="60" align="left">状态</uni-th> |
|||
<uni-th width="120" align="left">数量</uni-th> |
|||
</uni-tr> |
|||
<!-- 表格数据行 --> |
|||
<uni-tr v-for="(item, index) in tableData" :key="index"> |
|||
<uni-td>{{item.batch}}</uni-td> |
|||
<uni-td>{{item.locationCode}}</uni-td> |
|||
<uni-td>{{statusDesc(item.inventoryStatus)}}</uni-td> |
|||
<uni-td>{{item.totalQty}}</uni-td> |
|||
</uni-tr> |
|||
|
|||
</uni-table> |
|||
<!-- <view class="uni-flex" style=" flex-direction: column; position: fixed; bottom: 0; margin-bottom: 100rpx; background-color: #fff; width: 100%; align-items: center;" > |
|||
<view class="" style="width: 100%; display: flex; justify-content: center; font-size: 32rpx;margin-top: 10rpx;margin-bottom: 10rpx;"> |
|||
<view class="" >当前页:{{ current }},总数:{{ total }}条,每页:{{ pageSize }} |
|||
</view> |
|||
|
|||
</view> |
|||
<uni-pagination :current="current" :total="total" :show-icon="true" |
|||
@change="change" /> |
|||
</view> --> |
|||
|
|||
</view> |
|||
|
|||
</scroll-view> |
|||
|
|||
</scroll-view> |
|||
|
|||
<button @click="closeDrawer" type="primary" style="padding-left: 20rpx; width: 100%;">关闭</button> |
|||
</view> |
|||
|
|||
</uni-drawer> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getBasicItemByCodeSenior, |
|||
getBalanceByBusinessType |
|||
} from '@/api/request2.js'; |
|||
|
|||
import { |
|||
getInventoryStatusStyle, |
|||
getInventoryStatusName |
|||
} from '@/common/directory.js'; |
|||
|
|||
export default { |
|||
components: {}, |
|||
|
|||
data() { |
|||
return { |
|||
itemCode: "", |
|||
itemCodeResult: [], |
|||
current: 1, |
|||
total: 18, |
|||
tableData: [] |
|||
} |
|||
}, |
|||
props: { |
|||
// detail: { |
|||
// type: Object, |
|||
// default: {} |
|||
// }, |
|||
businessTypeCode: { |
|||
type: String, |
|||
default: "" |
|||
} |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
statusStyle: function(val) { |
|||
return getInventoryStatusStyle(val); |
|||
}, |
|||
statusDesc(value) { |
|||
return getInventoryStatusName(value) |
|||
}, |
|||
change() { |
|||
|
|||
}, |
|||
showErrorMessage(message) { |
|||
this.$refs.comMessage.showErrorMessage(message, res => { |
|||
if (res) { |
|||
|
|||
} |
|||
}); |
|||
}, |
|||
selectItemCode(item) { |
|||
this.itemCode = item.code |
|||
this.itemCodeResult = [] |
|||
this.getBalanceByBusiness(this.itemCode, this.businessTypeCode) |
|||
}, |
|||
clearItemCode() { |
|||
this.itemCode = "" |
|||
this.itemCodeResult = [] |
|||
this.tableData =[] |
|||
}, |
|||
onConfirmItemCode() { |
|||
if (!this.itemCode) { |
|||
this.showErrorMessage("物料号为空,请先输入物料号") |
|||
return; |
|||
} |
|||
this.tableData=[] |
|||
uni.showLoading({ |
|||
title: "加载中", |
|||
mask: true |
|||
}) |
|||
|
|||
getBasicItemByCodeSenior(this.itemCode).then(res => { |
|||
if (res.data && res.data.list.length > 0) { |
|||
if (res.data.list.length == 1) { |
|||
this.itemCode = res.data.list[0].code |
|||
this.getBalanceByBusiness(this.itemCode, this.businessTypeCode) |
|||
} else { |
|||
uni.hideLoading() |
|||
this.itemCodeResult = res.data.list |
|||
} |
|||
} else { |
|||
uni.hideLoading() |
|||
this.showErrorMessage("未查找到物料[" + this.itemCode + "]") |
|||
} |
|||
|
|||
}).catch(error => { |
|||
uni.hideLoading() |
|||
this.showErrorMessage(error) |
|||
}) |
|||
}, |
|||
getBalanceByBusiness(itemCode, businessType) { |
|||
var params = { |
|||
itemCode: itemCode, |
|||
businessType: businessType, |
|||
inOrOut:"out" |
|||
} |
|||
getBalanceByBusinessType(params).then(res => { |
|||
uni.hideLoading() |
|||
if (res.data && res.data.length > 0) { |
|||
this.tableData = res.data |
|||
} else { |
|||
this.showErrorMessage("系统异常:按"+res.msg+"未查找到库存") |
|||
} |
|||
|
|||
}).catch(error => { |
|||
uni.hideLoading() |
|||
this.showErrorMessage(error) |
|||
}) |
|||
}, |
|||
|
|||
showDrawer() { |
|||
this.$refs.showRight.open(); |
|||
}, |
|||
closeDrawer() { |
|||
this.$refs.showRight.close(); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
@ -0,0 +1,84 @@ |
|||
<template> |
|||
<view class="wyf"> |
|||
<uni-popup ref="listPopup" type="dialog"> |
|||
<view class="container"> |
|||
<uni-list class="list"> |
|||
<uni-list-item v-for="(item,index) in list" :title="item.title" |
|||
thumb-size="lg" > |
|||
<template v-slot:footer> |
|||
<!-- <image class="slot-image" src="@/static/logo.png" mode="widthFix" @click="selectItem(item,index)"></image --> |
|||
<text class="go" @click="selectItem(item,index)">Go</text> |
|||
</template> |
|||
|
|||
</uni-list-item> |
|||
|
|||
</uni-list> |
|||
</view> |
|||
</uni-popup> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { onShow } from '@dcloudio/uni-app'; |
|||
export default { |
|||
emits: ["selectItem"], |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
isScanedASN:false, |
|||
list: [] |
|||
// [{ |
|||
// title:'哈哈哈哈', |
|||
// selected:false |
|||
// }], |
|||
} |
|||
}, |
|||
props: { |
|||
}, |
|||
methods:{ |
|||
openList(list){ |
|||
this.list = list; |
|||
this.$refs.listPopup.open('center') |
|||
}, |
|||
selectItem(item,index){ |
|||
this.$refs.listPopup.close(); |
|||
this.$emit("selectItem", item); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.wyf{ |
|||
// display: block; |
|||
position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
z-index: 1000 |
|||
} |
|||
.container{ |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
.list{ |
|||
width: 80%; |
|||
max-height:50vh; |
|||
overflow-y: auto; |
|||
border-radius: 10px !important; |
|||
.slot-image{ |
|||
width: 40rpx; |
|||
} |
|||
.go{ |
|||
color: rgb(60, 156, 255); |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
.list ::v-deep .uni-list--border{ |
|||
border: 1rpx solid #e5e5e5; |
|||
} |
|||
</style> |
@ -0,0 +1,49 @@ |
|||
<template> |
|||
<!-- style="margin-top: 10rpx;margin-bottom: 10rpx;" class="uni-flex uni-row space-between u-col-center" --> |
|||
<view class="task_item"> |
|||
<view class="uni-flex space-between u-col-center"> |
|||
<view class="uni-flex uni-row u-col-center"> |
|||
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" /> |
|||
<text style="font-size: 32rpx;" >{{dataContent.creator}}</text> |
|||
</view> |
|||
<view class="uni-flex uni-row u-col-center"> |
|||
<image class="card_icon_normal" src="/static/icons/icon_date.svg" alt="" /> |
|||
<text style="font-size: 32rpx;" class="center">{{formatDate(dataContent.createTime)}}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
dateFormat |
|||
} from '@/common/basic.js'; |
|||
|
|||
export default { |
|||
components: { |
|||
|
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
watch: {}, |
|||
|
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
formatDate: function(val) { |
|||
return dateFormat(val) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
</style> |
@ -0,0 +1,36 @@ |
|||
<template> |
|||
<view class="task_number"> |
|||
<!-- <text>任务编号 : {{number}}</text> --> |
|||
<text> {{number}}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
|
|||
props: { |
|||
number: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
}, |
|||
|
|||
methods: {} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
</style> |
|||
|
|||
|
|||
<style> |
|||
</style> |
@ -0,0 +1,46 @@ |
|||
<template> |
|||
<view > |
|||
<text :class="statusStyle(receiveStatus)"> |
|||
{{ receiveStatusInfo.label}} |
|||
</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getReceiveStateInfo, |
|||
getJobStateInfo |
|||
} from '@/common/directory.js'; |
|||
|
|||
export default { |
|||
components: { |
|||
|
|||
}, |
|||
data() { |
|||
return { |
|||
receiveStatusInfo: {} |
|||
}; |
|||
}, |
|||
watch: {}, |
|||
|
|||
props: { |
|||
receiveStatus: { |
|||
type: String, |
|||
default: "" |
|||
} |
|||
}, |
|||
|
|||
mounted() {}, |
|||
|
|||
methods: { |
|||
statusStyle(value) { |
|||
this.receiveStatusInfo = getReceiveStateInfo(value); |
|||
return getReceiveStateInfo(value).remark |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
|
|||
<style> |
|||
</style> |
@ -0,0 +1,41 @@ |
|||
<template> |
|||
<view class="task_top"> |
|||
<view class="uni-flex space-between u-col-center align-center" style="margin-bottom: 10rpx;"> |
|||
<receive-number :number="dataContent.number"></receive-number> |
|||
<receive-status :receiveStatus="dataContent.receiveStatus"></receive-status> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import receiveNumber from '@/mycomponents/receive/receiveNumber.vue' |
|||
import receiveStatus from '@/mycomponents/receive/receiveStatus.vue' |
|||
export default { |
|||
components: { |
|||
receiveNumber, |
|||
receiveStatus |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
watch: {}, |
|||
|
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
openDetail(item) { |
|||
this.$emit("openDetail", this.dataContent); |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
</style> |
@ -0,0 +1,91 @@ |
|||
<template> |
|||
<view class="task_item"> |
|||
<view class="task_text" style="border-top: 1px solid #dedede;padding-top: 20rpx;margin-top: 20rpx;"> |
|||
<!-- 主子表拆分,没有数量了 --> |
|||
<itemCompareQty :dataContent="dataContent" |
|||
:isShowPackCount="isShowPackCount" |
|||
:handleQty="dataContent.handleQty" :isShowPackUnit="false" |
|||
></itemCompareQty> |
|||
<!-- :objTextStyle="{'fontWeight':'bold','fontSize':'40rpx'}" --> |
|||
<div class="u-p-l-10"> |
|||
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber"> |
|||
</pack> |
|||
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch> |
|||
<view class="u-flex u-row-between"> |
|||
<location v-if="isShowFromLocation&&dataContent.fromLocationCode" title="来源库位" :locationCode="dataContent.fromLocationCode"> |
|||
</location> |
|||
</view> |
|||
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode||dataContent.locationCode"> |
|||
</to-location> |
|||
|
|||
</div> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|||
import level from '@/mycomponents/balance/level.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
pack, |
|||
location, |
|||
toLocation, |
|||
batch, |
|||
itemCompareQty, |
|||
level |
|||
}, |
|||
data() { |
|||
return {}; |
|||
}, |
|||
|
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowContainer: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowDeliverType: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isShowPackCount: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
|
|||
|
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
|
|||
</style> |
@ -0,0 +1,41 @@ |
|||
<template> |
|||
<view> |
|||
<view class="task_card"> |
|||
<receiveTop :dataContent="dataContent"></receiveTop> |
|||
<!-- <view class="split_line"></view> --> |
|||
<slot></slot> |
|||
<view class="split_line"></view> |
|||
<receiveBottom :dataContent="dataContent"></receiveBottom> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import receiveTop from '@/mycomponents/receive/receiveTop.vue' |
|||
import receiveBottom from '@/mycomponents/receive/receiveBottom.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
receiveTop, |
|||
receiveBottom, |
|||
}, |
|||
data() { |
|||
return {}; |
|||
}, |
|||
|
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
|
|||
</style> |
Loading…
Reference in new issue