二维码扫码功能实现
This commit is contained in:
parent
7a4c8b6652
commit
d7c2318ebb
|
|
@ -55,7 +55,13 @@
|
|||
{
|
||||
"path": "pages/new-purchase/bind/coding-bind",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编码绑定"
|
||||
"navigationBarTitleText": "新购绑定"
|
||||
}
|
||||
},//编码扫码
|
||||
{
|
||||
"path": "pages/new-purchase/bind/coding-scan",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新购绑定"
|
||||
}
|
||||
},
|
||||
// 入库
|
||||
|
|
@ -124,6 +130,12 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "编码出库"
|
||||
}
|
||||
},// 3. 编码出库
|
||||
{
|
||||
"path": "pages/picking/outbound/code-outScan",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编码出库"
|
||||
}
|
||||
},
|
||||
// 4. 数量出库
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,27 +20,27 @@
|
|||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</div>
|
||||
<div class="card" style="margin-top: 20px;">
|
||||
<div class="card" style="margin-top: 10px;">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">接收方式:</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn">编码识别</view>
|
||||
<view class="coding-btn" @click="scanStart">编码识别</view>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn">编码识别</view>
|
||||
<view class="coding-btn" @click="scanStart">编码识别</view>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn">二维码识别</view>
|
||||
<view class="coding-btn" @click="scanStart">二维码识别</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card" style="margin-top: 20px;">
|
||||
<div>扫码识别</div>
|
||||
<div class="card" style="margin-top: 10px;">
|
||||
<!-- <div>扫码识别</div>
|
||||
<div style="width: 94%;height: 120px;margin: 10px;border: 1px solid #ccc;">
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center;margin-bottom: 10px;">
|
||||
|
|
@ -138,7 +138,25 @@ const getMaInfo = () => {
|
|||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
// 扫码识别按钮
|
||||
const scanStart = () => {
|
||||
console.log('编码识别--')
|
||||
// 只允许通过相机扫码
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode', 'pdf417'],
|
||||
success: (res) => {
|
||||
console.log('扫码结果:' + res.result);
|
||||
maCode.value = res.result
|
||||
},
|
||||
fail: (err) => {
|
||||
// uni.showToast({
|
||||
// title: '取消',
|
||||
// icon: 'none'
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
//提交
|
||||
const submitCode = () => {
|
||||
console.log(taskInfo.value)
|
||||
|
|
|
|||
|
|
@ -3,18 +3,18 @@
|
|||
<div class="card">
|
||||
<uni-forms :model="formData" label-width="100" :border="true">
|
||||
<uni-forms-item label="物资名称:" name="maTypeName">
|
||||
<span>{{ formData.maTypeName }}</span>
|
||||
<span class="form-view">{{ formData.maTypeName }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="物资规格:" name="typeName">
|
||||
<span>{{ formData.typeName }}</span>
|
||||
<span class="form-view">{{ formData.typeName }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="到货数量:" name="purchaseNum">
|
||||
<span>{{ formData.purchaseNum }}</span>
|
||||
<span class="form-view">{{ formData.purchaseNum }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="质保材料:" name="warnDocuments">
|
||||
<uni-forms-item label="质保材料:" name="warnDocuments">
|
||||
<uni-easyinput v-model="warnDocuments" placeholder="请输入质保材料" />
|
||||
</uni-forms-item>
|
||||
|
||||
|
|
@ -193,6 +193,12 @@ onLoad((options)=>{
|
|||
border-radius: 6px;
|
||||
box-shadow: 0 2upx 4upx 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.form-view{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.upload {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
|
|
|
|||
|
|
@ -1,33 +1,25 @@
|
|||
<template>
|
||||
<!-- 编码绑定-->
|
||||
<view class="page-container">
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">物资名称:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ queryParams.maTypeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">物资规格:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ queryParams.typeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">到货数量:</uni-col>
|
||||
<uni-col :span="16"
|
||||
><view class="cont">{{ queryParams.purchaseNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">待绑定数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont" style="color: #ee0a24">{{ waitBindNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
<div class="card" style="margin-bottom: 10px;">
|
||||
<uni-forms :model="formData" label-width="100" :border="true">
|
||||
<uni-forms-item label="物资名称:" name="maTypeName">
|
||||
<span class="form-view">{{ queryParams.maTypeName }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="物资规格:" name="typeName">
|
||||
<span class="form-view">{{ queryParams.typeName }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="到货数量:" name="purchaseNum">
|
||||
<span class="form-view">{{ queryParams.purchaseNum }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="待绑定数量:" name="waitBindNum">
|
||||
<span style="color: #ee0a24" class="form-view">{{ waitBindNum }}</span>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</div>
|
||||
<scroll-view scroll-y>
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center">
|
||||
|
|
@ -120,7 +112,7 @@
|
|||
</uni-col>
|
||||
<uni-col :span="7">
|
||||
<view>
|
||||
<uni-easyinput placeholder="请输入" />
|
||||
<uni-easyinput v-model="item.outFacCode" placeholder="请输入"/>
|
||||
</view>
|
||||
</uni-col>
|
||||
<!-- <uni-col :span="3">
|
||||
|
|
@ -147,12 +139,14 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed,onUnmounted } from 'vue'
|
||||
import { setBindCodingAPI } from '@/services/new-purchase/bind.js'
|
||||
import { debounce } from 'lodash-es'
|
||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const queryParams = JSON.parse(query.queryParams)
|
||||
const codeBindingList = ref([])
|
||||
const codeNum = ref(0)
|
||||
|
||||
const queryBindForm = ref({
|
||||
typeId: '', // 物资typeId
|
||||
|
|
@ -165,7 +159,7 @@ const queryBindForm = ref({
|
|||
|
||||
// 计算待绑定数量
|
||||
const waitBindNum = computed(() => {
|
||||
return queryParams.checkNum - queryParams.bindNum
|
||||
return queryParams.checkNum - queryParams.bindNum - codeNum.value
|
||||
})
|
||||
|
||||
// 绑定按钮
|
||||
|
|
@ -282,21 +276,26 @@ const onHandelDelete = (index) => {
|
|||
}
|
||||
|
||||
// 编码识别按钮
|
||||
const onCodeIdentify = () => {
|
||||
console.log('编码识别--')
|
||||
|
||||
// 只允许通过相机扫码
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode', 'pdf417'],
|
||||
success: function (res) {
|
||||
console.log('条码类型:' + res.scanType)
|
||||
console.log('条码内容:' + res.result)
|
||||
},
|
||||
})
|
||||
const onCodeIdentify = () => {
|
||||
uni.navigateTo({ url: `/pages/new-purchase/bind/coding-scan?queryParams=${JSON.stringify(queryParams)}` })
|
||||
}
|
||||
|
||||
const maskClick = () => {}
|
||||
|
||||
// 页面加载完毕
|
||||
onLoad(() => {
|
||||
// 监听出库完成事件 刷新列表
|
||||
uni.$on('onUpdate', (num) => {
|
||||
console.log('监听事件',num)
|
||||
if(num>0){
|
||||
codeNum.value = num
|
||||
}
|
||||
})
|
||||
})
|
||||
// 页面销毁时移除事件监听
|
||||
onUnmounted(() => {
|
||||
uni.$off('onUpdate') // 移除事件监听
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -306,7 +305,12 @@ const maskClick = () => {}
|
|||
padding: 0 15rpx;
|
||||
flex-direction: column;
|
||||
background-color: #e8f5fb;
|
||||
|
||||
.card {
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2upx 4upx 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.table-list-item {
|
||||
margin: 5rpx 0;
|
||||
padding: 20rpx;
|
||||
|
|
@ -327,6 +331,12 @@ const maskClick = () => {}
|
|||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.form-view{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
// 加载提示文字
|
||||
.loading-text {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,170 @@
|
|||
<template>
|
||||
<!-- 编码绑定-->
|
||||
<view class="page-container">
|
||||
<div class="card" style="margin-bottom: 10px;">
|
||||
<uni-forms :model="formData" label-width="100" :border="true">
|
||||
<uni-forms-item label="物资名称:" name="maTypeName">
|
||||
<span class="form-view">{{ queryParams.maTypeName }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="物资规格:" name="typeName">
|
||||
<span class="form-view">{{ queryParams.typeName }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="到货数量:" name="purchaseNum">
|
||||
<span class="form-view">{{ queryParams.purchaseNum }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="待绑定数量:" name="waitBindNum">
|
||||
<span style="color: #ee0a24" class="form-view">{{ waitBindNum }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item>
|
||||
<button class="scan-btn" @click="scanStart">开始扫码</button>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="识别编码:" name="maCode">
|
||||
<uni-easyinput v-model="formData.maCode" readonly />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="出场编码:" name="outFacCode">
|
||||
<uni-easyinput v-model="formData.outFacCode" placeholder="请输入出场编码" />
|
||||
</uni-forms-item>
|
||||
<!-- <uni-forms-item label="出场日期:" name="warnDocuments">
|
||||
</uni-forms-item> -->
|
||||
|
||||
</uni-forms>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="btn-cont" @click="backPage">取消</button>
|
||||
<button class="btn-cont" @click="onHandleBinding">确认</button>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { setBindCodingAPI } from '@/services/new-purchase/bind.js'
|
||||
import { debounce } from 'lodash-es'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const queryParams = JSON.parse(query.queryParams)
|
||||
console.log(queryParams)
|
||||
const formData = ref({
|
||||
maCode: '',
|
||||
outFacCode: '',
|
||||
})
|
||||
const codeNun = ref(0)
|
||||
// 计算待绑定数量
|
||||
const waitBindNum = computed(() => {
|
||||
return queryParams.checkNum - queryParams.bindNum - codeNun.value
|
||||
})
|
||||
|
||||
// 编码识别按钮
|
||||
const scanStart = () => {
|
||||
console.log('编码识别--')
|
||||
// 只允许通过相机扫码
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode', 'pdf417'],
|
||||
success: (res) => {
|
||||
console.log('扫码结果:' + res.result);
|
||||
formData.value.maCode = res.result
|
||||
},
|
||||
fail: (err) => {
|
||||
// uni.showToast({
|
||||
// title: '取消',
|
||||
// icon: 'none'
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 绑定按钮
|
||||
const onHandleBinding = debounce(async () => {
|
||||
let codeList = [{
|
||||
"typeName": queryParams.typeName,
|
||||
"maTypeName": queryParams.maTypeName,
|
||||
"outFacCode": formData.value.outFacCode,
|
||||
"maCode": formData.value.maCode
|
||||
}]
|
||||
|
||||
// 组装参数
|
||||
const bindParams = {
|
||||
typeId: queryParams.typeId,
|
||||
taskId: queryParams.taskId,
|
||||
dtoList: codeList,
|
||||
}
|
||||
|
||||
console.log('绑定参数', bindParams)
|
||||
|
||||
const res = await setBindCodingAPI(bindParams)
|
||||
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '编码绑定成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
formData.value.outFacCode = ""
|
||||
formData.value.maCode = ""
|
||||
codeNun.value = codeNun.value+1;
|
||||
uni.$emit('onUpdate',codeNun.value)
|
||||
}
|
||||
}, 500)
|
||||
// 返回
|
||||
const backPage = () => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
// 页面加载完毕
|
||||
onShow(() => {
|
||||
setTimeout(()=>{
|
||||
scanStart()
|
||||
},500)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-container {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding: 0 15rpx;
|
||||
flex-direction: column;
|
||||
background-color: #e8f5fb;
|
||||
.card {
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2upx 4upx 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.scan-btn{
|
||||
width: 94%;
|
||||
margin: 5px auto;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 30px;
|
||||
|
||||
.btn-cont {
|
||||
width: 40%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
background-color: #3784fb;
|
||||
color: #fff;
|
||||
border-radius: 20px;
|
||||
// 取消按钮淡蓝色
|
||||
&:first-child {
|
||||
background-color: #aacefb;
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-view{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -16,44 +16,49 @@
|
|||
<view v-for="(item, index) in detailsList" :key="index" class="table-list-item">
|
||||
<uni-swipe-action>
|
||||
<uni-swipe-action-item @click="onClick($event, item)" :right-options="options">
|
||||
<div class="title">
|
||||
<span style="font-size: 15px; font-weight: 800">新购绑定</span>
|
||||
<span v-if="item.status == 2" style="color: #3784fb">已完成</span>
|
||||
<span v-if="item.status == 3" style="color: #ff4d4f">未完成</span>
|
||||
</div>
|
||||
<view class="line"></view>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2">{{ index + 1 }}</uni-col>
|
||||
<!-- <uni-col :span="2">{{ index + 1 }}</uni-col> -->
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.maTypeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.typeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
|
||||
<uni-col :span="6">物资数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.purchaseNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
|
||||
<uni-col :span="6">已绑数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.bindNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
|
||||
<uni-col :span="6">待绑数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.checkNum - item.bindNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
|
||||
<uni-col :span="6">管理模式:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-tag
|
||||
|
|
@ -71,7 +76,7 @@
|
|||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
|
||||
<uni-col :span="6">状态:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-tag
|
||||
|
|
@ -98,7 +103,7 @@
|
|||
<script setup>
|
||||
import { ref, onUnmounted } from 'vue'
|
||||
import { getPurchaseBindDetailsAPI } from '@/services/new-purchase/bind.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||
const detailsList = ref([])
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
|
||||
|
|
@ -181,28 +186,18 @@ const onClick = (e, item) => {
|
|||
}
|
||||
// 2. 二维码绑定
|
||||
if (index === 1) {
|
||||
uni.navigateTo({ url: `/pages/new-purchase/bind/coding-scan?queryParams=${JSON.stringify(leaseApplyInfo.value)}` })
|
||||
}
|
||||
// 3. 驳回
|
||||
if (index === 2) {
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载完毕
|
||||
onLoad(() => {
|
||||
// 页面加载完毕
|
||||
onShow(() => {
|
||||
getOutboundDetailsData()
|
||||
|
||||
// 监听出库完成事件 刷新列表
|
||||
uni.$on('onUpdate', () => {
|
||||
// console.log('监听事件')
|
||||
// 刷新列表
|
||||
getOutboundDetailsData()
|
||||
})
|
||||
})
|
||||
|
||||
// 页面销毁时移除事件监听
|
||||
onUnmounted(() => {
|
||||
uni.$off('onUpdate') // 移除事件监听
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,206 @@
|
|||
<template>
|
||||
<!-- 编码出库-->
|
||||
<view class="page-container">
|
||||
<view class="table-list-item">
|
||||
<uni-forms :model="formData" label-width="100" :border="true">
|
||||
<uni-forms-item label="领料单位:" name="leaseUnit">
|
||||
<span class="form-view">{{ queryParams.leaseUnit }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="领料工程:" name="leaseProject">
|
||||
<span class="form-view">{{ queryParams.leaseProject }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物资类型:" name="maTypeName">
|
||||
<span class="form-view">{{ queryParams.maTypeName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="规格型号:" name="typeName">
|
||||
<span class="form-view">{{ queryParams.typeName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="待出库数量:" name="maxNum">
|
||||
<span class="form-view">{{ maxNum }}</span>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
||||
<view class="table-list-item">
|
||||
<button class="scan-btn" @click="scanStart">开始扫码</button>
|
||||
</view>
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center">
|
||||
<uni-col :span="6">
|
||||
<view> 设备编码 </view>
|
||||
</uni-col>
|
||||
<uni-col :span="12">
|
||||
<view>
|
||||
<uni-easyinput v-model="queryCodeParams.maCode" placeholder="请输入内容" />
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn" style="padding: 10rpx 0;color: #fe9a09;background-color: #fff7eb;border: 1px solid #fe9a09;"
|
||||
@click="getMaInfo">编码检索</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
<view class="table-list-item">
|
||||
<uni-forms :model="codeData" label-width="100" :border="true">
|
||||
<uni-forms-item label="物资类型:" name="materialName">
|
||||
<span class="form-view">{{ codeData.materialName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="规格型号:" name="materialModel">
|
||||
<span class="form-view">{{ codeData.materialModel }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="设备状态:" name="statusName">
|
||||
<span class="form-view">{{ codeData.statusName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="设备数量:">
|
||||
<span class="form-view">1</span>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
||||
<view class="outbound-btn" @tap="onHandleOutbound"> 出库 </view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { getCodeDeviceListAPI, setOutboundNumAPI } from '@/services/picking/outbound.js'
|
||||
import { onBackPress } from '@dcloudio/uni-app'
|
||||
import { debounce } from 'lodash-es'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const queryParams = JSON.parse(query.queryParams)
|
||||
const formData = ref({})
|
||||
const codeData = ref({})
|
||||
const codeNum = ref(0)
|
||||
// 编码设备列表查询参数
|
||||
const queryCodeParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
typeId: queryParams.typeId,
|
||||
maStatus: 1,
|
||||
maCode: '',
|
||||
})
|
||||
// 计算出库最大数量
|
||||
const maxNum = computed(() => {
|
||||
// 通过预领数量和已领数量计算剩余待出库数量
|
||||
const waitNum = queryParams.preNum - queryParams.alNum - codeNum.value
|
||||
return waitNum
|
||||
})
|
||||
// 扫码识别按钮
|
||||
const scanStart = () => {
|
||||
console.log('编码识别--')
|
||||
// 只允许通过相机扫码
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode', 'pdf417'],
|
||||
success: (res) => {
|
||||
console.log('扫码结果:' + res.result);
|
||||
queryCodeParams.value.maCode = res.result
|
||||
},
|
||||
fail: (err) => {
|
||||
// uni.showToast({
|
||||
// title: '取消',
|
||||
// icon: 'none'
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//根据编码获取设备类型
|
||||
const getMaInfo = async() => {
|
||||
console.log('queryCodeParams', queryCodeParams.value)
|
||||
const res = await getCodeDeviceListAPI(queryCodeParams.value)
|
||||
console.log(res)
|
||||
if(res.code==200){
|
||||
if(res.rows&&res.rows.length>0){
|
||||
codeData.value = res.rows[0]
|
||||
}else{
|
||||
uni.showToast({ title: '未查询到该编码', icon: 'none' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 出库按钮
|
||||
const onHandleOutbound = async () => {
|
||||
// 组装出库参数
|
||||
const paramsList = [codeData.value]
|
||||
const res = await setOutboundNumAPI({ leaseOutDetailsList: paramsList })
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '出库成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
queryCodeParams.value.maCode="";
|
||||
codeData.value = {};
|
||||
codeNum.value = codeNum.value+1;
|
||||
uni.$emit('onUpdate',codeNun.value)
|
||||
}
|
||||
}
|
||||
// 页面加载完毕
|
||||
onShow(() => {
|
||||
setTimeout(()=>{
|
||||
scanStart()
|
||||
},500)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-container {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding: 0 15rpx;
|
||||
flex-direction: column;
|
||||
background-color: #e8f5fb;
|
||||
|
||||
.table-list-item {
|
||||
margin: 5rpx 0;
|
||||
padding: 10rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.coding-btn {
|
||||
padding: 5rpx 0;
|
||||
background-color: #409eff;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scan-btn{
|
||||
width: 94%;
|
||||
margin: 5px auto;
|
||||
}
|
||||
.form-view{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
// 加载提示文字
|
||||
.loading-text {
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.outbound-btn {
|
||||
position: fixed;
|
||||
bottom: 15rpx;
|
||||
left: 15%;
|
||||
width: 70%;
|
||||
height: 65rpx;
|
||||
line-height: 65rpx;
|
||||
text-align: center;
|
||||
background-color: #19be6b;
|
||||
border-radius: 12rpx;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,31 +2,24 @@
|
|||
<!-- 编码出库-->
|
||||
<view class="page-container">
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">领料单位:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ queryParams.leaseUnit }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">领料工程:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ queryParams.leaseProject }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">当前出库物资:</uni-col>
|
||||
<uni-col :span="16"
|
||||
><view class="cont">{{ queryParams.maTypeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">待出库数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ maxNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
<uni-forms :model="formData" label-width="100" :border="true">
|
||||
<uni-forms-item label="领料单位:" name="leaseUnit">
|
||||
<span class="form-view">{{ queryParams.leaseUnit }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="领料工程:" name="leaseProject">
|
||||
<span class="form-view">{{ queryParams.leaseProject }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物资类型:" name="maTypeName">
|
||||
<span class="form-view">{{ queryParams.maTypeName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="规格型号:" name="typeName">
|
||||
<span class="form-view">{{ queryParams.typeName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="待出库数量:" name="maxNum">
|
||||
<span class="form-view">{{ maxNum }}</span>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24">
|
||||
|
|
@ -69,11 +62,11 @@
|
|||
</uni-row>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" style="padding-bottom: 85rpx">
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" style="padding-bottom: 90rpx">
|
||||
<view class="table-list-item" v-for="item in codeDeviceList" :key="item.maId">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">物资类型:</uni-col>
|
||||
<uni-col :span="12">
|
||||
<uni-col :span="6">物资类型:</uni-col>
|
||||
<uni-col :span="14">
|
||||
<view class="cont">{{ item.materialName }}</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
|
|
@ -92,26 +85,26 @@
|
|||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">规格型号:</uni-col>
|
||||
<uni-col :span="12">
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.materialModel }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">设备编码:</uni-col>
|
||||
<uni-col :span="12">
|
||||
<uni-col :span="6">设备编码:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.maCode }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">设备状态:</uni-col>
|
||||
<uni-col :span="12">
|
||||
<uni-col :span="6">设备状态:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.statusName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">设备数量:</uni-col>
|
||||
<uni-col :span="12">
|
||||
<uni-col :span="6">设备数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">1</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
|
@ -127,14 +120,17 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed,onUnmounted } from 'vue'
|
||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||
import { getCodeDeviceListAPI, setOutboundNumAPI } from '@/services/picking/outbound.js'
|
||||
import { onBackPress } from '@dcloudio/uni-app'
|
||||
import { debounce } from 'lodash-es'
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const queryParams = JSON.parse(query.queryParams)
|
||||
const formData = ref({})
|
||||
const codeDeviceList = ref([])
|
||||
const total = ref(0)
|
||||
const codeNum = ref(0)
|
||||
|
||||
// 编码设备列表查询参数
|
||||
const queryCodeParams = ref({
|
||||
|
|
@ -148,7 +144,7 @@ const queryCodeParams = ref({
|
|||
// 计算出库最大数量
|
||||
const maxNum = computed(() => {
|
||||
// 1. 先通过预领数量和已领数量计算剩余待出库数量
|
||||
const waitNum = queryParams.preNum - queryParams.alNum
|
||||
const waitNum = queryParams.preNum - queryParams.alNum - codeNum.value
|
||||
|
||||
// 2. 判断库存数量是否大于待出库数量 如大于则取待出库数量 如小于则取库存书看了
|
||||
return total.value > waitNum ? waitNum : total.value
|
||||
|
|
@ -172,16 +168,16 @@ getCodeDeviceListData()
|
|||
// 编码识别按钮
|
||||
const onCodeIdentify = () => {
|
||||
console.log('编码识别--')
|
||||
|
||||
// 只允许通过相机扫码
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode', 'pdf417'],
|
||||
success: function (res) {
|
||||
console.log('条码类型:' + res.scanType)
|
||||
console.log('条码内容:' + res.result)
|
||||
},
|
||||
})
|
||||
uni.navigateTo({ url: `/pages/picking/outbound/code-outScan?queryParams=${JSON.stringify(queryParams)}` })
|
||||
// // 只允许通过相机扫码
|
||||
// uni.scanCode({
|
||||
// onlyFromCamera: true,
|
||||
// scanType: ['qrCode', 'pdf417'],
|
||||
// success: function (res) {
|
||||
// console.log('条码类型:' + res.scanType)
|
||||
// console.log('条码内容:' + res.result)
|
||||
// },
|
||||
// })
|
||||
}
|
||||
|
||||
// 编码搜索按钮
|
||||
|
|
@ -270,6 +266,21 @@ const onHandleOutbound = async () => {
|
|||
}, 500)
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载完毕
|
||||
onLoad(() => {
|
||||
// 监听出库完成事件 刷新列表
|
||||
uni.$on('onUpdate', (num) => {
|
||||
console.log('监听事件', num)
|
||||
codeNum.value = num
|
||||
})
|
||||
})
|
||||
// 页面销毁时移除事件监听
|
||||
onUnmounted(() => {
|
||||
uni.$off('onUpdate') // 移除事件监听
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -282,7 +293,7 @@ const onHandleOutbound = async () => {
|
|||
|
||||
.table-list-item {
|
||||
margin: 5rpx 0;
|
||||
padding: 20rpx;
|
||||
padding: 10rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
.title {
|
||||
|
|
@ -301,6 +312,12 @@ const onHandleOutbound = async () => {
|
|||
}
|
||||
}
|
||||
}
|
||||
.form-view{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
// 加载提示文字
|
||||
.loading-text {
|
||||
text-align: center;
|
||||
|
|
|
|||
|
|
@ -13,57 +13,53 @@
|
|||
</uni-row>
|
||||
|
||||
<scroll-view scroll-y class="scroll-container">
|
||||
<view
|
||||
v-for="(item, index) in detailsList"
|
||||
<view v-for="(item, index) in detailsList"
|
||||
:key="index"
|
||||
class="table-list-item"
|
||||
@tap="onCodingItem(item)"
|
||||
>
|
||||
@tap="onCodingItem(item)">
|
||||
<div class="title">
|
||||
<span style="font-size: 15px; font-weight: 800">领料出库</span>
|
||||
<span v-if="item.status == 2" style="color: #3784fb">已完成</span>
|
||||
<span v-if="item.status != 2" style="color: #ff4d4f">未完成</span>
|
||||
</div>
|
||||
<view class="line"></view>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2">{{ index + 1 }}</uni-col>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.maTypeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.typeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">预领数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.preNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">已领数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.alNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">待领数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.preNum - item.alNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">单位:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.unitName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">管理模式:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-tag
|
||||
|
|
@ -80,8 +76,7 @@
|
|||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">状态:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-tag
|
||||
|
|
@ -106,13 +101,16 @@
|
|||
<script setup>
|
||||
import { ref, onUnmounted } from 'vue'
|
||||
import { getOutboundDetailsAPI } from '@/services/picking/outbound.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||
|
||||
const detailsList = ref([])
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
|
||||
// 领料单位,参数等信息
|
||||
const leaseApplyInfo = ref({
|
||||
leaseUnitId: '', // 领料单位
|
||||
leaseUnit: '', // 领料单位
|
||||
leaseProjectId: '', // 领料工程
|
||||
leaseProject: '', // 领料工程
|
||||
maTypeName: '', // 物资类型
|
||||
typeName: '', // 规格型号
|
||||
|
|
@ -129,13 +127,17 @@ const leaseApplyInfo = ref({
|
|||
const getOutboundDetailsData = async () => {
|
||||
const { data: res } = await getOutboundDetailsAPI(query.id)
|
||||
detailsList.value = res.leaseApplyDetailsList
|
||||
console.log(res.leaseApplyInfo)
|
||||
leaseApplyInfo.value.leaseUnitId = res.leaseApplyInfo.leaseUnitId
|
||||
leaseApplyInfo.value.leaseUnit = res.leaseApplyInfo.leaseUnit
|
||||
leaseApplyInfo.value.leaseProjectId = res.leaseApplyInfo.leaseProjectId
|
||||
leaseApplyInfo.value.leaseProject = res.leaseApplyInfo.leaseProject
|
||||
// console.log('详情数据', res)
|
||||
}
|
||||
|
||||
// 点击跳转出库页面
|
||||
const onCodingItem = (item) => {
|
||||
console.log(item)
|
||||
// 解构所需要的数据
|
||||
const {
|
||||
status,
|
||||
|
|
@ -152,7 +154,7 @@ const onCodingItem = (item) => {
|
|||
|
||||
leaseApplyInfo.value.maTypeName = maTypeName
|
||||
leaseApplyInfo.value.typeName = typeName
|
||||
leaseApplyInfo.value.unitName = unitName
|
||||
leaseApplyInfo.value.unitName = unitName
|
||||
leaseApplyInfo.value.storageNum = storageNum
|
||||
leaseApplyInfo.value.preNum = preNum
|
||||
leaseApplyInfo.value.alNum = alNum
|
||||
|
|
@ -175,22 +177,8 @@ const onCodingItem = (item) => {
|
|||
// 把 leaseApplyInfo 领料信息转成 json 传递到下个页面
|
||||
uni.navigateTo({ url: `${codingUrl}?queryParams=${JSON.stringify(leaseApplyInfo.value)}` })
|
||||
}
|
||||
|
||||
// 页面加载完毕
|
||||
onLoad(() => {
|
||||
getOutboundDetailsData()
|
||||
|
||||
// 监听出库完成事件 刷新列表
|
||||
uni.$on('onUpdate', () => {
|
||||
// console.log('监听事件')
|
||||
// 刷新列表
|
||||
getOutboundDetailsData()
|
||||
})
|
||||
})
|
||||
|
||||
// 页面销毁时移除事件监听
|
||||
onUnmounted(() => {
|
||||
uni.$off('onUpdate') // 移除事件监听
|
||||
onShow(() => {
|
||||
getOutboundDetailsData()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,70 +1,40 @@
|
|||
<template>
|
||||
<!-- 数量出库 -->
|
||||
<view class="page-container">
|
||||
<view class="page-container">
|
||||
<view class="table-list-item">
|
||||
<div class="line"></div>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">领料单位:</uni-col>
|
||||
<uni-col :span="18"
|
||||
><div class="cont">{{ queryParams.leaseUnit }}</div></uni-col
|
||||
>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">领料工程:</uni-col>
|
||||
<uni-col :span="18"
|
||||
><div class="cont">{{ queryParams.leaseProject }}</div></uni-col
|
||||
>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">物资类型:</uni-col>
|
||||
<uni-col :span="18"
|
||||
><div class="cont">{{ queryParams.maTypeName }}</div></uni-col
|
||||
>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="18"
|
||||
><div class="cont">{{ queryParams.typeName }}</div></uni-col
|
||||
>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">单位:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ queryParams.unitName }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">库存数量:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ queryParams.storageNum }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">预领数量:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ queryParams.preNum }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">已领数量:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ queryParams.alNum }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">出库数量:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont" style="width: 200rpx">
|
||||
<uni-number-box
|
||||
:min="0"
|
||||
:max="maxNum"
|
||||
v-model="outboundNum"
|
||||
@change="onChangeNumber"
|
||||
/>
|
||||
</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
<uni-forms :model="formData" label-width="100" :border="true">
|
||||
<uni-forms-item label="领料单位:" name="leaseUnit">
|
||||
<span class="form-view">{{ queryParams.leaseUnit }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="领料工程:" name="leaseProject">
|
||||
<span class="form-view">{{ queryParams.leaseProject }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物资类型:" name="maTypeName">
|
||||
<span class="form-view">{{ queryParams.maTypeName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="规格型号:" name="typeName">
|
||||
<span class="form-view">{{ queryParams.typeName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="单位:" name="unitName">
|
||||
<span class="form-view">{{ queryParams.unitName }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="库存数量:" name="storageNum">
|
||||
<span class="form-view">{{ queryParams.storageNum }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="预领数量:" name="preNum">
|
||||
<span class="form-view">{{ queryParams.preNum }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="已领数量:" name="alNum">
|
||||
<span class="form-view">{{ queryParams.alNum }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="出库数量:" name="waitBindNum">
|
||||
<uni-number-box :min="0" :max="maxNum" v-model="outboundNum"
|
||||
@change="onChangeNumber" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
|
||||
|
||||
<view class="outbound-btn" @tap="onHandleOutbound"> 出库 </view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -73,6 +43,7 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { setOutboundNumAPI } from '@/services/picking/outbound.js'
|
||||
const formData = ref({})
|
||||
const outboundNum = ref(0)
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const queryParams = JSON.parse(query.queryParams)
|
||||
|
|
@ -181,31 +152,35 @@ const onHandleOutbound = async () => {
|
|||
line-height: 65rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
.table-list-item {
|
||||
margin: 20rpx 0;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
// min-height: 300rpx;
|
||||
border-radius: 10rpx;
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.cont {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
line-height: 1.9;
|
||||
}
|
||||
.line {
|
||||
margin: 20rpx 0;
|
||||
height: 1px;
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-list-item {
|
||||
margin: 20rpx 0;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
// min-height: 300rpx;
|
||||
border-radius: 10rpx;
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.cont {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
line-height: 1.9;
|
||||
}
|
||||
.line {
|
||||
margin: 20rpx 0;
|
||||
height: 1px;
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
}
|
||||
.form-view{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
// 加载提示文字
|
||||
.loading-text {
|
||||
|
|
|
|||
|
|
@ -71,6 +71,10 @@ const pickingList = ref([
|
|||
title: '领料出库',
|
||||
url: '/pages/picking/outbound/index',
|
||||
iconSrc: '../../static/workbench/fetchMaterialOutStore.png',
|
||||
},{
|
||||
title: '退料接收',
|
||||
url: '/pages/back/index',
|
||||
iconSrc: '../../static/workbench/fetchMaterialOutStore.png',
|
||||
},
|
||||
])
|
||||
// 领料
|
||||
|
|
|
|||
Loading…
Reference in New Issue