货无忧
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

432 lines
0 B

2 years ago
<template>
<!-- <u-navbar title="自提明细扫描" placeholder border=true :autoBack="true" leftIconSize='35'></u-navbar> -->
<u-navbar title="自提明细扫描"
bgColor='#D3832A' leftIconColor='#ffffff'
titleStyle='color:#ffffff' placeholder
:autoBack="true" leftIconSize='35'></u-navbar>
2 years ago
<view class="headtop">
<view>
2 years ago
<view>配车类型{{details.carTypeStr}}</view>
2 years ago
</view>
<view>
2 years ago
<view>车牌号{{details.pickUpPlate}}</view>
<view>司机{{details.consignee}}</view>
2 years ago
</view>
</view>
<view class="tabmabx">
<view>
<uni-table :loading='false' emptyText="暂无更多数据" >
<uni-tr>
<uni-th width="70" align="center"></uni-th>
<uni-th align="center">订单总数</uni-th>
<uni-th align="center">签收件数</uni-th>
</uni-tr>
<uni-tr v-for="item in [1,2]">
<uni-td align="center" class="jhjs">{{item==1?'计划':'完成'}}</uni-td>
<uni-td align="center">{{item==1?details.orderNum:details.completeNum}}</uni-td>
<uni-td align="center">{{item==1?details.planNum:details.signedNum}}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<view class="scinp">
<view>齐套状态</view>
<view>
<cusSelects @change='checktype' :data='typearr' :value="schanvalue" placeholder='全部' :arrLeft='5' size='145' :clearable='true'></cusSelects>
</view>
<view class="inputs">
<input placeholder="请输入查询的订单号"/>
</view>
2 years ago
<view class="btscan" @click="initpage">查询</view>
</view>
<view class="tabtip">
<view @click="setorderStatus(1)">
<view :class="orderType==1?'xz':''">定制品</view>
</view>
<view @click="setorderStatus(2)">
<view :class="orderType==2?'xz':''">库存品</view>
</view>
2 years ago
</view>
<scroll-view scroll-y="true" class="scrollv">
<view class="mabxs">
2 years ago
<view class="ite" @click="showsdqs" v-if="orderType==1" v-for="item in dataList">
2 years ago
<view>
<view @click.stop="goorderdetail(item)">订单号{{item.orderCode}}</view>
<view>包条码{{item.orderPackageCode}}</view>
2 years ago
</view>
<view>
2 years ago
<view>是否扫描{{item.scanStatusStr}}</view>
<view>异常{{item.errorStatusStr}}</view>
2 years ago
</view>
</view>
2 years ago
<view class="ite" @click="showsdqs" v-if="orderType==2" v-for="item in dataList">
<view>
<view>SKU{{item.sku}}</view>
<view>包件号{{item.coding}}</view>
</view>
<view>
<view>物品{{item.descriptionGoods}}</view>
<view>规格{{item.specification}}</view>
</view>
<view>
<view>单位{{item.cargoUnit}}</view>
<view>扫描{{item.scanStatus==1?'未扫描':item.scanStatus==''?'未扫描':'扫描'}}</view>
<!-- <view>规格{{item.specification}}</view> -->
</view>
</view>
2 years ago
</view>
</scroll-view>
2 years ago
<tiplist ref="tiplists"></tiplist>
<saomiao2></saomiao2>
2 years ago
</template>
<script lang="ts" setup>
import {
onLoad,
onShow,
onHide,
onUnload
} from '@dcloudio/uni-app'
2 years ago
import {
billLadingdetailList,
billLadinggetInventoryNum,
billLadingscan
} from '@/api/user.js'
2 years ago
import { pagedetailType } from '@/interfaces/pagesHome/SelfPickupDetails'
import cusSelects from '@/compoment/cus-selects-fan/cus-selects-fan.vue'
import { inject, reactive, ref, toRefs, watchEffect } from "vue";
const utils=inject('utils') as any
2 years ago
let details=reactive<pagedetailType>({
schanvalue:'',
typearr:[
{
value:1,
label:'齐套'
},
{
value:2,
label:'部分扫'
},
{
value:3,
label:'未扫'
}
],
dataList:[],
orderStatus:0,
2 years ago
orderType:1,
2 years ago
billLadingId:'',
2 years ago
orderCode:'',
2 years ago
consignee:'',
pickUpPlate:'',
carTypeStr:'',
orderNum:'',
planNum:'',
completeNum:'',
signedNum:'',
scancode:'',
isscan:false
2 years ago
})
2 years ago
const tiplists=ref(null)
2 years ago
onLoad((op)=>{
details.billLadingId=op.billLadingId
initpage()
1 year ago
// details.scancode='1686568463442280450'
})
onShow(()=>{
2 years ago
uni.$on('scancodedate', function(code) {
if (code) {
console.log(code);
details.scancode=code
sacn()
}
})
2 years ago
})
function goorderdetail(item){
uni.navigateTo({
url:'/pagesHome/pages/orderDetails/orderDetails?orderCode='+item.orderCode
})
}
watchEffect(()=>{
if(details.isscan&&details.signedNum){
utils.ttsspke(details.signedNum+'件')
}
})
onHide(()=>{
uni.$off('scancodedate')
})
2 years ago
function showsdqs(){
tiplists.value.setdetails({
isshow:true,
tipstate:1,
title:'请输入扫描的码',
placeholder:'请输入扫描的码',
2 years ago
inputtext:'',
success:(detail)=>{
details.scancode=detail.inputtext
sacn()
tiplists.value.setdetails({isshow:false})
},
cancel:()=>{
tiplists.value.setdetails({isshow:false})
},
close:()=>{
tiplists.value.setdetails({isshow:false})
}
})
}
async function sacn(){
2 years ago
let data={
2 years ago
id:details.billLadingId,
coding:details.scancode,
type:details.orderType==1?'2':'1'
2 years ago
}
2 years ago
let res=await billLadingscan(data)
console.log(res);
if(res.code==200){
details.isscan=true
initpage()
}
2 years ago
}
async function initpage(){
if(details.orderType==1){
let data={
orderStatus:details.orderStatus,
billLadingId:details.billLadingId,
orderCode:details.orderCode
}
let response=await billLadingdetailList(data)
details.dataList=response.data.list
details.consignee=response.data.consignee
details.pickUpPlate=response.data.pickUpPlate
details.carTypeStr=response.data.carTypeStr
details.orderNum=response.data.orderNum
details.planNum=response.data.planNum
details.completeNum=response.data.completeNum
details.signedNum=response.data.signedNum
}else if(details.orderType==2){
let data={
orderStatus:details.orderStatus,
id:details.billLadingId,
orderCode:details.orderCode,
current:1,
size:10
}
let response=await billLadinggetInventoryNum(data)
details.dataList=response.data.records
// details.consignee=response.data.consignee
// details.pickUpPlate=response.data.pickUpPlate
// details.carTypeStr=response.data.carTypeStr
// details.orderNum=response.data.orderNum
// details.planNum=response.data.planNum
// details.completeNum=response.data.completeNum
// details.signedNum=response.data.signedNum
}
// sacn()
}
function setorderStatus(state:number){
details.orderType=state
initpage()
2 years ago
}
function checktype(e){
if(e==''){
details.schanvalue=''
}
details.typearr.map(item=>{
if(item.value==e){
details.schanvalue=item.label
2 years ago
details.orderStatus=item.value
2 years ago
console.log(details.schanvalue)
}
})
}
2 years ago
const { orderType,schanvalue,typearr,dataList }=toRefs(details)
2 years ago
</script>
<style lang="scss">
2 years ago
.tabtip{
display: flex;
align-items: center;
justify-content: space-between;
>view{
width: 50%;
display: flex;
align-items: center;
justify-content: center;
background-color: #ffffff;
font-size: 32upx;
font-weight: 400;
color: #90A0AF;
>view{
height: 80upx;
border-bottom: 8upx solid #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
}
.xz{
color: #D3832A;
border-bottom: 8upx solid #D3832A;
// border-radius: 5upx;
}
}
2 years ago
.scrollv{
width: 686upx;
height: 48.5vh;
// padding: 10upx;
box-sizing: border-box;
background-color: #ffffff;
margin: auto;
margin-top: 20upx;
padding: 20upx;
box-sizing: border-box;
.mabxs{
display: flex;
flex-direction: column;
align-items: center;
padding-top: 5upx;
.ite{
width: 96%;
// width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 20upx 15upx;
box-sizing: border-box;
border-radius: 8upx;
2 years ago
box-shadow: 0upx 2upx 10upx 0upx #e2e2e3;
2 years ago
margin-bottom: 20upx;
padding-bottom: 10upx;
&:nth-last-child(1){
margin-bottom: 5upx;
}
>view{
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
margin-bottom: 20upx;
&:nth-last-child(1){
margin-bottom: none !important;
}
>view{
// width: 50%;
// flex: 1;
font-size: 28upx;
font-weight: 400;
color: #092C4D;
}
}
}
}
}
.tabmabx{
width: 100%;
padding:0 32upx;
box-sizing: border-box;
background-color: #ffffff;
padding-bottom: 20upx;
.uni-table-th{
background-color: #F8FBFF;
2 years ago
font-size: 28upx;
2 years ago
font-weight: 400;
color: #092C4D;
}
.jhjs{
}
.uni-table-tr:nth-last-child(2)>.uni-table-td{
2 years ago
font-size: 36upx;
2 years ago
font-weight: 400;
color: #092C4D;
&:nth-of-type(1){
2 years ago
font-size: 28upx !important;
2 years ago
font-weight: 400;
color: #092C4D !important;
}
}
.uni-table-tr:nth-last-child(1)>.uni-table-td{
border-bottom: none !important;
2 years ago
font-size: 36upx;
2 years ago
font-weight: 400;
color: #0086F1;
&:nth-of-type(1){
2 years ago
font-size: 28upx !important;
2 years ago
font-weight: 400;
color: #092C4D !important;
}
}
>view{
border-radius: 8upx;
border: 1upx solid #EEEEEE;
padding-bottom: -2upx;
}
}
.headtop{
display: flex;
flex-direction: column;
padding: 34upx 32upx;
box-sizing: border-box;
background-color: #ffffff;
>view{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28upx;
font-weight: 400;
color: #092C4D;
margin-bottom: 24upx;
&:nth-of-type(2){
margin-bottom: 0;
}
>view{
flex: 1;
}
}
}
.scinp{
display: flex;
align-items: center;
justify-content: space-between;
padding: 12upx 32upx;
box-sizing: border-box;
background-color: #ffffff;
>view:nth-of-type(1){
font-size: 28upx;
font-weight: 400;
color: #092C4D;
}
2 years ago
.inputs {
2 years ago
width: 276upx;
height: 64upx;
background: #F5F5F6;
border-radius: 8upx;
opacity: 1;
border: 2upx solid #EEEEEE;
padding: 10upx;
box-sizing: border-box;
2 years ago
font-size: 24upx;
2 years ago
font-weight: 400;
color: #AFB4BA;
2 years ago
>input{
flex: 1;
font-size: 24upx;
color: #092C4D;
}
2 years ago
}
.btscan{
width: 128upx;
height: 64upx;
background: #D3832A;
border-radius: 8upx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32upx;
font-weight: 400;
color: #FFFFFF;
}
}
</style>