|
|
|
@ -12,23 +12,26 @@
|
|
|
|
|
</view> |
|
|
|
|
<view class="tps"> |
|
|
|
|
<view> |
|
|
|
|
<view>计划件数</view> |
|
|
|
|
<view>{{details.Plannednub}}</view> |
|
|
|
|
<view>包件总数</view> |
|
|
|
|
<view>{{details.datalist.length}}</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view> |
|
|
|
|
<view>配送件数</view> |
|
|
|
|
<view>{{items.reservationNum}}</view> |
|
|
|
|
<view>已签包件</view> |
|
|
|
|
<view>{{details.signNub}}</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view> |
|
|
|
|
<view>签收件数</view> |
|
|
|
|
<view>{{details.signNub}}</view> |
|
|
|
|
<view>未签包件</view> |
|
|
|
|
<view>{{details.noSingnNum}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template #body> |
|
|
|
|
<view class="main" @touchmove.stop> |
|
|
|
|
<scroll-view class="main" @touchmove.stop :style="{height: details.scrollHeight}" :scroll-y="true" |
|
|
|
|
:scroll-x="true"> |
|
|
|
|
<!-- 表格表头 --> |
|
|
|
|
<view class="main_row main_title"> |
|
|
|
|
<view class=""> |
|
|
|
@ -36,7 +39,11 @@
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class=""> |
|
|
|
|
品类 |
|
|
|
|
订单号 |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class=""> |
|
|
|
|
类型 |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class=""> |
|
|
|
@ -50,27 +57,31 @@
|
|
|
|
|
|
|
|
|
|
<view :style="{height: details.jpScorllViewHeight}" code="id" class="jpScorllView"> |
|
|
|
|
<block v-for="item in datalist" :key="item.orderCode"> |
|
|
|
|
<view |
|
|
|
|
:class="{'main_row': true, 'red': item.orderPackageStatus !== '70', 'green': item.orderPackageStatus === '70'}"> |
|
|
|
|
<view :class="{'main_row': true, 'red': item.isSignfor === 0, 'green': item.isSignfor === 1}"> |
|
|
|
|
<view class=""> |
|
|
|
|
{{item.type === 1? item.orderPackageCode: item.orderPackageCode || '未备货'}} |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class=""> |
|
|
|
|
{{item.orderPackageCode}} |
|
|
|
|
{{item.orderCode || '暂无数据'}} |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class=""> |
|
|
|
|
{{item.typeName || '库存品'}} |
|
|
|
|
{{item.type === 1 ? '定制品' : '库存品'}} |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class=""> |
|
|
|
|
{{item.orderPackageStatus === '70'?'已签':'未签'}} |
|
|
|
|
{{item.isSignfor === 1?'已签':'未签'}} |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view :class="{'red': item.isAbnnormalSigningName ||item.isAbnormalLoadingName}"> |
|
|
|
|
{{item.isAbnnormalSigningName ||item.isAbnormalLoadingName|| '/'}} |
|
|
|
|
<view :class="{'red': item.isAbnormal === 1}"> |
|
|
|
|
{{item.isAbnormal === 1 ? '异常' : '/'}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</block> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
</BasicContainer> |
|
|
|
|
|
|
|
|
@ -88,11 +99,11 @@
|
|
|
|
|
signforsignfor, |
|
|
|
|
signforsignforIn, |
|
|
|
|
signforsignforcontinue, |
|
|
|
|
signforSigningPackageDetail |
|
|
|
|
} from '@/api/user.js' |
|
|
|
|
import { |
|
|
|
|
onLoad, |
|
|
|
|
onShow, |
|
|
|
|
onPullDownRefresh |
|
|
|
|
} from '@dcloudio/uni-app' |
|
|
|
|
import { computed, inject, nextTick, onMounted, reactive, ref, toRefs } from "vue"; |
|
|
|
|
import useSystemSettingsStore from '@/store/useSystemSettingsStore'; |
|
|
|
@ -144,9 +155,13 @@
|
|
|
|
|
jpScorllViewHeight: '', |
|
|
|
|
/** 签收数 */ |
|
|
|
|
signNub: 0, |
|
|
|
|
/** 未签数 */ |
|
|
|
|
noSingnNum: 0 |
|
|
|
|
}) |
|
|
|
|
// 组件实例 |
|
|
|
|
const tiplists = ref(null) |
|
|
|
|
const tip = ref(null) |
|
|
|
|
const basicContainer = ref() |
|
|
|
|
|
|
|
|
|
const ordNub = computed(() => { |
|
|
|
|
let num = 0 |
|
|
|
@ -168,74 +183,23 @@
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
onShow(async () => { |
|
|
|
|
try { |
|
|
|
|
// #ifdef APP |
|
|
|
|
uni.$off('scancodedate') |
|
|
|
|
uni.$on('scancodedate', function (code) { |
|
|
|
|
if (code) { |
|
|
|
|
// 关闭弹窗 |
|
|
|
|
tip.value.setdetails({ isshow: false }) |
|
|
|
|
|
|
|
|
|
console.log(code); |
|
|
|
|
details.scancode = code |
|
|
|
|
scandata() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// #endif |
|
|
|
|
|
|
|
|
|
// 初始化请求页面数据 |
|
|
|
|
let data = { |
|
|
|
|
reservationId: details.items.id, |
|
|
|
|
completecode: details.orderType, |
|
|
|
|
orderCode: details.inputtxt |
|
|
|
|
} |
|
|
|
|
details.datalist = [] |
|
|
|
|
|
|
|
|
|
const promise1 = signfororder(data, { isShowLoading: false }) |
|
|
|
|
const promise2 = signforinventory(data, { isShowLoading: false }) |
|
|
|
|
|
|
|
|
|
uni.showLoading() |
|
|
|
|
const [response, response1] = await Promise.all([promise1, promise2]) |
|
|
|
|
// 零担和定制品 |
|
|
|
|
// let response = null |
|
|
|
|
// response = await signfororder(data) |
|
|
|
|
if (response.code !== 200) return |
|
|
|
|
details.zeroArr = [] |
|
|
|
|
details.orderArr = [] |
|
|
|
|
if (response.data) response.data.forEach(val => { |
|
|
|
|
// 零担订单 |
|
|
|
|
if (val.isZero === '1') return details.zeroArr.push(val) |
|
|
|
|
|
|
|
|
|
if (val.isZero !== '1') details.datalist = [...details.datalist, ...val.distributionAppParcelListVOS] |
|
|
|
|
|
|
|
|
|
// 异常签收 |
|
|
|
|
val.abnormalSignature = 0 |
|
|
|
|
// 异常装车 |
|
|
|
|
val.abnormalLoading = 0 |
|
|
|
|
val.distributionAppParcelListVOS.forEach(value => { |
|
|
|
|
if (value.isAbnnormalSigning === 1) val.abnormalSignature += 1 |
|
|
|
|
if (value.isAbnormalLoading === 1) val.abnormalLoading += 1 |
|
|
|
|
if (val.isZero !== '1') value.typeName = '定制品' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
details.orderArr.push(val) |
|
|
|
|
}) |
|
|
|
|
// 库存品 |
|
|
|
|
if (response1.code !== 200) return |
|
|
|
|
if (response1.data) { |
|
|
|
|
details.stockArr = response1.data || [] |
|
|
|
|
details.datalist = [...details.datalist, ...details.stockArr] |
|
|
|
|
// #ifdef APP |
|
|
|
|
uni.$off('scancodedate') |
|
|
|
|
uni.$on('scancodedate', function (code) { |
|
|
|
|
if (code) { |
|
|
|
|
// 关闭弹窗 |
|
|
|
|
tip.value.setdetails({ isshow: false }) |
|
|
|
|
|
|
|
|
|
console.log(code); |
|
|
|
|
details.scancode = code |
|
|
|
|
scandata() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// #endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
computedNum() |
|
|
|
|
} catch (err) { |
|
|
|
|
console.log('err :>> ', err); |
|
|
|
|
//TODO handle the exception |
|
|
|
|
} finally { |
|
|
|
|
await nextTick() |
|
|
|
|
uni.hideLoading() |
|
|
|
|
} |
|
|
|
|
await nextTick() |
|
|
|
|
basicContainer.value.startPullDownRefresh() |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// onHide(() => { |
|
|
|
@ -255,33 +219,46 @@
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 计算数据 */ |
|
|
|
|
function computedNum() { |
|
|
|
|
const _arr = [...details.orderArr, ...details.stockArr] |
|
|
|
|
|
|
|
|
|
details.Plannednub = 0 |
|
|
|
|
function computedNum(orderPackageCode) { |
|
|
|
|
details.signNub = 0 |
|
|
|
|
details.noSingnNum = 0 |
|
|
|
|
|
|
|
|
|
const _arr = [...details.datalist] |
|
|
|
|
|
|
|
|
|
// 被扫描的包件在第一位, 中间是未扫描的包件, 最后为已扫描的包件 |
|
|
|
|
const _signArr = [] |
|
|
|
|
const _noSignArr = [] |
|
|
|
|
// 被扫描的包条 |
|
|
|
|
let _value : any |
|
|
|
|
|
|
|
|
|
for (let item of _arr) { |
|
|
|
|
details.Plannednub += item.reservationNum |
|
|
|
|
details.signNub += item.signforNub |
|
|
|
|
if (!_value && item.orderPackageCode === orderPackageCode) _value = item |
|
|
|
|
|
|
|
|
|
if (item.isSignfor === 1) { |
|
|
|
|
details.signNub++ |
|
|
|
|
if (item !== _value) _signArr.push(item) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
details.noSingnNum++ |
|
|
|
|
if (item !== _value) _noSignArr.push(item) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 页面下拉刷新 |
|
|
|
|
onPullDownRefresh(async () => { |
|
|
|
|
await initpage() |
|
|
|
|
// 关闭下拉动画 |
|
|
|
|
uni.stopPullDownRefresh() |
|
|
|
|
details.datalist = _value ? [_value, ..._noSignArr, ..._signArr] : [..._noSignArr, ..._signArr] |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
async function scandata() { |
|
|
|
|
let data = { |
|
|
|
|
barcode: details.scancode, |
|
|
|
|
deliveryId: details.deliveryId, |
|
|
|
|
reservationId: details.id, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const _item = details.datalist.find(val => val.orderPackageCode === details.scancode) |
|
|
|
|
|
|
|
|
|
// 定制品 |
|
|
|
|
if (Number(details.orderStatus) == 1) { |
|
|
|
|
if (!_item || _item.type === 1) { |
|
|
|
|
let response = await signforsignfor(data) |
|
|
|
|
console.log(response); |
|
|
|
|
if (response.code === 200) { |
|
|
|
@ -310,7 +287,7 @@
|
|
|
|
|
title: response.msg, |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
initpage() |
|
|
|
|
initpage(details.scancode) |
|
|
|
|
tip.value.setdetails({ isshow: false }) |
|
|
|
|
}, |
|
|
|
|
cancel: () => { |
|
|
|
@ -328,8 +305,8 @@
|
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} else if (Number(details.orderStatus) === 3) { |
|
|
|
|
// data.barcode="23072405915-2" |
|
|
|
|
} else { |
|
|
|
|
// 库存品扫描 |
|
|
|
|
let response = await signforsignforIn(data) |
|
|
|
|
console.log(response); |
|
|
|
|
if (response.code == 3006) { |
|
|
|
@ -349,7 +326,7 @@
|
|
|
|
|
title: response.msg, |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
initpage() |
|
|
|
|
initpage(details.scancode) |
|
|
|
|
tip.value.setdetails({ isshow: false }) |
|
|
|
|
}, |
|
|
|
|
cancel: () => { |
|
|
|
@ -367,7 +344,7 @@
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
initpage() |
|
|
|
|
initpage(details.scancode) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function showsdqs() { |
|
|
|
@ -391,72 +368,33 @@
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function initpage() { |
|
|
|
|
async function initpage(scancode = '') { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
mask: true |
|
|
|
|
}) |
|
|
|
|
try { |
|
|
|
|
details.listcheckindex = -1 |
|
|
|
|
|
|
|
|
|
// 初始化请求页面数据 |
|
|
|
|
let data = { |
|
|
|
|
reservationId: details.id, |
|
|
|
|
completecode: details.orderType, |
|
|
|
|
orderCode: details.inputtxt, |
|
|
|
|
reservationId: details.items.id, |
|
|
|
|
} |
|
|
|
|
details.datalist = [] |
|
|
|
|
let response = null; |
|
|
|
|
// 定制品和零担 |
|
|
|
|
if (details.orderStatus == 1 || details.orderStatus === 2) { |
|
|
|
|
response = await signfororder(data) |
|
|
|
|
if (response.code !== 200) return |
|
|
|
|
details.zeroArr = [] |
|
|
|
|
details.orderArr = [] |
|
|
|
|
response.data.forEach(val => { |
|
|
|
|
// 零担订单 |
|
|
|
|
if (val.isZero === '1') return details.zeroArr.push(val) |
|
|
|
|
|
|
|
|
|
// 异常签收 |
|
|
|
|
val.abnormalSignature = 0 |
|
|
|
|
// 异常装车 |
|
|
|
|
val.abnormalLoading = 0 |
|
|
|
|
val.distributionAppParcelListVOS.forEach(value => { |
|
|
|
|
if (value.isAbnnormalSigning === 1) val.abnormalSignature += 1 |
|
|
|
|
if (value.isAbnormalLoading === 1) val.abnormalLoading += 1 |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
console.log('val :>> ', val); |
|
|
|
|
|
|
|
|
|
details.orderArr.push(val) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// 库存品 |
|
|
|
|
else if (details.orderStatus == 3) { |
|
|
|
|
response = await signforinventory(data) |
|
|
|
|
if (response.code !== 200) return |
|
|
|
|
details.stockArr = response.data || [] |
|
|
|
|
} |
|
|
|
|
// 定制品 |
|
|
|
|
if (details.orderStatus === 1) details.datalist = details.orderArr |
|
|
|
|
// 零担 |
|
|
|
|
else if (details.orderStatus === 2) details.datalist = details.zeroArr |
|
|
|
|
// 库存品 |
|
|
|
|
else details.datalist = details.stockArr |
|
|
|
|
|
|
|
|
|
const res = await signforSigningPackageDetail(data) |
|
|
|
|
|
|
|
|
|
details.datalist = res.data |
|
|
|
|
} catch (err) { |
|
|
|
|
console.log('err :>> ', err); |
|
|
|
|
//TODO handle the exception |
|
|
|
|
} finally { |
|
|
|
|
computedNum() |
|
|
|
|
console.log('222 :>> ', 222); |
|
|
|
|
computedNum(scancode) |
|
|
|
|
uni.hideLoading() |
|
|
|
|
return null |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function setcheckindex(index : number) { |
|
|
|
|
if (details.listcheckindex == index) { |
|
|
|
|
details.listcheckindex = -1 |
|
|
|
|
} else { |
|
|
|
|
details.listcheckindex = index |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const { listcheckindex, inputtxt, orderStatus, datalist, items, typearr, schanvalue } = toRefs(details) |
|
|
|
|
const { datalist, items } = toRefs(details) |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
@ -483,6 +421,7 @@
|
|
|
|
|
font-weight: 400; |
|
|
|
|
color: #092C4D; |
|
|
|
|
margin-bottom: 20upx; |
|
|
|
|
word-break: break-all; |
|
|
|
|
|
|
|
|
|
>.khxb { |
|
|
|
|
display: flex; |
|
|
|
@ -509,45 +448,33 @@
|
|
|
|
|
&:nth-of-type(1) { |
|
|
|
|
>view:nth-of-type(2) { |
|
|
|
|
color: #092C4D; |
|
|
|
|
font-size: 1.2rem; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&:nth-of-type(2) { |
|
|
|
|
>view:nth-of-type(2) { |
|
|
|
|
color: #0086F1; |
|
|
|
|
color: #0a0; |
|
|
|
|
font-size: 1.2rem; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&:nth-of-type(3) { |
|
|
|
|
>view:nth-of-type(2) { |
|
|
|
|
color: #3AD8BC; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&:nth-of-type(4) { |
|
|
|
|
>view:nth-of-type(2) { |
|
|
|
|
color: #FA8C16; |
|
|
|
|
color: #ff5500; |
|
|
|
|
font-size: 1.2rem; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
>view:nth-of-type(2) { |
|
|
|
|
font-size: 36upx; |
|
|
|
|
font-weight: 400; |
|
|
|
|
margin-top: 10upx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 主体内容 |
|
|
|
|
.main { |
|
|
|
|
overflow: scroll; |
|
|
|
|
position: relative; |
|
|
|
|
background: #fff; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.main_title { |
|
|
|
|
// position: absolute; |
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
|
|
>view { |
|
|
|
@ -572,25 +499,17 @@
|
|
|
|
|
word-break: break-all; |
|
|
|
|
text-align: center; |
|
|
|
|
border-bottom: 1upx dashed #999; |
|
|
|
|
width: 240upx; |
|
|
|
|
flex: none; |
|
|
|
|
|
|
|
|
|
&:nth-child(1) { |
|
|
|
|
width: 240upx; |
|
|
|
|
flex: none; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&:nth-child(2) { |
|
|
|
|
&:nth-child(3) { |
|
|
|
|
width: 120upx; |
|
|
|
|
flex: none; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&:nth-child(3) { |
|
|
|
|
width: 240upx; |
|
|
|
|
flex: none; |
|
|
|
|
} |
|
|
|
|
&:last-child { |
|
|
|
|
|
|
|
|
|
&:nth-child(4) { |
|
|
|
|
width: 240upx; |
|
|
|
|
flex: none; |
|
|
|
|
|
|
|
|
|
&.red { |
|
|
|
|
background-color: #ff5500; |
|
|
|
|