|
@@ -264,30 +264,30 @@ const printConfirm = async () => {
|
|
messageText.value = res.msg
|
|
messageText.value = res.msg
|
|
messageRef.value.open()
|
|
messageRef.value.open()
|
|
|
|
|
|
- // const historyItem = {
|
|
|
|
- // order_code: valiFormData.value.order_code,
|
|
|
|
- // createTime: new Date(),
|
|
|
|
- // type: type,
|
|
|
|
- // status: res.data.code,
|
|
|
|
- // }
|
|
|
|
- // printLogHistory.value.unshift(historyItem)
|
|
|
|
- // uni.setStorageSync('printLogHistory', printLogHistory.value)
|
|
|
|
- // getHistory()
|
|
|
|
|
|
+ const historyItem = {
|
|
|
|
+ order_code: valiFormData.value.order_code,
|
|
|
|
+ createTime: new Date(),
|
|
|
|
+ type: type,
|
|
|
|
+ status: res.code,
|
|
|
|
+ }
|
|
|
|
+ printLogHistory.value.unshift(historyItem)
|
|
|
|
+ uni.setStorageSync('printLogHistory', printLogHistory.value)
|
|
|
|
+ getHistory()
|
|
close()
|
|
close()
|
|
} else {
|
|
} else {
|
|
subLoading.value = false
|
|
subLoading.value = false
|
|
messageType.value = 'error'
|
|
messageType.value = 'error'
|
|
messageText.value = '打印失败'
|
|
messageText.value = '打印失败'
|
|
messageRef.value.open()
|
|
messageRef.value.open()
|
|
- // const historyItem = {
|
|
|
|
- // order_code: valiFormData.value.order_code,
|
|
|
|
- // createTime: new Date(),
|
|
|
|
- // type: type,
|
|
|
|
- // status: false,
|
|
|
|
- // }
|
|
|
|
- // printLogHistory.value.unshift(historyItem)
|
|
|
|
- // uni.setStorageSync('printLogHistory', printLogHistory.value)
|
|
|
|
- // getHistory()
|
|
|
|
|
|
+ const historyItem = {
|
|
|
|
+ order_code: valiFormData.value.order_code,
|
|
|
|
+ createTime: new Date(),
|
|
|
|
+ type: type,
|
|
|
|
+ status: false,
|
|
|
|
+ }
|
|
|
|
+ printLogHistory.value.unshift(historyItem)
|
|
|
|
+ uni.setStorageSync('printLogHistory', printLogHistory.value)
|
|
|
|
+ getHistory()
|
|
close()
|
|
close()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -317,9 +317,9 @@ const onsubmit = async () => {
|
|
loading.value = false
|
|
loading.value = false
|
|
}
|
|
}
|
|
|
|
|
|
-// const getHistory = () => {
|
|
|
|
-// printLogHistory.value = uni.getStorageSync('printLogHistory') || []
|
|
|
|
-// }
|
|
|
|
|
|
+const getHistory = () => {
|
|
|
|
+ printLogHistory.value = uni.getStorageSync('printLogHistory') || []
|
|
|
|
+}
|
|
const keypress = (e: any) => {
|
|
const keypress = (e: any) => {
|
|
// 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) {
|
|
@@ -372,14 +372,14 @@ onBackPress(() => {
|
|
|
|
|
|
onShow(() => {
|
|
onShow(() => {
|
|
hidePage.value = false
|
|
hidePage.value = false
|
|
- // getHistory()
|
|
|
|
|
|
+ getHistory()
|
|
_getPrinterList()
|
|
_getPrinterList()
|
|
})
|
|
})
|
|
|
|
|
|
onNavigationBarButtonTap((event) => {
|
|
onNavigationBarButtonTap((event) => {
|
|
if (event.index === 0) {
|
|
if (event.index === 0) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: '/pages/warehouseScan/warehouseLog',
|
|
|
|
|
|
+ url: '/pages/printer/logList',
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|