Compare commits
62 Commits
Author | SHA1 | Date |
---|---|---|
|
19d5a73376 | 1 year ago |
|
2113f0ab07 | 1 year ago |
|
06c5d5606b | 2 years ago |
|
8e05072441 | 2 years ago |
|
90fa922ae3 | 2 years ago |
|
35471f201d | 2 years ago |
|
b9d6c09fd6 | 2 years ago |
|
71438834a8 | 2 years ago |
|
ebb4c19a05 | 2 years ago |
|
bcc6792640 | 2 years ago |
|
dca5f418dc | 2 years ago |
|
719e8f8610 | 2 years ago |
|
e34c215530 | 2 years ago |
|
4dfc8ccec9 | 2 years ago |
|
1204be4271 | 2 years ago |
|
e19e5b48e8 | 2 years ago |
|
7bc799a181 | 2 years ago |
|
506b7821cc | 2 years ago |
|
09251c39dd | 2 years ago |
|
e383b6cc09 | 2 years ago |
|
3da4f049bf | 2 years ago |
|
a398fdbf89 | 2 years ago |
|
0b3208e327 | 2 years ago |
|
2c0b29427a | 2 years ago |
|
d8f34bfb42 | 2 years ago |
|
2793c8f2c1 | 2 years ago |
|
e001141e66 | 2 years ago |
|
f152b00e92 | 2 years ago |
|
201df55a1b | 2 years ago |
|
46cd8a9cae | 2 years ago |
|
6a91ce592c | 2 years ago |
|
282cfef2ef | 2 years ago |
|
502f67926e | 2 years ago |
|
08a3a0ad4d | 2 years ago |
|
54cfa5bc64 | 2 years ago |
|
5e03b8473c | 2 years ago |
|
e02bd0fe1c | 2 years ago |
|
76ff242b63 | 2 years ago |
|
69a02eb854 | 2 years ago |
|
9e01ab5c86 | 2 years ago |
|
8c981e7a90 | 2 years ago |
|
8bbe00da88 | 2 years ago |
|
30b4ab8bbc | 2 years ago |
|
db8be367bf | 2 years ago |
|
192b294ae5 | 2 years ago |
|
9416024f7e | 2 years ago |
|
d065ea50c2 | 2 years ago |
|
4ad3b37b3b | 2 years ago |
|
e05290311e | 2 years ago |
|
bf1f8c866e | 2 years ago |
|
783059eacd | 2 years ago |
|
1dc505dc31 | 2 years ago |
|
d2d9669986 | 2 years ago |
|
c68231a498 | 2 years ago |
|
af7db6a417 | 2 years ago |
|
9b5812aca1 | 2 years ago |
|
498ef365ba | 2 years ago |
|
deb623fa3f | 2 years ago |
|
3aa416edd9 | 2 years ago |
|
385d869157 | 2 years ago |
|
b1cb070ce6 | 2 years ago |
|
57db857418 | 2 years ago |
150 changed files with 10157 additions and 564 deletions
@ -1,5 +1,7 @@ |
|||||
let maxPageSize = 10; |
let maxPageSize = 10; |
||||
|
let version ="1.0" |
||||
|
|
||||
export default{ |
export default{ |
||||
maxPageSize |
maxPageSize, |
||||
|
version |
||||
} |
} |
@ -0,0 +1,249 @@ |
|||||
|
<!-- 这个文件是虚拟列表中的实际cell --> |
||||
|
<template> |
||||
|
<view class="item"> |
||||
|
<uni-swipe-action> |
||||
|
<uni-swipe-action-item :right-options="options" :auto-close="false" @click="swipeClick($event,item)"> |
||||
|
<view class="detail-content common_card"> |
||||
|
<view class="choose_main"> |
||||
|
<view class="ljh_box"> |
||||
|
<view class="ljh_info"> |
||||
|
<view class="tit_ljh">{{index+1+'.'+item.itemCode }}</view> |
||||
|
<view class="label_xm font_sm fr">{{ item.packingCode }}</view> |
||||
|
</view> |
||||
|
<view class="desc_card uni-flex space-between"> |
||||
|
<view class="desc_ljh"> |
||||
|
<view class="font_xs text_lightblue"> {{ item.itemName }}</view> |
||||
|
<view class="font_xs text_lightblue">{{ item.itemDesc1 }} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="list_form"> |
||||
|
<view> |
||||
|
<uni-table style="overflow-x: hidden; "> |
||||
|
<uni-tr> |
||||
|
<uni-th width="100"></uni-th> |
||||
|
<uni-th width="100" align="center">库存</uni-th> |
||||
|
<uni-th width="100" align="center">盘点</uni-th> |
||||
|
</uni-tr> |
||||
|
<uni-tr> |
||||
|
<uni-th width="100">数量({{item.uom}})</uni-th> |
||||
|
<uni-th width="100" align="center"> |
||||
|
<text class="text_black">{{item.inventoryQty}}</text> |
||||
|
</uni-th> |
||||
|
<uni-th width="100" align="center"> |
||||
|
<view class="flex" style="align-items: center;justify-content: center;" |
||||
|
v-if="item.scaned && item.packingCode"> |
||||
|
<text class="text_black">{{item.countQty}} </text> |
||||
|
<view class="photo_btn fr" @click="openEditCount(item)"> |
||||
|
<text class="fl font_xs">修改</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="flex" style=" align-items: center;justify-content: center;" |
||||
|
v-if="item.packingCode==''"> |
||||
|
<text class="text_black">{{item.countQty}} </text> |
||||
|
<view class="photo_btn fr" @click="openEditCount(item)"> |
||||
|
<text class="fl font_xs">修改</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="" v-else-if="!item.scaned"> |
||||
|
<text class="text_black">{{item.countQty}}</text> |
||||
|
</view> |
||||
|
</uni-th> |
||||
|
</uni-tr> |
||||
|
</uni-table> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view style="margin:0 20rpx 20rpx;"> |
||||
|
<view class="uni-flex uni-row bot_card"> |
||||
|
<view class="bot_card_item"> |
||||
|
<label class="icon_bg icon_bg_kw" style="text-align: center;"> |
||||
|
<text |
||||
|
style=" display: block; color: white;text-align: center;font-size: 28rpx;">库</text> |
||||
|
</label> |
||||
|
<text>{{ item.locationCode }}</text> |
||||
|
</view> |
||||
|
<view class="bot_card_item"> |
||||
|
<label class="icon_bg icon_bg_pc"> |
||||
|
<text |
||||
|
style=" display: block; color: white;text-align: center;font-size: 28rpx;">批</text> |
||||
|
</label> |
||||
|
<text>{{item.lot}}</text> |
||||
|
</view> |
||||
|
<view class="bot_card_item" style="width: 25%;"> |
||||
|
<view class="uni-flex" v-if="item.isNew "> |
||||
|
<!-- picker的index默认是0 --> |
||||
|
<picker picker @change="bindPickerChange($event,item)" :value="item.status-1" |
||||
|
:range="statusArray"> |
||||
|
<view class="uni-flex " style="padding:5px 0px;"> |
||||
|
<text class="state_point" |
||||
|
:class="statusStyle(item.status)">{{statusArray[item.status-1]}}</text> |
||||
|
<image class="icon_normal" src="@/static/icons_ui/icon_down.svg"> |
||||
|
</image> |
||||
|
</view> |
||||
|
</picker> |
||||
|
</view> |
||||
|
<text v-else class="state_point" :class=" statusStyle(item.status)"> |
||||
|
{{ statusColor(item.status )}} |
||||
|
</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="uni-flex space-between" style="margin:0 20rpx 20rpx;" |
||||
|
v-if="item.scaned || item.packingCode==''"> |
||||
|
<text class="font_xs" |
||||
|
style="padding: 5px 2px; text-overflow: ellipsis; overflow: hidden;">{{item.countDescription}}</text> |
||||
|
<view class="photo_btn fr" @click="openEditCountDesc(item)"> |
||||
|
<text class="fl font_xs" style="width:65px;">盘点描述</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view v-if="item.scaned" class="choose_marked_count" |
||||
|
style="background-color: #5FCB94; opacity: 0.65"> |
||||
|
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;"> |
||||
|
|
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</uni-swipe-action-item> |
||||
|
</uni-swipe-action> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
getInventoryStatusDesc, |
||||
|
getInventoryTypeStyle |
||||
|
} from '@/common/basic.js'; |
||||
|
|
||||
|
import { |
||||
|
getInventoryStatusArray |
||||
|
} from '@/common/array.js' |
||||
|
|
||||
|
export default { |
||||
|
name: "virtual-list-test-cell", |
||||
|
props: { |
||||
|
item: null, |
||||
|
index: 0, |
||||
|
extraData: null |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
type: '', |
||||
|
id: '', |
||||
|
datacontent: {}, |
||||
|
details: [], |
||||
|
allDetails: [], //所以的明细 |
||||
|
currentItem: {}, |
||||
|
editDescItem: {}, |
||||
|
editCountItem: {}, |
||||
|
scrollTop: 0, |
||||
|
old: { |
||||
|
scrollTop: 0 |
||||
|
}, |
||||
|
scanResult: {}, |
||||
|
allCount: 0, |
||||
|
newCount: 0, |
||||
|
scanCount: 0, |
||||
|
options: [{ |
||||
|
text: '移除', |
||||
|
style: { |
||||
|
backgroundColor: '#F56C6C' |
||||
|
} |
||||
|
}], |
||||
|
location: null, |
||||
|
topItem: '', |
||||
|
isShowScanPopup: false, |
||||
|
statusArray: [], |
||||
|
allStatusArray: [], |
||||
|
ipage: 1, |
||||
|
iSize: 20, |
||||
|
testList: [], |
||||
|
}; |
||||
|
}, |
||||
|
methods: { |
||||
|
titleClick(title) { |
||||
|
//如果要把点击事件传给页面,可以通过给extraData中添加对应的函数,然后在当前组件中触发这个函数,在页面中监听即可 |
||||
|
//注意,微信小程序中无法通过props传递事件,在微信小程序中可以使用uni.$emit、uni.$on代替 |
||||
|
// if (this.extraData.titleClickedCallback) { |
||||
|
// this.extraData.titleClickedCallback(title); |
||||
|
// } |
||||
|
}, |
||||
|
openEditCount(item) { |
||||
|
this.$emit("openEditCount") |
||||
|
}, |
||||
|
openEditCountDesc(item) { |
||||
|
this.$emit("openEditCountDesc") |
||||
|
}, |
||||
|
openEditCountDesc(item) { |
||||
|
this.$emit("bindPickerChange") |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
|
||||
|
statusColor(val) { |
||||
|
return getInventoryStatusDesc(val); |
||||
|
}, |
||||
|
statusStyle(val) { |
||||
|
return getInventoryTypeStyle(val); |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.item { |
||||
|
position: relative; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
padding: 20rpx 30rpx; |
||||
|
} |
||||
|
|
||||
|
.item-content { |
||||
|
flex: 1; |
||||
|
margin-left: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.header { |
||||
|
background-color: red; |
||||
|
font-size: 24rpx; |
||||
|
text-align: center; |
||||
|
padding: 20rpx 0rpx; |
||||
|
color: white; |
||||
|
} |
||||
|
|
||||
|
.item-image { |
||||
|
height: 150rpx; |
||||
|
width: 150rpx; |
||||
|
background-color: #eeeeee; |
||||
|
border-radius: 10rpx; |
||||
|
} |
||||
|
|
||||
|
.item-title { |
||||
|
background-color: red; |
||||
|
color: white; |
||||
|
font-size: 26rpx; |
||||
|
border-radius: 5rpx; |
||||
|
padding: 5rpx 10rpx; |
||||
|
} |
||||
|
|
||||
|
.item-detail { |
||||
|
margin-top: 10rpx; |
||||
|
border-radius: 10rpx; |
||||
|
font-size: 28rpx; |
||||
|
color: #aaaaaa; |
||||
|
word-break: break-all; |
||||
|
} |
||||
|
|
||||
|
.item-line { |
||||
|
position: absolute; |
||||
|
bottom: 0rpx; |
||||
|
left: 0rpx; |
||||
|
height: 1px; |
||||
|
width: 100%; |
||||
|
background-color: #eeeeee; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,41 @@ |
|||||
|
<!-- 当虚拟列表兼容模式渲染的时候,列表中实际上渲染的是这个组件,并且会把当前的item,index和extraData(附加数据)通过props传给这个组件 --> |
||||
|
<!-- 如果有多个不同的虚拟列表,它们会共用这个组件,这时候可以通过extraData来区分不同的页面 --> |
||||
|
<template> |
||||
|
<view> |
||||
|
<!-- 数组qwq{{index}} --> |
||||
|
<!-- 这里的extraData.id在virtual-list-compatibility-demo设置的是test1 --> |
||||
|
<virtual-list-test-cell :item="item" :index="index" :extraData="extraData" @openEditCount="openEditCount" @openEditCountDesc="<!-- #ifdef APP --> |
||||
|
|
||||
|
<!-- #endif -->openEditCountDesc"/> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: "zp-public-virtual-cell", |
||||
|
props: { |
||||
|
item: null, |
||||
|
index: 0, |
||||
|
// 这里的extraData是在页面中通过:extraData给z-paging组件传的对象 |
||||
|
extraData: null |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
}; |
||||
|
}, |
||||
|
methods: { |
||||
|
openEditCount(item) { |
||||
|
this.$emit("openEditCount") |
||||
|
}, |
||||
|
openEditCountDesc(item) { |
||||
|
this.$emit("openEditCountDesc") |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,105 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
<uni-popup ref="popup"> |
||||
|
<view class="popup_box"> |
||||
|
<view class="pop_title"> |
||||
|
数量 |
||||
|
<text class="fr" @click="closeScanPopup()">关闭</text> |
||||
|
</view> |
||||
|
<view class="pop_tab"> |
||||
|
|
||||
|
<view class="tab_info"> |
||||
|
<view class="conbox"> |
||||
|
<textarea v-model="content" trim="all" style="margin-left: 5px;" :focus="true" type="number"></textarea> |
||||
|
<!-- <uni-easyinput v-model="content" type="number" ></uni-easyinput> --> |
||||
|
</view> |
||||
|
<view class="uni-flex"> |
||||
|
<button class="clean_scan_btn" @click="clear()">清空</button> |
||||
|
<button class="scan_btn" @click="confirm()">确定</button> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</uni-popup> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
showErrorMsg, |
||||
|
} from '@/common/basic.js'; |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
content: '', |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
openPopup(content) { |
||||
|
this.content = content; |
||||
|
this.$refs['popup'].open("bottom"); |
||||
|
}, |
||||
|
|
||||
|
closeScanPopup(content) { |
||||
|
this.$refs.popup.close(); |
||||
|
}, |
||||
|
|
||||
|
cancel() { |
||||
|
this.$refs['popup'].close(); |
||||
|
}, |
||||
|
|
||||
|
confirm() { |
||||
|
if(!/^[0-9]+.?[0-9]*$/.test(this.content)){ |
||||
|
uni.showToast({ |
||||
|
title:"请输入数字" |
||||
|
}) |
||||
|
this.content="" |
||||
|
return |
||||
|
} |
||||
|
this.$emit("confirm", this.content); |
||||
|
this.$refs['popup'].close(); |
||||
|
}, |
||||
|
|
||||
|
clear() { |
||||
|
this.content = ''; |
||||
|
}, |
||||
|
|
||||
|
maskClick() { |
||||
|
this.$emit("confirm", true); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<!-- background-color: #fff; --> |
||||
|
<style scoped lang="scss"> |
||||
|
.center { |
||||
|
flex: auto; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: center; |
||||
|
// align-items: center; |
||||
|
} |
||||
|
|
||||
|
.flex-item { |
||||
|
width: 50%; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.messageButton { |
||||
|
border-color: #F8F8F8; |
||||
|
} |
||||
|
|
||||
|
.messagePopup { |
||||
|
background-color: #fff; |
||||
|
border-radius: 5px; |
||||
|
} |
||||
|
|
||||
|
/deep/ .uni-input-input { |
||||
|
font-size: 20px; |
||||
|
height: 46px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,62 @@ |
|||||
|
<template> |
||||
|
<view class=""> |
||||
|
<uni-popup ref="popupItems" > |
||||
|
<scroll-view scroll-y="true" class="scroll" style=""> |
||||
|
<view class="uni-flex uni-column"> |
||||
|
<view class=" uni-center" style="margin: 15rpx;"> |
||||
|
采购订单: {{poNumber}} |
||||
|
</view> |
||||
|
<view class="" style=" margin: 10rpx;background-color:#EBEEF0;width: 100%;" |
||||
|
v-for="(item, index) in showList" :key="index"> |
||||
|
<view class="text-wrap"> |
||||
|
({{index+1}})箱码 : {{item}} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
</scroll-view> |
||||
|
</uni-popup> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
components: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
showList: [], |
||||
|
poNumber: '' |
||||
|
}; |
||||
|
}, |
||||
|
// 此处定义传入的数据 |
||||
|
props: {}, |
||||
|
filters: {}, |
||||
|
methods: { |
||||
|
openPopup(data, poNumber) { |
||||
|
this.showList = data; |
||||
|
this.poNumber = poNumber |
||||
|
this.$refs.popupItems.open('center'); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.text-wrap { |
||||
|
word-wrap: break-word; |
||||
|
word-break: break-all; |
||||
|
white-space: pre-line; |
||||
|
} |
||||
|
|
||||
|
.scroll { |
||||
|
border-radius: 20rpx; |
||||
|
background-color: #fff; |
||||
|
height: 80vh; |
||||
|
width:80vw; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
</style> |
@ -0,0 +1,91 @@ |
|||||
|
<!--非生产领料任务卡片--> |
||||
|
<template> |
||||
|
<view class="device-detail issuelist"> |
||||
|
<!-- <view class="card_task issuecard nopad uni-flex space-between"> --> |
||||
|
<view class="card_task nopad space-between"> |
||||
|
<com-job-top-info :jobContent="dataContent"></com-job-top-info> |
||||
|
<image v-if="dataContent.useOnTheWayLocation" class="tag_icon" src="@/static/icons_ui/icon_kw_use.svg"> |
||||
|
</image> |
||||
|
</view> |
||||
|
<view class="margin_xs_bottom" style="clear: both;"> |
||||
|
<view class="label_order"> |
||||
|
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image> |
||||
|
|
||||
|
<text v-if="fromType=='pick'">{{dataContent.unplannedIssueRequestNumber}}</text> |
||||
|
<!-- <text>申请单:{{dataContent.materialRequestNumber}}</text> --> |
||||
|
<text v-else>{{dataContent.unplannedReceiptRequestNumber}}</text> |
||||
|
|
||||
|
</view> |
||||
|
<!-- <view class="label_order"> |
||||
|
<image class="icon_normal" src="@/static/icons_ui/icon_prod_line.svg"></image> |
||||
|
<text>{{dataContent.prodLine}}</text> |
||||
|
<text>生产线:{{dataContent.prodLine}}</text> |
||||
|
</view> --> |
||||
|
</view> |
||||
|
<view class="uni-flex uni-row receipt_bot"> |
||||
|
<view class="label_order"> |
||||
|
<image class="icon_normal" src="@/static/icons_ui/icon_date.svg"> |
||||
|
</image> |
||||
|
<text |
||||
|
class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
getJobStatuStyle, |
||||
|
getJobStatuDesc, |
||||
|
getInventoryTypeStyle, |
||||
|
getInventoryStatusDesc, |
||||
|
dateFormat |
||||
|
} from '@/common/basic.js'; |
||||
|
import comItemTop from '@/mycomponents/comItem/comItemTop.vue' |
||||
|
import comItemBottom from '@/mycomponents/comItem/comItemBottom.vue' |
||||
|
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue' |
||||
|
|
||||
|
export default { |
||||
|
name: "comissue", |
||||
|
components: { |
||||
|
comItemTop, |
||||
|
comItemBottom, |
||||
|
comJobTopInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return {}; |
||||
|
}, |
||||
|
computed: {}, |
||||
|
// 此处定义传入的数据 |
||||
|
props: { |
||||
|
dataContent: { |
||||
|
type: Object, |
||||
|
value: null |
||||
|
}, |
||||
|
fromType:{ |
||||
|
type: String, |
||||
|
value: "pick" |
||||
|
} |
||||
|
}, |
||||
|
filters: { |
||||
|
jobStatusStyle: function(val) { |
||||
|
return getJobStatuStyle(val); |
||||
|
}, |
||||
|
jobStatusColor: function(val) { |
||||
|
return getJobStatuDesc(val); |
||||
|
}, |
||||
|
statusStyle: function(val) { |
||||
|
return getInventoryTypeStyle(val); |
||||
|
}, |
||||
|
statusColor: function(val) { |
||||
|
return getInventoryStatusDesc(val); |
||||
|
}, |
||||
|
formatDate: function(val) { |
||||
|
return dateFormat(val) |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
</style> |
@ -0,0 +1,176 @@ |
|||||
|
<template> |
||||
|
<page-meta root-font-size="18px"></page-meta> |
||||
|
<view class=""> |
||||
|
|
||||
|
<win-empty-view v-if="dataList.length==0"></win-empty-view> |
||||
|
<view hover-class="uni-list-cell-hover" v-for="(item, index) in dataList" :key="item.id" |
||||
|
@click="openDetail(item)"> |
||||
|
<comUnProduce :dataContent="item" fromType ="pick"></comUnProduce> |
||||
|
</view> |
||||
|
<uni-load-more :status="loadingType" v-if="dataList.length>0" /> |
||||
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
||||
|
<win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'> |
||||
|
</win-mulit-scan> |
||||
|
<com-scan-issue-list ref="scanList" @selectedItem="selectedItem"></com-scan-issue-list> |
||||
|
<!-- com-message必须放在最下层 --> |
||||
|
<com-message ref="comMessage"></com-message> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
getUnProducePickList, |
||||
|
} from '@/api/index.js'; |
||||
|
|
||||
|
import { |
||||
|
goHome |
||||
|
} from '@/common/basic.js'; |
||||
|
|
||||
|
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue' |
||||
|
import comUnProduce from '@/mycomponents/coms/task/comUnProduce.vue'; |
||||
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
||||
|
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
||||
|
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' |
||||
|
import comScanIssueList from '@/mycomponents/scan/comScanIssueList.vue' |
||||
|
|
||||
|
export default { |
||||
|
name: 'issue', |
||||
|
components: { |
||||
|
winEmptyView, |
||||
|
comUnProduce, |
||||
|
comMessage, |
||||
|
winScanButton, |
||||
|
winMulitScan, |
||||
|
comScanIssueList |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
//popup |
||||
|
type: '', |
||||
|
dataList: [], |
||||
|
reload: false, |
||||
|
status: '', |
||||
|
contentText: { |
||||
|
contentdown: '上拉加载更多', |
||||
|
contentrefresh: '加载中', |
||||
|
contentnomore: '没有更多' |
||||
|
}, |
||||
|
pageSize: this.modelConfig, |
||||
|
pageIndex: 1, |
||||
|
isIssueTimeChange: false, |
||||
|
isToday: false, |
||||
|
titleArray: ['任务编号'], |
||||
|
loadingType: "nomore" |
||||
|
}; |
||||
|
}, |
||||
|
onShow() { |
||||
|
this.getList('refresh'); |
||||
|
}, |
||||
|
|
||||
|
mounted() { |
||||
|
|
||||
|
}, |
||||
|
//返回首页 |
||||
|
onNavigationBarButtonTap(e) { |
||||
|
if (e.index === 0) { |
||||
|
goHome(); |
||||
|
}else if(e.index === 1){ |
||||
|
window.location.reload(); |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
openScanPopup() { |
||||
|
this.$refs.scanPopup.openScanPopup(); |
||||
|
}, |
||||
|
|
||||
|
//按时间窗口排序 |
||||
|
timeSortingChange() { |
||||
|
this.isIssueTimeChange = !this.isIssueTimeChange; |
||||
|
this.getList() |
||||
|
}, |
||||
|
//只看当天到货 |
||||
|
isTodayChange() { |
||||
|
this.isToday = !this.isToday |
||||
|
this.getList() |
||||
|
}, |
||||
|
|
||||
|
//查询发料任务 |
||||
|
getList(type) { |
||||
|
let that = this; |
||||
|
uni.showLoading({ |
||||
|
title: "加载中....", |
||||
|
mask: true |
||||
|
}); |
||||
|
this.loadingType = "loading"; |
||||
|
if (type === "refresh") { |
||||
|
this.pageIndex = 1; |
||||
|
this.dataList = []; |
||||
|
} |
||||
|
let params = { |
||||
|
pageSize: that.pageSize, |
||||
|
pageIndex: that.pageIndex, |
||||
|
isCreationTimeSorting: that.isIssueTimeChange, |
||||
|
isToday: that.isToday |
||||
|
}; |
||||
|
getUnProducePickList(params) |
||||
|
.then(res => { |
||||
|
uni.hideLoading(); |
||||
|
if (type === "refresh") { |
||||
|
uni.stopPullDownRefresh(); |
||||
|
} |
||||
|
var list = res.items; |
||||
|
this.loadingType = "loadmore"; |
||||
|
if (list == null || list.length == 0) { |
||||
|
//没数据了 |
||||
|
this.loadingType = "nomore"; |
||||
|
return; |
||||
|
} |
||||
|
that.dataList = type === "refresh" ? list : this.dataList.concat(list); |
||||
|
that.pageIndex++; |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.showMessage(err.message); |
||||
|
uni.hideLoading(); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
getScanResult(type, result) { |
||||
|
let code = result.data.code; |
||||
|
if (code == '') { |
||||
|
this.showMessage('扫描的内容不能为空') |
||||
|
return; |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
|
||||
|
openDetail(item) { |
||||
|
uni.navigateTo({ |
||||
|
url: './unProducePickDetail?id=' + item.id |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
showMessage(message) { |
||||
|
this.$refs.comMessage.showMessage(message); |
||||
|
}, |
||||
|
onPull() { |
||||
|
this.getList('refresh'); |
||||
|
}, |
||||
|
onReachBottom() { |
||||
|
//避免多次触发 |
||||
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
||||
|
return; |
||||
|
} |
||||
|
this.getList('more'); |
||||
|
}, |
||||
|
showItemList(itemList) { |
||||
|
this.$refs.scanList.openPopup(itemList); |
||||
|
}, |
||||
|
selectedItem(item) { |
||||
|
this.openDetail(item); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
||||
|
<style scoped lang="scss"> |
||||
|
</style> |
@ -0,0 +1,676 @@ |
|||||
|
<!-- 发料任务详情 --> |
||||
|
<template> |
||||
|
<page-meta root-font-size="16px"></page-meta> |
||||
|
<view class=""> |
||||
|
<view class="top_card"> |
||||
|
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount"> |
||||
|
</com-job-scan-detail> |
||||
|
</view> |
||||
|
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" |
||||
|
@scroll="scroll" class="scroll-detail"> |
||||
|
|
||||
|
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id"> |
||||
|
<view class="detail-content"> |
||||
|
<view class="choose_main"> |
||||
|
<view class="ljh_box"> |
||||
|
<view class="tit_ljh">{{ item.itemCode }}</view> |
||||
|
<view class="ljh_left desc_ljh"> |
||||
|
<view class="font_xs text_lightblue">{{ item.itemName }}</view> |
||||
|
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="list_form"> |
||||
|
<view class="uni-container"> |
||||
|
<uni-table style="overflow-x: hidden;"> |
||||
|
<uni-tr> |
||||
|
<!-- <uni-th width="90"></uni-th> |
||||
|
<uni-th width="100" align="center">推荐</uni-th> |
||||
|
<uni-th width="100" align="center">实际</uni-th> --> |
||||
|
<uni-th width="50"></uni-th> |
||||
|
<uni-th width="120" align="center">推荐</uni-th> |
||||
|
<uni-th width="120" align="center">实际</uni-th> |
||||
|
</uni-tr> |
||||
|
<uni-tr> |
||||
|
<uni-th width="50">数量</text></uni-th> |
||||
|
<uni-th width="120" align="center"> |
||||
|
<text class="text_black">{{item.recommendQty}}({{item.uom}})</text> |
||||
|
</uni-th> |
||||
|
<uni-th width="120" align="center"> |
||||
|
<view v-if="item.scaned" |
||||
|
style="display: flex;flex-direction: row;justify-content:center;align-items: center;"> |
||||
|
|
||||
|
<com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty" |
||||
|
:max="99999" :min="0" style='width: 100px;' |
||||
|
@change="qtyChanged($event,item,index)"> |
||||
|
</com-number-box> |
||||
|
<text class="text_black">({{item.uom}})</text> |
||||
|
</view> |
||||
|
</uni-th> |
||||
|
</uni-tr> |
||||
|
<uni-tr> |
||||
|
<uni-th width="50">箱码</uni-th> |
||||
|
<uni-th width="120" align="center"> |
||||
|
<view class="text_packingCode"> |
||||
|
{{ item.recommendPackingCode }} |
||||
|
</view> |
||||
|
</uni-th> |
||||
|
<uni-th width="120" align="center"> |
||||
|
<view v-if="item.scaned" class="text_packingCode"> |
||||
|
{{ item.handledPackingCode }} |
||||
|
</view> |
||||
|
</uni-th> |
||||
|
</uni-tr> |
||||
|
<uni-tr> |
||||
|
<uni-th width="50">批次</uni-th> |
||||
|
<uni-th width="120" align="center"> |
||||
|
<view class="text_black">{{item.recommendLot }}</view> |
||||
|
</uni-th> |
||||
|
<uni-th width="120" align="center"> |
||||
|
<view v-if="item.scaned" class="text_black">{{item.handledLot }}</view> |
||||
|
</uni-th> |
||||
|
</uni-tr> |
||||
|
<uni-tr> |
||||
|
<uni-th width="60">库位</uni-th> |
||||
|
<uni-th width="100" align="center"> |
||||
|
<view class="text_black">{{ item.recommendFromLocationCode }}</view> |
||||
|
</uni-th> |
||||
|
<uni-th width="100" align="center"> |
||||
|
<view class="text_black" v-if="item.scaned"> |
||||
|
{{ item.handledFromLocationCode }} |
||||
|
</view> |
||||
|
</uni-th> |
||||
|
</uni-tr> |
||||
|
</uni-table> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view v-if="item.scaned" class="choose_marked_count" |
||||
|
style="background-color: #5FCB94; opacity: 0.65"> |
||||
|
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;"> |
||||
|
|
||||
|
</view> |
||||
|
<!-- <image src="@/static/image_marked.svg"></image> --> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</scroll-view> |
||||
|
<view class="uni-flex uni-row new_btn_bot"> |
||||
|
<button class="new_clear_btn btn_double" @click="clear()">清空</button> |
||||
|
<button class="new_save_btn btn_double" @click="submit()">提交</button> |
||||
|
</view> |
||||
|
<com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance> |
||||
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
||||
|
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack> |
||||
|
|
||||
|
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance> |
||||
|
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()' |
||||
|
@afterCloseScanMessage='closeScanMessage'></com-message> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
getUnProducePickDetail, |
||||
|
takeIssueJob, |
||||
|
cancelTakeIssueJob, |
||||
|
finshUnProducePickJob, |
||||
|
getBalancesByFilter |
||||
|
} from '@/api/index.js'; |
||||
|
import { |
||||
|
getJobStatuStyle, |
||||
|
getJobStatuDesc, |
||||
|
showConfirmMsg, |
||||
|
goHome, |
||||
|
compareDesc, |
||||
|
compareStr, |
||||
|
getCurrDateTime |
||||
|
} from '@/common/basic.js'; |
||||
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
||||
|
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
||||
|
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' |
||||
|
import comBalance from '@/mycomponents/common/comBalance.vue' |
||||
|
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' |
||||
|
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue' |
||||
|
import comNumberBox from '@/mycomponents/common/comNumberBox.vue'; |
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
comMessage, |
||||
|
winScanButton, |
||||
|
winMulitScan, |
||||
|
comBalance, |
||||
|
comJobScanDetail, |
||||
|
winScanByPack, |
||||
|
comNumberBox |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
id: "", |
||||
|
datacontent: {}, |
||||
|
details: {}, |
||||
|
toLocation: '', |
||||
|
scrollTop: 0, |
||||
|
old: { |
||||
|
scrollTop: 0 |
||||
|
}, |
||||
|
ispending: false, |
||||
|
balancesItem: null, |
||||
|
currentItem: null, |
||||
|
received: false, |
||||
|
currentScanLebel: null, |
||||
|
allCount: 0, |
||||
|
scanCount: 0, |
||||
|
isPack: true, |
||||
|
titleArray: ['箱标签'], |
||||
|
} |
||||
|
}, |
||||
|
filters: { |
||||
|
statusStyle: function(val) { |
||||
|
return getJobStatuStyle(val); |
||||
|
}, |
||||
|
statusColor: function(val) { |
||||
|
return getJobStatuDesc(val); |
||||
|
} |
||||
|
}, |
||||
|
props: { |
||||
|
itemCode: "", |
||||
|
}, |
||||
|
onLoad(param) { |
||||
|
this.id = param.id; |
||||
|
// if (param.jobStatus == 1) { |
||||
|
// this.receive((callback => { |
||||
|
// this.received = true; |
||||
|
// this.getDetail(); |
||||
|
// })); |
||||
|
// } else { |
||||
|
// this.getDetail(); |
||||
|
// } |
||||
|
this.getDetail(); |
||||
|
}, |
||||
|
onReady() {}, |
||||
|
//返回首页 |
||||
|
onNavigationBarButtonTap(e) { |
||||
|
if (e.index === 0) { |
||||
|
goHome(); |
||||
|
} else if (e.index === 1) { |
||||
|
window.location.reload(); |
||||
|
} |
||||
|
}, |
||||
|
//拦截返回按钮事件 |
||||
|
onBackPress(e) { |
||||
|
if (this.received) { |
||||
|
//取消承接任务 |
||||
|
// cancelTakeIssueJob(this.id) |
||||
|
// .then(res => {}) |
||||
|
// .catch(err => { |
||||
|
// this.showMessage(err.message); |
||||
|
// }); |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
uni.setNavigationBarColor({ |
||||
|
frontColor: '#ffffff', |
||||
|
backgroundColor: "#5A7CF3 !important" |
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
openScanPopup() { |
||||
|
// if (this.allCount === this.scanCount) { |
||||
|
// this.showMessage("零件已经全部扫描完成"); |
||||
|
// return; |
||||
|
// } |
||||
|
this.$refs.scanPopup.openScanPopup(); |
||||
|
}, |
||||
|
//加载零件信息 |
||||
|
getDetail() { |
||||
|
let that = this; |
||||
|
if (that.id == undefined) { |
||||
|
return; |
||||
|
} |
||||
|
uni.showLoading({ |
||||
|
title: '加载中...', |
||||
|
mask: true |
||||
|
}) |
||||
|
let params = { |
||||
|
id: that.id, |
||||
|
}; |
||||
|
getUnProducePickDetail(params) |
||||
|
.then(item => { |
||||
|
console.log('item', item); |
||||
|
that.datacontent = item; |
||||
|
that.details = item.details; |
||||
|
if (that.details != null) { |
||||
|
that.details.forEach( |
||||
|
r => { |
||||
|
r.scaned = false; |
||||
|
r.scanDate = new Date() |
||||
|
} |
||||
|
); |
||||
|
that.ispending = item.jobStatus === 2; |
||||
|
// if (that.toLocation === '') { |
||||
|
// that.toLocation = item.details[0].requestLocationCode; |
||||
|
// } |
||||
|
this.allCount = that.details.length; |
||||
|
this.scanCount = 0; |
||||
|
|
||||
|
} |
||||
|
uni.hideLoading(); |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.showMessage('未查找到详细信息') |
||||
|
|
||||
|
uni.hideLoading(); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
getScanResult(result) { |
||||
|
//零件是否已经被扫描过 |
||||
|
let item = this.details.find(r => r.recommendPackingCode === result.data.packingCode && r |
||||
|
.scanPackingCode != result.data.packingCode); |
||||
|
if (item != undefined && item.scaned) { |
||||
|
showConfirmMsg('扫描的箱码【' + result.data.packingCode + '】匹配到任务中的【' + item.scanPackingCode + |
||||
|
'】箱,是否要重新匹配任务中的【' + item.scanPackingCode + '】箱?', |
||||
|
confirm => { |
||||
|
if (confirm) { |
||||
|
this.handledPackCode(result, true); |
||||
|
} else { |
||||
|
return; |
||||
|
} |
||||
|
}) |
||||
|
} else { |
||||
|
if (this.allCount === this.scanCount) { |
||||
|
this.showMessage("零件已经全部扫描完成"); |
||||
|
return; |
||||
|
} |
||||
|
this.handledPackCode(result, false); |
||||
|
} |
||||
|
this.scrollToTop(); |
||||
|
}, |
||||
|
|
||||
|
//处理箱标签 |
||||
|
//scaned是否是重新匹配 |
||||
|
handledPackCode(result, scaned) { |
||||
|
//获取标签信息 |
||||
|
let that = this; |
||||
|
that.currentScanLebel = result; |
||||
|
let scanItem = this.details.find(r => r.scanItemCode === that.currentScanLebel.data.itemCode && |
||||
|
r.scanPackingCode === that.currentScanLebel.data.packingCode && |
||||
|
r.scanLot === that.currentScanLebel.data.lot && |
||||
|
r.scaned == true) |
||||
|
if (scanItem != undefined) { |
||||
|
this.showScanMessage('箱码【' + that.currentScanLebel.data.packingCode + '】已经扫描,请扫描下一箱零件'); |
||||
|
} else { |
||||
|
this.dyIssue(result, scaned); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
dyIssue(result, scaned) { |
||||
|
let that = this; |
||||
|
var itemCode = that.details.find(r => { |
||||
|
return r.itemCode === result.data.itemCode && |
||||
|
r.scaned === scaned |
||||
|
}) |
||||
|
if (itemCode == undefined) { |
||||
|
that.showScanMessage('所扫描的箱码【' + result.data.code + '】对应的物料【' + result.data.itemCode + '】不在任务中'); |
||||
|
} else { |
||||
|
//零件号相同、箱码相同 |
||||
|
var itemCode1 = that.details.find(r => { |
||||
|
return r.itemCode === result.data.itemCode && |
||||
|
r.recommendPackingCode === result.data.code |
||||
|
r.scaned === scaned |
||||
|
}) |
||||
|
//零件号相同、箱码不相同 |
||||
|
if (itemCode1 == undefined) { |
||||
|
var itemCode2 = that.details.find(r => { |
||||
|
return r.itemCode === result.data.itemCode && |
||||
|
r.recommendLot === result.data.lot && |
||||
|
r.scaned === scaned |
||||
|
}) |
||||
|
//零件号相同、箱码不相同、批次相同 |
||||
|
if (itemCode2 == undefined) { |
||||
|
//零件号相同、箱码不相同、批次不相同 |
||||
|
console.log("零件号相同、箱码不相同、批次不相同") |
||||
|
setTimeout(res => { |
||||
|
showConfirmMsg(itemCode.recommendPackingCode + '未执行先进先出或不是最先批次,是否继续?', confirm => { |
||||
|
if (confirm) { |
||||
|
that.currentItem = itemCode; |
||||
|
that.afterScanPackLabel(result); |
||||
|
} else { |
||||
|
that.scanPopupGetFocus(); |
||||
|
} |
||||
|
}); |
||||
|
}, 100) |
||||
|
|
||||
|
} else { |
||||
|
console.log("零件号相同、箱码不相同、批次相同") |
||||
|
//零件号相同、箱码不相同、批次相同 |
||||
|
that.currentItem = itemCode2; |
||||
|
that.afterScanPackLabel(result); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} else { |
||||
|
//零件号相同、箱码相同、批次相同 |
||||
|
var itemCode3 = that.details.find(r => { |
||||
|
return r.itemCode === result.data.itemCode && |
||||
|
r.recommendPackingCode === result.data.code && |
||||
|
r.recommendLot === result.data.lot && |
||||
|
r.scaned === scaned |
||||
|
}) |
||||
|
if (itemCode3 == undefined) { |
||||
|
//零件号相同、箱码相同、批次不同 |
||||
|
console.log("零件号相同、箱码相同、批次不同") |
||||
|
setTimeout(res => { |
||||
|
showConfirmMsg(itemCode1.recommendPackingCode + '未执行先进先出或不是最先批次,是否继续?', |
||||
|
confirm => { |
||||
|
if (confirm) { |
||||
|
that.currentItem = itemCode1; |
||||
|
that.afterScanPackLabel(result); |
||||
|
} else { |
||||
|
that.scanPopupGetFocus(); |
||||
|
} |
||||
|
}); |
||||
|
}, 100) |
||||
|
|
||||
|
} else { |
||||
|
console.log("零件号相同、箱码相同、批次相同") |
||||
|
//零件号相同、箱码相同、批次相同 |
||||
|
that.currentItem = itemCode3; |
||||
|
that.afterScanPackLabel(result); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
afterScanPackLabel(result) { |
||||
|
let that = this; |
||||
|
that.getBalance(result, res => { |
||||
|
if (res.totalCount === 1) { |
||||
|
that.balancesItem = res.items[0]; |
||||
|
if (that.balancesItem != null || that.balancesItem != undefined) { |
||||
|
that.setBalanceInfo(this.currentItem, that.balancesItem); |
||||
|
that.scanPopupGetFocus(); |
||||
|
} |
||||
|
} else { |
||||
|
this.$refs['issueitems'].openPopup(res.items); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
//查询库存记录 |
||||
|
getBalance(result, callback) { |
||||
|
uni.showLoading({ |
||||
|
title: '扫描中...', |
||||
|
mask: true |
||||
|
}) |
||||
|
let params = { |
||||
|
pageSize: 1000, |
||||
|
pageIndex: 1, |
||||
|
packingCode: result.data.code, |
||||
|
itemCode: result.data.itemCode, |
||||
|
lot: result.data.lot, |
||||
|
inventoryStatus: 2, //库存状态默认2 |
||||
|
locationTypes: [2,3,4], |
||||
|
sortBy: 'PackingCode asc' |
||||
|
}; |
||||
|
getBalancesByFilter(params) |
||||
|
.then(res => { |
||||
|
if (res.totalCount === 0) { |
||||
|
this.showScanMessage('按零件号【' + result.data.itemCode + '】箱码【' + result.data.code + '】批次【' + |
||||
|
result |
||||
|
.data.lot + '】在【原料库】或【半成品库】或【成品库】未查询到库存信息'); |
||||
|
} else { |
||||
|
callback(res); |
||||
|
} |
||||
|
uni.hideLoading(); |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.showScanMessage(err.message); |
||||
|
uni.hideLoading(); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
setBalanceInfo(item, balanceItem) { |
||||
|
item.scaned = true; |
||||
|
item.scanDate = new Date() //增加扫描信息属性 |
||||
|
item.fromLocationCode = balanceItem.locationCode; |
||||
|
item.fromLocationErpCode = balanceItem.locationErpCode; |
||||
|
item.toLocationCode = item.locationCode; |
||||
|
item.toLocationErpCode = item.locationErpCode; |
||||
|
|
||||
|
//实际库存数量 |
||||
|
item.handledContainerCode = balanceItem.containerCode; |
||||
|
item.handledPackingCode = balanceItem.packingCode; |
||||
|
item.handledBatch = balanceItem.batch; |
||||
|
item.handledLot = balanceItem.lot; |
||||
|
|
||||
|
item.defaultHandleQty = balanceItem.qty; |
||||
|
item.handledQty = balanceItem.qty; |
||||
|
item.handledFromLocationCode = balanceItem.locationCode; |
||||
|
item.handledFromLocationArea = balanceItem.locationArea; |
||||
|
item.handledFromLocationGroup = balanceItem.locationErpCode; |
||||
|
item.handledFromLocationErpCode = balanceItem.locationGroup; |
||||
|
item.handledFromWarehouseCode = balanceItem.warehouseCode; |
||||
|
|
||||
|
item.toLocationArea = balanceItem.locationArea; |
||||
|
item.toLocationGroup = balanceItem.locationGroup; |
||||
|
item.toLocationErpCode = balanceItem.locationErpCode; |
||||
|
|
||||
|
//当前扫描标签的信息 |
||||
|
item.scanItemCode = this.currentScanLebel.data.itemCode; |
||||
|
item.scanPackingCode = this.currentScanLebel.data.code; |
||||
|
item.scanLot = this.currentScanLebel.data.lot; |
||||
|
|
||||
|
item.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN; |
||||
|
item.uom = balanceItem.uom; |
||||
|
|
||||
|
this.details.sort(compareDesc('scanDate')); //按扫描信息排 |
||||
|
this.calcScanCount(); //计算扫描的数量 |
||||
|
this.$forceUpdate(); |
||||
|
}, |
||||
|
|
||||
|
selectedBalanceItem(balanceItem) { |
||||
|
this.setBalanceInfo(this.currentItem, balanceItem); |
||||
|
|
||||
|
}, |
||||
|
// //接收 |
||||
|
receive(callback) { |
||||
|
let params = { |
||||
|
id: this.id |
||||
|
}; |
||||
|
takeIssueJob(params) |
||||
|
.then(res => { |
||||
|
callback(true); |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.showMessage(err.message); |
||||
|
callback(false); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
submit() { |
||||
|
let that = this; |
||||
|
if (that.datacontent.details.length === 0) { |
||||
|
this.showMessage('该任务没有选择的零件'); |
||||
|
return; |
||||
|
} |
||||
|
let checkItems = that.details.filter(r => r.scaned === true); |
||||
|
if (checkItems.length < that.details.length) { |
||||
|
showConfirmMsg('还有未扫描的零件,是否提交?', confirm => { |
||||
|
if (confirm) { |
||||
|
that.finsh(); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
that.finsh(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
handleLocation() { |
||||
|
let that = this; |
||||
|
if (that.details[0].requestLocationCode != that.toLocation) { |
||||
|
showConfirmMsg('目标库位【' + that.toLocation + '】与需求库位不一致,是否要将以上零件发到目标库位?', confirm => { |
||||
|
if (confirm) { |
||||
|
that.handledPackingCode(); |
||||
|
} else { |
||||
|
that.clearScanLocation(); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
showConfirmMsg('是否要将以上零件发到目标库位:【' + that.toLocation + "】", confirm => { |
||||
|
if (confirm) { |
||||
|
that.handledPackingCode(); |
||||
|
} else { |
||||
|
that.clearScanLocation(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
//判断是否有推荐箱码为空的情况 |
||||
|
handledPackingCode() { |
||||
|
let that = this; |
||||
|
let items = this.details.filter(r => { |
||||
|
return r.scaned && (r.handledPackingCode === null || r.handledPackingCode === '') |
||||
|
}) |
||||
|
|
||||
|
if (items.length > 0) { |
||||
|
let packingCodes = ''; |
||||
|
items.forEach(r => { |
||||
|
packingCodes += r.recommendPackingCode + ',' |
||||
|
}) |
||||
|
showConfirmMsg('以下箱码对应的实际箱码为空,是否要继续领料?【' + packingCodes + "】", confirm => { |
||||
|
if (confirm) { |
||||
|
that.finsh(); |
||||
|
} else { |
||||
|
that.clearScanLocation(); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
that.finsh(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
finsh() { |
||||
|
let that = this; |
||||
|
uni.showLoading({ |
||||
|
title: "提交中...", |
||||
|
mask: true |
||||
|
}); |
||||
|
that.datacontent.completeUserId = localStorage.getItem('userId') |
||||
|
that.datacontent.completeUserName = localStorage.getItem('userName_CN') |
||||
|
that.datacontent.completeTime = getCurrDateTime(); |
||||
|
that.datacontent.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage |
||||
|
.userName_CN; |
||||
|
that.datacontent.details = that.details; |
||||
|
let params = JSON.stringify(that.datacontent); |
||||
|
finshUnProducePickJob(that.id, params) |
||||
|
.then(res => { |
||||
|
uni.hideLoading(); |
||||
|
if (res != null) { |
||||
|
that.showCommitSuccessMessage(); |
||||
|
that.backJobList(1000); |
||||
|
} |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
that.showMessage(err.message); |
||||
|
uni.hideLoading(); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
//返回任务列表页 |
||||
|
backJobList(delay) { |
||||
|
uni.navigateBack() |
||||
|
// setTimeout(() => { |
||||
|
// uni.navigateTo({ |
||||
|
// url: './unProducePick' |
||||
|
// }) |
||||
|
// }, 1000) |
||||
|
}, |
||||
|
|
||||
|
clear() { |
||||
|
this.scanCount = 0; |
||||
|
this.currentItem = null; |
||||
|
this.currentScanLebel = null; |
||||
|
this.getDetail(); |
||||
|
}, |
||||
|
clearScanLocation() { |
||||
|
this.currentItem = null; |
||||
|
}, |
||||
|
showMessage(message) { |
||||
|
this.$refs.comMessage.showMessage(message); |
||||
|
}, |
||||
|
showScanMessage(message) { |
||||
|
this.$refs.comMessage.showScanMessage(message); |
||||
|
}, |
||||
|
|
||||
|
closeScanMessage() { |
||||
|
this.$refs.scanPopup.getfocus(); |
||||
|
}, |
||||
|
|
||||
|
calcScanCount() { |
||||
|
this.scanCount = this.details.filter(r => r.scaned === true).length; |
||||
|
this.closeScanPopup(); |
||||
|
}, |
||||
|
|
||||
|
showCommitSuccessMessage() { |
||||
|
this.$refs.comMessage.showCommitSuccess(); |
||||
|
}, |
||||
|
|
||||
|
closeCommitMessage() { |
||||
|
this.backJobList(0); //点关闭直接返回列表 |
||||
|
uni.hideLoading(); |
||||
|
}, |
||||
|
|
||||
|
closeScanPopup() { |
||||
|
if (this.allCount == this.scanCount) { |
||||
|
this.$refs.scanPopup.closeScanPopup(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
closeScanMessage() { |
||||
|
this.scanPopupGetFocus(); |
||||
|
}, |
||||
|
|
||||
|
scanPopupGetFocus() { |
||||
|
this.$refs.scanPopup.getfocus(); |
||||
|
}, |
||||
|
|
||||
|
scrollToTop() { |
||||
|
let that = this; |
||||
|
// 解决view层不同步的问题 |
||||
|
that.scrollTop = that.old.scrollTop |
||||
|
this.$nextTick(function() { |
||||
|
that.scrollTop = 0 |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
upper: function(e) { |
||||
|
// console.log(e) |
||||
|
}, |
||||
|
lower: function(e) { |
||||
|
// console.log(e) |
||||
|
}, |
||||
|
scroll: function(e) { |
||||
|
// console.log(e) |
||||
|
this.old.scrollTop = e.detail.scrollTop; |
||||
|
}, |
||||
|
qtyChanged(value, item, index) { |
||||
|
if (value <= 0) { |
||||
|
this.showMessage('领料数量不能小于或等于0') |
||||
|
item.handledQty = item.defaultHandleQty |
||||
|
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); |
||||
|
} else if (value > item.defaultHandleQty) { |
||||
|
item.handledQty = item.defaultHandleQty |
||||
|
this.showMessage('领料数量不能大于库存数量:' + item.handledQty) |
||||
|
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
</style> |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue