领料出库
This commit is contained in:
parent
3a7ccb63ef
commit
7e105f1f9d
|
|
@ -205,6 +205,7 @@ import { debounce } from 'lodash-es'
|
|||
import ScanQrCode from '@/pages/devicesSearch/ScanQrCode.vue'
|
||||
import ScanQrCodeBox from '@/pages/devicesSearch/ScanQrCodeBox.vue'
|
||||
import PopupConfirm from '@/components/PopupConfirm'
|
||||
import { useMemberStore } from '@/stores'
|
||||
// const query = defineProps() // 获取上级页面传递的路由参数
|
||||
// const queryParams = JSON.parse(query.queryParams)
|
||||
const loading = ref(false)
|
||||
|
|
@ -229,6 +230,7 @@ const queryCodeParams = ref({
|
|||
const qrCodeScan = ref('')
|
||||
const codeData = ref({})
|
||||
const keyId = ref()
|
||||
const memberStore = useMemberStore()
|
||||
const popupConfirm = ref()
|
||||
const content = ref('是否确定出库?')
|
||||
|
||||
|
|
@ -439,9 +441,9 @@ const onHandleOutbound = async () => {
|
|||
console.log('🚀 ~ onHandleOutbound ~ confirm:', confirm)
|
||||
if (!confirm.data) return
|
||||
if (!keyId.value) {
|
||||
keyId.value = new Date().getTime()
|
||||
keyId.value = memberStore.userInfo.userId + '-' + new Date().getTime()
|
||||
}
|
||||
uni.showLoading()
|
||||
uni.showLoading({ title: '操作中...', mask: true })
|
||||
loading.value = true
|
||||
// 解构所需要的数据
|
||||
const { typeId, parentId, publishTask } = queryParams.value
|
||||
|
|
@ -484,7 +486,9 @@ const onHandleOutbound = async () => {
|
|||
// queryParams.value.typeId,
|
||||
// ) //获取详情
|
||||
keyId.value = null
|
||||
uni.navigateBack()
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ onHandleOutbound ~ error:', error)
|
||||
|
|
@ -772,7 +776,7 @@ const confirmCodeOutBound = async () => {
|
|||
// 组装出库参数
|
||||
const paramsList = []
|
||||
if (!keyId.value) {
|
||||
keyId.value = new Date().getTime()
|
||||
keyId.value = memberStore.userInfo.userId + '-' + new Date().getTime()
|
||||
}
|
||||
paramsList.push({
|
||||
leaseType: 0,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
class="table-list-item"
|
||||
>
|
||||
<uni-swipe-action class="swipe-action">
|
||||
<uni-swipe-action-item :right-options="item.status==2 ? options2 : item.alNum ==0 ? options3 : options"
|
||||
<uni-swipe-action-item :right-options="item.preNum == item.alNum ? options2 : item.alNum ==0 ? options3 : options"
|
||||
@click="onClick($event, item)">
|
||||
<div class="title">
|
||||
<span class="main-title">领料出库</span>
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ import { setOutboundNumAPI, leaseOutByInfoApi } from '@/services/picking/outboun
|
|||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { formatDiff } from '@/utils/bnsBase.js'
|
||||
import PopupConfirm from '@/components/PopupConfirm'
|
||||
import { useMemberStore } from '@/stores'
|
||||
|
||||
const loading = ref(false)
|
||||
const formData = ref({})
|
||||
|
|
@ -66,6 +67,7 @@ const maCodeList = ref([])
|
|||
const popupConfirm = ref()
|
||||
const content = ref('是否确定出库?')
|
||||
const keyId = ref()
|
||||
const memberStore = useMemberStore()
|
||||
|
||||
// 计算出库最大数量
|
||||
const maxNum = computed(() => {
|
||||
|
|
@ -110,9 +112,9 @@ const onChangeNumber = (e) => {
|
|||
// outboundNum.value
|
||||
setTimeout(() => {
|
||||
if (queryParams.value.unitValue == 1) {
|
||||
outboundNum.value = Number(e.replace(/[^\d.]/g, ''))
|
||||
outboundNum.value = Number(String(e).replace(/[^\d.]/g, ''))
|
||||
} else {
|
||||
outboundNum.value = Number(e.replace(/[^\d]/g, ''))
|
||||
outboundNum.value = Number(String(e).replace(/[^\d]/g, ''))
|
||||
}
|
||||
if (Number(e) <= 0) {
|
||||
outboundNum.value = 0
|
||||
|
|
@ -162,7 +164,7 @@ const onHandleOutbound = async () => {
|
|||
console.log('🚀 ~ onHandleOutbound ~ confirm:', confirm)
|
||||
if (!confirm.data) return
|
||||
if (!keyId.value) {
|
||||
keyId.value = new Date().getTime()
|
||||
keyId.value = memberStore.userInfo.userId + '-' + new Date().getTime()
|
||||
}
|
||||
console.log('🚀 ~ onHandleOutbound ~ keyId.value:', keyId.value)
|
||||
uni.showLoading()
|
||||
|
|
|
|||
|
|
@ -805,9 +805,9 @@ const repairCheckNum3 = (e) => {
|
|||
let maxNum = queryParams.value.typeRepairNum - queryParams.value.typeRepairedNum - queryParams.value.typeScrapNum
|
||||
console.log('🚀 ~ repairCheckNum1 ~ maxNum:', maxNum)
|
||||
if (queryParams.value.unitValue == 1) {
|
||||
formRight.value.scrapNum = Number(e.replace(/[^\d.]/g, ''))
|
||||
formRight.value.scrapNum = Number(String(e).replace(/[^\d.]/g, ''))
|
||||
} else {
|
||||
formRight.value.scrapNum = Number(e.replace(/[^\d]/g, ''))
|
||||
formRight.value.scrapNum = Number(String(e).replace(/[^\d]/g, ''))
|
||||
}
|
||||
if (Number(e) <= 0) {
|
||||
formRight.value.scrapNum = 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue