|
|
|
@ -222,12 +222,16 @@
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="downloadBtn" @click="handleDownLoad(item)"> |
|
|
|
|
下架 |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<image v-if="Number(details.upshelfScanType)!=3" class="qtimgzt" |
|
|
|
|
:src="item.totalNum==item.shelfNum?'/pagesHome/static/qitao.png':'/pagesHome/static/weiqitao.png'"> |
|
|
|
|
</image> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="item1" v-if="checkstate==3&&reqobj.trayCode"> |
|
|
|
|
<view class="item1" v-if="checkstate==3"> |
|
|
|
|
<view> |
|
|
|
|
<image src="/pagesHome/static/kuweiicon.png"></image> |
|
|
|
|
<view>托盘码:{{reqobj.trayCode + `(${reqobj.trayName})`}}</view> |
|
|
|
@ -236,6 +240,11 @@
|
|
|
|
|
<image src="/pagesHome/static/scanicon.png"></image> |
|
|
|
|
<view>扫码包数:{{reqobj.trayNum}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view> |
|
|
|
|
<view class="downloadBtn" @click="handleDownLoadByTray"> |
|
|
|
|
下架 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
@ -247,6 +256,7 @@
|
|
|
|
|
</view> |
|
|
|
|
<view @click="uplist">上架</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="tanchuangbg" v-if="showstate"> |
|
|
|
|
<view class="inputbox" @click.stop.prevent v-if="showstate==2"> |
|
|
|
|
<view class="makinp" @click="checkmake" v-if="details.upshelfScanType=='3'||details.upshelfScanType=='4'"> |
|
|
|
@ -340,6 +350,65 @@
|
|
|
|
|
<!-- #endif --> |
|
|
|
|
<tips ref="tip"></tips> |
|
|
|
|
<tiplist ref="tiplists"></tiplist> |
|
|
|
|
|
|
|
|
|
<!-- 下架 -- 包条 --> |
|
|
|
|
<PopUp ref="downLoadByOrder"> |
|
|
|
|
<view class="downLoadByOrder_control"> |
|
|
|
|
<!-- 全选 --> |
|
|
|
|
<image |
|
|
|
|
v-show="chooseOrderPackageCodeList.length === details.orderPackageCodeList.length&&chooseOrderPackageCodeList.length !== 0" |
|
|
|
|
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 style="word-break: break-all;"> |
|
|
|
|
<text> |
|
|
|
|
{{details.stockItem.goodsType === 2?'运单号': '物料名称'}}: |
|
|
|
|
</text> |
|
|
|
|
<text> |
|
|
|
|
{{details.stockItem.goodsType === 2?details.stockItem.waybillNo: details.stockItem.materialName }} |
|
|
|
|
</text> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="mt10"> |
|
|
|
|
<text> |
|
|
|
|
上架数: |
|
|
|
|
</text> |
|
|
|
|
<text> |
|
|
|
|
{{details.stockItem.shelfNum}} |
|
|
|
|
</text> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="downLoadByStock_row mt10"> |
|
|
|
|
<view> |
|
|
|
|
下架数: |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<input v-model="details.enterNum" type="number" /> |
|
|
|
|
</view> |
|
|
|
|
</PopUp> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
@ -350,6 +419,11 @@
|
|
|
|
|
warehouseUpdownTypeupShelfZeroOrder, |
|
|
|
|
warehouseUpdownTypegetStockByParam, |
|
|
|
|
warehouseUpdownTypeupShelfStockList, |
|
|
|
|
postorderUpshelfDetailByAllocationId, |
|
|
|
|
warehouseUpdownTypedownPackage, |
|
|
|
|
warehouseUpdownTypedownStock, |
|
|
|
|
warehouseUpdownTypedownZeroOrder, |
|
|
|
|
warehouseUpdownTypedownTrayCode |
|
|
|
|
} from '@/api/user.js' |
|
|
|
|
import { |
|
|
|
|
onLoad, |
|
|
|
@ -369,6 +443,9 @@
|
|
|
|
|
// 组件实例 |
|
|
|
|
const tip = ref(null) |
|
|
|
|
const tiplists = ref(null) |
|
|
|
|
/** 下架 -- 包条 */ |
|
|
|
|
const downLoadByOrder = ref() |
|
|
|
|
const downLoadByStock = ref() |
|
|
|
|
|
|
|
|
|
let details = reactive({ |
|
|
|
|
checkstate: 1, |
|
|
|
@ -387,7 +464,17 @@
|
|
|
|
|
pageName: "", |
|
|
|
|
/** 是否执行扫描函数 */ |
|
|
|
|
isScan: true, |
|
|
|
|
/** 包件list */ |
|
|
|
|
orderPackageCodeList: [], |
|
|
|
|
/** 库存品 || 零担 提交数 */ |
|
|
|
|
enterNum: 0, |
|
|
|
|
/** 库存品 || 零担被选中的数据 */ |
|
|
|
|
stockItem: {} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
/** 被选中的包件 */ |
|
|
|
|
const chooseOrderPackageCodeList = ref([]) |
|
|
|
|
|
|
|
|
|
onLoad((op) => { |
|
|
|
|
details.pageName = op.pageName |
|
|
|
|
details.upshelfScanType = op.type |
|
|
|
@ -757,6 +844,204 @@
|
|
|
|
|
}, 200) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 按托盘下架 */ |
|
|
|
|
const handleDownLoadByTray = () => { |
|
|
|
|
if (!details.reqobj.trayCode) return uni.showToast({ |
|
|
|
|
title: '托盘数据有存在异常', |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
tip.value.setdetails({ |
|
|
|
|
title: '提示', |
|
|
|
|
content: '确认下架?', |
|
|
|
|
confirmTxt: '确认', |
|
|
|
|
isshow: true, |
|
|
|
|
isshowcancel: true, |
|
|
|
|
success: async () => { |
|
|
|
|
let res : any = null |
|
|
|
|
const data = { |
|
|
|
|
trayCode: details.reqobj.trayCode |
|
|
|
|
} |
|
|
|
|
res = await warehouseUpdownTypedownTrayCode(data, { isShowLoading: true }) |
|
|
|
|
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
// utils.ttsspke(`成功上架${_totalShelfNum}件`) |
|
|
|
|
details.uplistarr = [] |
|
|
|
|
details.scancode = details.allocationId |
|
|
|
|
details.allocationId = '' |
|
|
|
|
scandata() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
tip.value.setisshow(false) |
|
|
|
|
}, |
|
|
|
|
cancel: () => { |
|
|
|
|
tip.value.setisshow(false) |
|
|
|
|
}, |
|
|
|
|
close: () => { |
|
|
|
|
tip.value.setisshow(false) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 移除待上架数据 */ |
|
|
|
|
const handleRemove = (index : number) => { |
|
|
|
|
details.uplistarr.splice(index, 1) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 下架 -- 订单 -- 全选 */ |
|
|
|
|
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 handleDownLoadByOrder = async (item : any) => { |
|
|
|
|
console.log('item :>> ', item); |
|
|
|
|
|
|
|
|
|
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: '没有需要下架的数据', |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if (chooseOrderPackageCodeList.value.length === 0) return uni.showToast({ |
|
|
|
|
title: '最少选择一条需要下架的数据', |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
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 handleDownLoadByStock = async (item : any) => { |
|
|
|
|
const content = item.goodsType === 2 ? '零担下架' : '库存品下架' |
|
|
|
|
details.stockItem = item |
|
|
|
|
details.enterNum = item.shelfNum |
|
|
|
|
|
|
|
|
|
downLoadByStock.value.setDetails({ |
|
|
|
|
title: content, |
|
|
|
|
showPopUp: true, |
|
|
|
|
async success() { |
|
|
|
|
let content = '' |
|
|
|
|
|
|
|
|
|
if (!utils.isNumber(details.enterNum)) { |
|
|
|
|
content = '请输入数字' |
|
|
|
|
} else { |
|
|
|
|
// 去除小数位 |
|
|
|
|
details.enterNum = Math.floor(details.enterNum) |
|
|
|
|
|
|
|
|
|
if (details.enterNum <= 0) content = '请输入大于0的数量' |
|
|
|
|
else if (details.enterNum > details.stockItem.shelfNum) content = '不能大于上架数量' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (content) return uni.showToast({ |
|
|
|
|
title: content, |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
let res = {} |
|
|
|
|
|
|
|
|
|
if (details.stockItem.goodsType === 2) { |
|
|
|
|
// 零担下架 |
|
|
|
|
const data = { |
|
|
|
|
upShelfZeroOrderList: [ |
|
|
|
|
{ |
|
|
|
|
waybillCode: details.stockItem.waybillNo, |
|
|
|
|
orderCode: details.stockItem.orderCode, |
|
|
|
|
enterNum: details.enterNum, |
|
|
|
|
allocationId: details.allocationId, |
|
|
|
|
}] |
|
|
|
|
} |
|
|
|
|
res = await warehouseUpdownTypedownZeroOrder(data) |
|
|
|
|
} else { |
|
|
|
|
// |
|
|
|
|
const data = { |
|
|
|
|
upShelfStockList: [{ |
|
|
|
|
marketId: details.stockItem.marketId, |
|
|
|
|
materialCode: details.stockItem.materialCode, |
|
|
|
|
incomingBatch: details.stockItem.incomingBatch, |
|
|
|
|
enterNum: details.enterNum, |
|
|
|
|
allocationId: details.allocationId, |
|
|
|
|
}] |
|
|
|
|
} |
|
|
|
|
res = await warehouseUpdownTypedownStock(data) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('res :>> ', res); |
|
|
|
|
|
|
|
|
|
if (res.code !== 200) return |
|
|
|
|
|
|
|
|
|
details.scancode = details.allocationId |
|
|
|
|
scandata() |
|
|
|
|
downLoadByStock.value.details.showPopUp = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleDownLoad = (item) => { |
|
|
|
|
const { goodsType } = item |
|
|
|
|
|
|
|
|
|
if (goodsType === 0 || goodsType === 1) handleDownLoadByOrder(item) |
|
|
|
|
else if (goodsType === 2) handleDownLoadByStock(item) |
|
|
|
|
else if (goodsType === 3) handleDownLoadByStock(item) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const { |
|
|
|
|
checkinarr, |
|
|
|
|
checkmakindex, |
|
|
|
@ -773,7 +1058,7 @@
|
|
|
|
|
} = toRefs(details) |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.tanchuangbg { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
@ -1331,6 +1616,70 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 下架按钮 |
|
|
|
|
.downloadBtn { |
|
|
|
|
flex: none; |
|
|
|
|
width: fit-content; |
|
|
|
|
background: var(--subjectColor); |
|
|
|
|
color: #fff !important; |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.mt10 { |
|
|
|
|
margin-top: 20upx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.flex-c-sb { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|