|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<view class="container">
|
|
<view class="container">
|
|
<uni-forms
|
|
<uni-forms
|
|
- ref="valiForm"
|
|
|
|
|
|
+ ref="valiFormRef"
|
|
label-align="right"
|
|
label-align="right"
|
|
:label-width="80"
|
|
:label-width="80"
|
|
:rules="rules"
|
|
:rules="rules"
|
|
@@ -28,7 +28,6 @@
|
|
</uni-easyinput>
|
|
</uni-easyinput>
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
<!-- <text class='weight-tip'>复称重量作用是确保句惠完整,防止工作人员计费称車后进行的其他操作引起的物品丢失问题</text> -->
|
|
<!-- <text class='weight-tip'>复称重量作用是确保句惠完整,防止工作人员计费称車后进行的其他操作引起的物品丢失问题</text> -->
|
|
- <!-- <uni-section title="绑定批托盘号" type="line" padding style="height: calc(100vh - 100px)"> -->
|
|
|
|
<uni-forms-item label="绑定批次号" name="batchNum" class="select-item">
|
|
<uni-forms-item label="绑定批次号" name="batchNum" class="select-item">
|
|
<uni-data-select
|
|
<uni-data-select
|
|
v-if="!editBatchNum"
|
|
v-if="!editBatchNum"
|
|
@@ -48,20 +47,16 @@
|
|
popup-title="绑定托盘号"
|
|
popup-title="绑定托盘号"
|
|
:localdata="options.pallet"
|
|
:localdata="options.pallet"
|
|
v-model="valiFormData.palletNum"
|
|
v-model="valiFormData.palletNum"
|
|
- @change="onchange"
|
|
|
|
- @nodeclick="onnodeclick"
|
|
|
|
- @popupopened="onpopupopened"
|
|
|
|
- @popupclosed="onpopupclosed"
|
|
|
|
|
|
+ :clear-icon="false"
|
|
></uni-data-picker>
|
|
></uni-data-picker>
|
|
|
|
|
|
<uni-easyinput v-if="editPalletNum" :value="palletNum" :disabled="editPalletNum" />
|
|
<uni-easyinput v-if="editPalletNum" :value="palletNum" :disabled="editPalletNum" />
|
|
<button v-if="!editPalletNum" type="primary" @click="submitPalletNum">确认</button>
|
|
<button v-if="!editPalletNum" type="primary" @click="submitPalletNum">确认</button>
|
|
<button v-if="editPalletNum" type="primary" @click="editPalletNum = false">修改</button>
|
|
<button v-if="editPalletNum" type="primary" @click="editPalletNum = false">修改</button>
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
- <!-- </uni-section> -->
|
|
|
|
</uni-forms>
|
|
</uni-forms>
|
|
<view class="button-group">
|
|
<view class="button-group">
|
|
- <button type="info" @click="reset">重置</button>
|
|
|
|
|
|
+ <button type="default" @click="reset">重置</button>
|
|
<button type="default" @click="checkOrder" :loading="loading">
|
|
<button type="default" @click="checkOrder" :loading="loading">
|
|
<uni-icons v-if="!loading" type="search" size="18"></uni-icons>
|
|
<uni-icons v-if="!loading" type="search" size="18"></uni-icons>
|
|
查看运单
|
|
查看运单
|
|
@@ -117,7 +112,7 @@ import {
|
|
import { checkPermission } from '@/utils'
|
|
import { checkPermission } from '@/utils'
|
|
import { bindShipping, getBindParams, getWaybills } from '@/services/scanLotno'
|
|
import { bindShipping, getBindParams, getWaybills } from '@/services/scanLotno'
|
|
|
|
|
|
-const token = ref()
|
|
|
|
|
|
+const valiFormRef = ref()
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
const hidePage = ref(false)
|
|
const hidePage = ref(false)
|
|
const focusType = ref(true)
|
|
const focusType = ref(true)
|
|
@@ -133,7 +128,7 @@ const valiFormData = ref({
|
|
orderNum: '',
|
|
orderNum: '',
|
|
weight: '',
|
|
weight: '',
|
|
batchNum: '',
|
|
batchNum: '',
|
|
- palletNum: '',
|
|
|
|
|
|
+ palletNum: '0',
|
|
})
|
|
})
|
|
|
|
|
|
const rules = reactive({
|
|
const rules = reactive({
|
|
@@ -152,11 +147,6 @@ const options = reactive({
|
|
pallet: [] as any,
|
|
pallet: [] as any,
|
|
})
|
|
})
|
|
|
|
|
|
-const onnodeclick = () => {}
|
|
|
|
-const onpopupopened = () => {}
|
|
|
|
-const onpopupclosed = () => {}
|
|
|
|
-const onchange = () => {}
|
|
|
|
-
|
|
|
|
const scanInput = async () => {
|
|
const scanInput = async () => {
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
let status = await checkPermission()
|
|
let status = await checkPermission()
|
|
@@ -233,7 +223,7 @@ const palletNum = computed(() => {
|
|
|
|
|
|
const checkOrder = async () => {
|
|
const checkOrder = async () => {
|
|
loading.value = true
|
|
loading.value = true
|
|
- // uni.setStorageSync('waybills', [])
|
|
|
|
|
|
+ uni.setStorageSync('waybills', [])
|
|
|
|
|
|
const res = await getWaybills({
|
|
const res = await getWaybills({
|
|
order_no: valiFormData.value.orderNum,
|
|
order_no: valiFormData.value.orderNum,
|
|
@@ -244,17 +234,17 @@ const checkOrder = async () => {
|
|
})
|
|
})
|
|
|
|
|
|
loading.value = false
|
|
loading.value = false
|
|
- if (res.data.code == 1) {
|
|
|
|
|
|
+ if (res.code == 1) {
|
|
messageType.value = 'success'
|
|
messageType.value = 'success'
|
|
- messageText.value = res.data.msg
|
|
|
|
|
|
+ messageText.value = res.msg
|
|
messageRef.value.open()
|
|
messageRef.value.open()
|
|
- // uni.setStorageSync('waybills', res.data.data.waybills)
|
|
|
|
|
|
+ uni.setStorageSync('waybills', res.data.waybills)
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: '/pages/scanLotno/waybillsList',
|
|
url: '/pages/scanLotno/waybillsList',
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
messageType.value = 'error'
|
|
messageType.value = 'error'
|
|
- messageText.value = res.data.msg
|
|
|
|
|
|
+ messageText.value = res.msg
|
|
messageRef.value.open()
|
|
messageRef.value.open()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -289,12 +279,12 @@ const onsubmit = async () => {
|
|
})
|
|
})
|
|
|
|
|
|
loading.value = false
|
|
loading.value = false
|
|
- if (res.data.code == 1) {
|
|
|
|
|
|
+ if (res.code == 1) {
|
|
messageType.value = 'success'
|
|
messageType.value = 'success'
|
|
- messageText.value = res.data.msg
|
|
|
|
|
|
+ messageText.value = res.msg
|
|
messageRef.value.open()
|
|
messageRef.value.open()
|
|
|
|
|
|
- if (res.data.data.labels && res.data.data.labels.length > 0) {
|
|
|
|
|
|
+ if (res.data.labels && res.data.labels.length > 0) {
|
|
console.log('有打印面单')
|
|
console.log('有打印面单')
|
|
// res.data.data.labels.map((url: string) => {
|
|
// res.data.data.labels.map((url: string) => {
|
|
// let path = fullUrl(url);
|
|
// let path = fullUrl(url);
|
|
@@ -313,7 +303,7 @@ const onsubmit = async () => {
|
|
// getHistory()
|
|
// getHistory()
|
|
} else {
|
|
} else {
|
|
messageType.value = 'error'
|
|
messageType.value = 'error'
|
|
- messageText.value = res.data.msg
|
|
|
|
|
|
+ messageText.value = res.msg
|
|
messageRef.value.open()
|
|
messageRef.value.open()
|
|
// const historyItem = {
|
|
// const historyItem = {
|
|
// orderNum: valiFormData.value.orderNum,
|
|
// orderNum: valiFormData.value.orderNum,
|
|
@@ -332,11 +322,10 @@ const onsubmit = async () => {
|
|
}, 1000)
|
|
}, 1000)
|
|
}
|
|
}
|
|
|
|
|
|
-const getHistory = () => {
|
|
|
|
- lotnoLogHistory.value = uni.getStorageSync('lotnoLogHistory') || []
|
|
|
|
-}
|
|
|
|
|
|
+// const getHistory = () => {
|
|
|
|
+// lotnoLogHistory.value = uni.getStorageSync('lotnoLogHistory') || []
|
|
|
|
+// }
|
|
const keypress = (e: any) => {
|
|
const keypress = (e: any) => {
|
|
- console.log(e, '按键码')
|
|
|
|
// 102 左侧 103 右侧 104 中间按键
|
|
// 102 左侧 103 右侧 104 中间按键
|
|
if (e.keyCode === 102 || e.keyCode === 103 || e.keyCode === 104) {
|
|
if (e.keyCode === 102 || e.keyCode === 103 || e.keyCode === 104) {
|
|
//这里按键成功
|
|
//这里按键成功
|
|
@@ -387,9 +376,8 @@ onBackPress(() => {
|
|
})
|
|
})
|
|
onShow(() => {
|
|
onShow(() => {
|
|
hidePage.value = false
|
|
hidePage.value = false
|
|
- token.value = uni.getStorageSync('token')
|
|
|
|
_getBindParams()
|
|
_getBindParams()
|
|
- getHistory()
|
|
|
|
|
|
+ // getHistory()
|
|
})
|
|
})
|
|
const setFocus = () => {
|
|
const setFocus = () => {
|
|
if (hidePage.value) {
|
|
if (hidePage.value) {
|
|
@@ -403,8 +391,8 @@ const setFocus = () => {
|
|
const _getBindParams = async () => {
|
|
const _getBindParams = async () => {
|
|
const res = await getBindParams()
|
|
const res = await getBindParams()
|
|
|
|
|
|
- if (res.data.code === 1) {
|
|
|
|
- options.batch = res.data.data.batch_number.map((item: any) => {
|
|
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
+ options.batch = res.data.batch_number.map((item: any) => {
|
|
return { text: item.name, value: item.id }
|
|
return { text: item.name, value: item.id }
|
|
})
|
|
})
|
|
// eslint-disable-next-line no-inner-declarations
|
|
// eslint-disable-next-line no-inner-declarations
|
|
@@ -420,7 +408,9 @@ const _getBindParams = async () => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- const shipping = transformData(res.data.data.shipping)
|
|
|
|
|
|
+ const shipping = transformData(res.data.shipping)
|
|
|
|
+ console.log('shipping', shipping)
|
|
|
|
+
|
|
options.pallet = shipping
|
|
options.pallet = shipping
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -442,14 +432,16 @@ onNavigationBarButtonTap((event) => {
|
|
|
|
|
|
.weight-right {
|
|
.weight-right {
|
|
padding-right: 10rpx;
|
|
padding-right: 10rpx;
|
|
- font-size: 14rpx;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.weight-tip {
|
|
.weight-tip {
|
|
color: gray;
|
|
color: gray;
|
|
font-size: 12rpx;
|
|
font-size: 12rpx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+:deep(.selected-area) {
|
|
|
|
+ flex: 0 1 auto;
|
|
|
|
+ height: auto;
|
|
|
|
+}
|
|
.select-item {
|
|
.select-item {
|
|
:deep(.uni-forms-item__content) {
|
|
:deep(.uni-forms-item__content) {
|
|
display: flex !important;
|
|
display: flex !important;
|
|
@@ -461,7 +453,7 @@ onNavigationBarButtonTap((event) => {
|
|
|
|
|
|
button {
|
|
button {
|
|
height: 35px;
|
|
height: 35px;
|
|
- font-size: 16rpx;
|
|
|
|
|
|
+ font-size: 24rpx;
|
|
margin-left: 10rpx;
|
|
margin-left: 10rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -479,7 +471,7 @@ onNavigationBarButtonTap((event) => {
|
|
height: 35px;
|
|
height: 35px;
|
|
width: 50%;
|
|
width: 50%;
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
- font-size: 16rpx;
|
|
|
|
|
|
+ font-size: 24rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.uni-icons {
|
|
.uni-icons {
|