|
|
|
@ -77,10 +77,13 @@
|
|
|
|
|
<scroll-view class="sclcs" scroll-y="true"> |
|
|
|
|
<view class="visc"> |
|
|
|
|
<template v-if="details.checkstate === 1 || details.checkstate === 2"> |
|
|
|
|
<view class="item1" v-for="item in renderList"> |
|
|
|
|
<view class="item1" v-for="(item, index) in renderList"> |
|
|
|
|
<view class="tpbx" v-if="item.goodsType==0"> |
|
|
|
|
<image src="/pagesHome/static/kuweiicon.png"></image> |
|
|
|
|
<view>包条码:{{item.orderPackageCode}}</view> |
|
|
|
|
<!-- 移除 --> |
|
|
|
|
<image class="removeicon" @click="handleRemove(index)" src="/pagesHome/static/removeitem.png"> |
|
|
|
|
</image> |
|
|
|
|
</view> |
|
|
|
|
<view class="tpbx" v-if="item.goodsType==0" @click.stop="goorderdetail(item, item.goodsType)"> |
|
|
|
|
<image src="/pagesHome/static/kuweiicon.png"></image> |
|
|
|
@ -139,21 +142,20 @@
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="tpbx"> |
|
|
|
|
<template |
|
|
|
|
v-if="Number(details.upshelfScanType) === 1 || Number(details.upshelfScanType) === 2 ||details.checkstate === 2"> |
|
|
|
|
<view class="tpbx"> |
|
|
|
|
<image src="/pagesHome/static/kuweiicon.png"></image> |
|
|
|
|
<view style="flex: 1; display: inline-flex; justify-content: space-between;"> |
|
|
|
|
<view>总数:{{item.totalNum}}</view> |
|
|
|
|
<view>上架数量:{{item.shelfNum}}</view> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- <template v-else> |
|
|
|
|
<image src="/pagesHome/static/kuweiicon.png"></image> |
|
|
|
|
<view>已扫数量:{{item.shelfNum}}</view> |
|
|
|
|
</template> --> |
|
|
|
|
<view class="downloadBtn" @click="handleDownLoadByOrder(item)"> |
|
|
|
|
下架 |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<image v-if="Number(details.upshelfScanType)!=3" class="qtimgzt" |
|
|
|
|
:src="item.totalNum==item.shelfNum?'/pagesHome/static/qitao.png':'/pagesHome/static/weiqitao.png'"> |
|
|
|
@ -170,6 +172,10 @@
|
|
|
|
|
<image src="/pagesHome/static/scanicon.png"></image> |
|
|
|
|
<view>托盘数量:{{reqobj.trayNum}}</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="downloadBtn" @click="handleDownLoadByTray"> |
|
|
|
|
托盘下架 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
@ -185,6 +191,47 @@
|
|
|
|
|
<saomiao2 :ishidestop="scanState !== 0"></saomiao2> |
|
|
|
|
<!-- #endif --> |
|
|
|
|
<tips ref="tip"></tips> |
|
|
|
|
|
|
|
|
|
<!-- 下架 -- 包条 --> |
|
|
|
|
<PopUp ref="downLoadByOrder"> |
|
|
|
|
<view class="downLoadByOrder_control"> |
|
|
|
|
<!-- 全选 --> |
|
|
|
|
<image v-show="chooseOrderPackageCodeList.length === details.orderPackageCodeList.length" |
|
|
|
|
src="/pagesHome/static/downcheck.png" @click="handleCloseCheck"></image> |
|
|
|
|
|
|
|
|
|
<!-- 部分选 --> |
|
|
|
|
<image v-show=" |
|
|
|
|
chooseOrderPackageCodeList.length !== details.orderPackageCodeList.length |
|
|
|
|
&& chooseOrderPackageCodeList.length > 0 |
|
|
|
|
" src="/pagesHome/static/miniqc.png" @click="handleCheckAll"></image> |
|
|
|
|
|
|
|
|
|
<!-- 全未选 --> |
|
|
|
|
<image v-show="chooseOrderPackageCodeList.length === 0" src="/pagesHome/static/downnocheck.png" |
|
|
|
|
@click="handleCheckAll"></image> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<scroll-view scroll-y="true" style="height: 35vh;"> |
|
|
|
|
<block v-for="item in details.orderPackageCodeList" :key="item.code"> |
|
|
|
|
<view class="downloadRow" @click="handleCheck(item)"> |
|
|
|
|
<image v-if="!item.checked" src="/pagesHome/static/downnocheck.png"></image> |
|
|
|
|
<image v-if="item.checked" src="/pagesHome/static/downcheck.png"></image> |
|
|
|
|
<view>{{item.code}}</view> |
|
|
|
|
</view> |
|
|
|
|
</block> |
|
|
|
|
</scroll-view> |
|
|
|
|
</PopUp> |
|
|
|
|
|
|
|
|
|
<!-- 下架 -- 库存品 || 零担 --> |
|
|
|
|
<PopUp ref="downLoadByStock"> |
|
|
|
|
|
|
|
|
|
<view class="downLoadByStock_row"> |
|
|
|
|
<view> |
|
|
|
|
下架数: |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<input v-model="details.enterNum" type="number" /> |
|
|
|
|
</view> |
|
|
|
|
</PopUp> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
@ -193,7 +240,9 @@
|
|
|
|
|
warehouseUpdownTypeupShelfScanAllocation, |
|
|
|
|
warehouseUpdownTypeupShelfOrder, |
|
|
|
|
warehouseUpdownTypeupShelfPackage, |
|
|
|
|
warehouseUpdownTypeupShelfTray |
|
|
|
|
warehouseUpdownTypeupShelfTray, |
|
|
|
|
postorderUpshelfDetailByAllocationId, |
|
|
|
|
warehouseUpdownTypedownPackage |
|
|
|
|
} from '@/api/user.js' |
|
|
|
|
import { |
|
|
|
|
onLoad, |
|
|
|
@ -202,7 +251,7 @@
|
|
|
|
|
onUnload, |
|
|
|
|
onPullDownRefresh |
|
|
|
|
} from '@dcloudio/uni-app' |
|
|
|
|
import { inject, reactive, ref, toRefs, watchEffect } from "vue"; |
|
|
|
|
import { computed, inject, nextTick, reactive, ref, toRefs, watchEffect } from "vue"; |
|
|
|
|
import useSystemSettingsStore from '@/store/useSystemSettingsStore'; |
|
|
|
|
import useStorageStore from '@/store/useStorageStore'; |
|
|
|
|
import { storeToRefs } from 'pinia'; |
|
|
|
@ -220,8 +269,20 @@
|
|
|
|
|
uplistarr: [], |
|
|
|
|
renderList: [], |
|
|
|
|
// 已扫描的服务号的数组 |
|
|
|
|
orderCodeArr: [] |
|
|
|
|
orderCodeArr: [], |
|
|
|
|
/** 包件list */ |
|
|
|
|
orderPackageCodeList: [], |
|
|
|
|
/** 库存品 || 零担 提交数 */ |
|
|
|
|
enterNum: 0 |
|
|
|
|
}) |
|
|
|
|
/** 被选中的包件 */ |
|
|
|
|
const chooseOrderPackageCodeList = ref([]) |
|
|
|
|
|
|
|
|
|
// 组件实例 |
|
|
|
|
/** 下架 -- 包条 */ |
|
|
|
|
const downLoadByOrder = ref() |
|
|
|
|
const downLoadByStock = ref() |
|
|
|
|
// downLoadByStock |
|
|
|
|
|
|
|
|
|
watchEffect(() => { |
|
|
|
|
if (Number(details.upshelfScanType) == 1 || Number(details.upshelfScanType) == 2) { |
|
|
|
@ -240,7 +301,7 @@
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// 开启监听扫描 |
|
|
|
|
onShow(() => { |
|
|
|
|
onShow(async () => { |
|
|
|
|
// #ifdef APP |
|
|
|
|
uni.$off('scancodedate') |
|
|
|
|
uni.$on('scancodedate', function (code) { |
|
|
|
@ -252,6 +313,9 @@
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// #endif |
|
|
|
|
|
|
|
|
|
await nextTick() |
|
|
|
|
downLoadByStock.value.details.showPopUp = true |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// 关闭扫描监听 |
|
|
|
@ -273,7 +337,7 @@
|
|
|
|
|
// 关闭刷新动画 |
|
|
|
|
uni.stopPullDownRefresh() |
|
|
|
|
clearTimeout(timer) |
|
|
|
|
}, 500) |
|
|
|
|
}, 300) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
/** 扫描库位 */ |
|
|
|
@ -388,6 +452,7 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 扫描后执行的回调 */ |
|
|
|
|
async function scandata() { |
|
|
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
@ -404,6 +469,8 @@
|
|
|
|
|
else scanOther(code) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 详情页面 */ |
|
|
|
|
function goorderdetail(item, type) { |
|
|
|
|
// 当type 不是 |
|
|
|
|
if (type !== 1) return |
|
|
|
@ -411,6 +478,8 @@
|
|
|
|
|
url: '/pagesHome/pages/orderDetails/orderDetails?orderCode=' + item.orderCode |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 上架提交 */ |
|
|
|
|
function uplist() { |
|
|
|
|
let content = '' |
|
|
|
|
if (details.allocationId === '') { |
|
|
|
@ -492,6 +561,7 @@
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//去重 |
|
|
|
|
function fn2(tempArr, fnname) { |
|
|
|
|
let result = []; |
|
|
|
@ -516,11 +586,15 @@
|
|
|
|
|
}) |
|
|
|
|
return result; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 切换TabBar时执行的回调函数 */ |
|
|
|
|
function setstate(state : number) { |
|
|
|
|
details.checkstate = state |
|
|
|
|
if (state === 1) return details.renderList = details.uplistarr |
|
|
|
|
else if (state === 2) return details.renderList = details.datalist |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 开启小程序扫描 */ |
|
|
|
|
function handleScan() { |
|
|
|
|
// 微信小程序适配 |
|
|
|
|
uni.scanCode({ |
|
|
|
@ -532,6 +606,100 @@
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 按托盘下架 */ |
|
|
|
|
const handleDownLoadByTray = () => { |
|
|
|
|
if (!details.reqobj.trayCode) return uni.showToast({ |
|
|
|
|
title: '托盘数据有存在异常', |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
let url = '/pagesHome/pages/DownGoods/DownGoods?type=' + 1 + '&pageName=' + '按托盘下架' + '&trayCode=' + details.reqobj.trayCode |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 移除待上架数据 */ |
|
|
|
|
const handleRemove = (index : number) => { |
|
|
|
|
details.uplistarr.splice(index, 1) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 下架库位中订单内包件 */ |
|
|
|
|
const handleDownLoadByOrder = async (item : any) => { |
|
|
|
|
const res = await postorderUpshelfDetailByAllocationId({ |
|
|
|
|
orderCode: item.orderCode, |
|
|
|
|
allocationId: details.allocationId |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if (res.code !== 200) return |
|
|
|
|
|
|
|
|
|
details.orderPackageCodeList = res.data && res.data.map(val => { |
|
|
|
|
return { |
|
|
|
|
code: val, |
|
|
|
|
checked: true |
|
|
|
|
} |
|
|
|
|
}) || [] |
|
|
|
|
|
|
|
|
|
chooseOrderPackageCodeList.value = res.data || [] |
|
|
|
|
|
|
|
|
|
downLoadByOrder.value.setDetails({ |
|
|
|
|
title: '包件下架', |
|
|
|
|
showPopUp: true, |
|
|
|
|
async success() { |
|
|
|
|
if (details.orderPackageCodeList.length === 0) return uni.showToast({ |
|
|
|
|
title: '没有需要下架的数据' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if (chooseOrderPackageCodeList.value.length === 0) return uni.showToast({ |
|
|
|
|
title: '最少选择一条需要下架的数据' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const submitData = { |
|
|
|
|
upShelfPackageList: chooseOrderPackageCodeList.value.map((val) => { |
|
|
|
|
return { orderPackageCode: val } |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const res = await warehouseUpdownTypedownPackage(submitData) |
|
|
|
|
if (res.code !== 200) return |
|
|
|
|
|
|
|
|
|
details.scancode = details.allocationId |
|
|
|
|
scandata() |
|
|
|
|
downLoadByOrder.value.details.showPopUp = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 下架 -- 订单 -- 全选 */ |
|
|
|
|
const handleCheckAll = () => { |
|
|
|
|
const _arr = [] |
|
|
|
|
|
|
|
|
|
for (let iterator of details.orderPackageCodeList) { |
|
|
|
|
iterator.checked = true |
|
|
|
|
_arr.push(iterator.code) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
chooseOrderPackageCodeList.value = _arr |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 下架 -- 订单 -- 全部取消选择 */ |
|
|
|
|
const handleCloseCheck = () => { |
|
|
|
|
chooseOrderPackageCodeList.value = [] |
|
|
|
|
|
|
|
|
|
for (let iterator of details.orderPackageCodeList) { |
|
|
|
|
iterator.checked = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 下架 -- 订单 -- 单个点击 */ |
|
|
|
|
const handleCheck = (item) => { |
|
|
|
|
if (item.checked) chooseOrderPackageCodeList.value.splice(chooseOrderPackageCodeList.value.indexOf(item.code), 1) |
|
|
|
|
else chooseOrderPackageCodeList.value.push(item.code) |
|
|
|
|
|
|
|
|
|
item.checked = !item.checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const { |
|
|
|
|
uplistarr, |
|
|
|
|
checkstate, |
|
|
|
@ -540,7 +708,7 @@
|
|
|
|
|
} = toRefs(details) |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.butbox { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
@ -638,6 +806,12 @@
|
|
|
|
|
width: 32upx; |
|
|
|
|
height: 32upx; |
|
|
|
|
margin-right: 15upx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&.removeicon { |
|
|
|
|
width: 64upx; |
|
|
|
|
height: 64upx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
>view { |
|
|
|
@ -652,20 +826,6 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.viewnum { |
|
|
|
|
height: 100upx; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: space-around; |
|
|
|
|
|
|
|
|
|
>view { |
|
|
|
|
font-size: 28upx; |
|
|
|
|
font-weight: 400; |
|
|
|
|
color: #020B18; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.tabchecklist { |
|
|
|
|
width: 684upx; |
|
|
|
|
height: 100upx; |
|
|
|
@ -873,4 +1033,63 @@
|
|
|
|
|
padding: 15upx 0; |
|
|
|
|
border-radius: 10upx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 下架按钮 |
|
|
|
|
.downloadBtn { |
|
|
|
|
width: fit-content; |
|
|
|
|
background: var(--subjectColor); |
|
|
|
|
color: #fff; |
|
|
|
|
margin: 10upx auto; |
|
|
|
|
padding: 20upx 40upx; |
|
|
|
|
font-size: 0.9rem; |
|
|
|
|
border-radius: 10upx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 下架 -- 包件 |
|
|
|
|
.downloadRow { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
padding: 18upx 24upx; |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
border-bottom: 4upx solid #EEEEEE; |
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
flex: none; |
|
|
|
|
width: 52upx; |
|
|
|
|
height: 52upx; |
|
|
|
|
margin-right: 15upx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
>view { |
|
|
|
|
font-size: 0.9rem; |
|
|
|
|
font-weight: bold; |
|
|
|
|
color: #020B18; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.downLoadByOrder_control { |
|
|
|
|
>image { |
|
|
|
|
width: 52upx; |
|
|
|
|
height: 52upx; |
|
|
|
|
margin-left: 20upx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 零担 || 库存品下架 |
|
|
|
|
.downLoadByStock_row { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
>view { |
|
|
|
|
font-weight: bold; |
|
|
|
|
font-size: 0.9rem; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
>input { |
|
|
|
|
flex: 1; |
|
|
|
|
background: #F4F8FB; |
|
|
|
|
padding: 10upx 20upx; |
|
|
|
|
border-radius: 10upx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |