<template>
|
<view>
|
<view class="itemstyle">
|
<uni-forms label-width="180">
|
<uni-forms-item label="外箱码:">
|
<uni-easyinput type="text" placeholder="请扫描外箱码" ref='midInput' :focus="!focus" v-model="barcode"
|
@input="barcodeInput" />
|
</uni-forms-item>
|
<uni-forms-item>
|
<button @click="InEmpty" type="primary" size="default" style="margin-top: 2%;">出货</button>
|
</uni-forms-item>
|
</uni-forms>
|
</view>
|
<view style="padding: 0 14rpx 20rpx;">
|
<!-- 当前出库外包号 -->
|
<view v-for="(i,index) in listOutBags" :key="index" class="item_box">
|
<view style="line-height: 17px;color: #596671;font-size: 14px;text-align: left;font-weight: bold;">外包号:{{i}}
|
</view>
|
</view>
|
</view>
|
<view style="padding: 0 14rpx 20rpx;">
|
<!-- 明细 -->
|
<view v-for="i in list" :key="i.id" class="item_box">
|
<view style="line-height: 17px;color: #596671;font-size: 14px;text-align: left;font-weight: bold;">订单明细行号:{{i.rowId}}
|
</view>
|
<view style="margin-top: 22rpx;height: 140rpx;display: flex;flex-direction: column;justify-content: space-around;">
|
<view style="color: #00070F;font-size: 12px;">客户代号:{{i.customer}}</view>
|
<view style="color: #00070F;font-size: 12px;">产品编号:{{i.pCode}}</view>
|
<view style="color: #00070F;font-size: 12px;">订单数量:{{i.qtyPcs}}</view>
|
<view style="color: #00070F;font-size: 12px;">已出数量:{{i.overQtyPcs}}</view>
|
</view>
|
</view>
|
</view>
|
<uni-load-more :status="status" v-if="loadVisible"></uni-load-more>
|
<u-toast ref="uToast" />
|
</view>
|
</template>
|
|
<script>
|
const innerAudioContext = uni.createInnerAudioContext();
|
export default {
|
data() {
|
return {
|
focus: false,
|
barcode: "",
|
proOutNo: "",
|
id: null,
|
list:[],
|
listOutBags:[]
|
}
|
},
|
onShow() {},
|
onLoad(res) {
|
this.proOutNo=res.proOutNo;
|
this.GetDetail(res.id);
|
this.id=res.id;
|
//已出箱号
|
},
|
methods: {
|
GetDetail(value) {
|
this.$u.post('/api/ProOutOrder/GetOrderDetails?keyId='+value).then(
|
res => {
|
if (res.status) {
|
this.list=res.data.proOutOrderDetails;
|
this.listOutBags=res.data.outBags;
|
} else {
|
this.$refs.uToast.show({
|
title: res.message,
|
type: "error"
|
})
|
}
|
})
|
},
|
voiceSpeech(src) {
|
innerAudioContext.src = src; // '../../static/success.mp3';
|
innerAudioContext.play();
|
},
|
barcodeInput(value) {
|
this.$nextTick(function(x) {
|
if (this.barcode.length > 0) {
|
this.focus = true;
|
this.barcode=value.split(',')[0];
|
}
|
})
|
},
|
InEmpty() {
|
if (this.barcode == "") {
|
this.$refs.uToast.show({
|
title: "请扫描外箱码",
|
type: 'error'
|
})
|
return;
|
}
|
var postData = {
|
MainData: {
|
|
},
|
DelKeys:[this.barcode]
|
}
|
this.$u.post('/api/ProOutOrder/OutProductPK?proOutNo='+this.proOutNo,postData).then(
|
res => {
|
if (res.status) {
|
this.$refs.uToast.show({
|
title: "成功",
|
type: "success"
|
})
|
this.barcode = "";
|
this.focus = false;
|
this.address = "";
|
this.GetDetail(this.id);
|
} else {
|
this.$refs.uToast.show({
|
title: res.message,
|
type: "error"
|
})
|
}
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
@import '@/common/uni-ui.scss';
|
|
.content {
|
display: flex;
|
height: 150px;
|
}
|
|
.content-text {
|
font-size: 14px;
|
color: #666;
|
}
|
|
.itemstyle {
|
margin-top: 30px;
|
margin-left: 5%;
|
}
|
.item_box {
|
background-color: white;
|
// height: 344rpx;
|
border-radius: 12rpx;
|
padding: 40rpx 38rpx 28rpx 34rpx;
|
font-size: 24rpx;
|
line-height: 34rpx;
|
margin-top: 20rpx;
|
}
|
.headerstyle {
|
width: 90%;
|
}
|
</style>
|