Merge branch 'master' of http://192.168.30.2:3000/bonus/bonus-material-app
This commit is contained in:
commit
762528cb96
|
|
@ -2,7 +2,7 @@
|
|||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "custom",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
"@dcloudio/uni-mp-xhs": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4020920240930001",
|
||||
"@rollup/rollup-darwin-arm64": "^4.27.2",
|
||||
"lodash-es": "^4.17.21",
|
||||
"pinia": "^2.2.2",
|
||||
"pinia-plugin-persistedstate": "^3.2.3",
|
||||
"sass": "^1.32.13",
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ importers:
|
|||
'@rollup/rollup-darwin-arm64':
|
||||
specifier: ^4.27.2
|
||||
version: 4.27.2
|
||||
lodash-es:
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
pinia:
|
||||
specifier: ^2.2.2
|
||||
version: 2.2.6(vue@3.5.13)
|
||||
|
|
@ -2748,6 +2751,9 @@ packages:
|
|||
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
lodash-es@4.17.21:
|
||||
resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
|
||||
|
||||
lodash.camelcase@4.3.0:
|
||||
resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==}
|
||||
|
||||
|
|
@ -7555,6 +7561,8 @@ snapshots:
|
|||
dependencies:
|
||||
p-locate: 5.0.0
|
||||
|
||||
lodash-es@4.17.21: {}
|
||||
|
||||
lodash.camelcase@4.3.0: {}
|
||||
|
||||
lodash.debounce@4.0.8: {}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,10 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { appLoginAPI, getUserInfoAPI } from '@/services/index.js'
|
||||
import { useMemberStore } from '@/stores'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const memberStore = useMemberStore()
|
||||
|
||||
// 登录参数
|
||||
|
|
@ -39,7 +40,7 @@ const loginForm = reactive({
|
|||
// 登录按钮
|
||||
const onHandleLogin = async () => {
|
||||
const res = await appLoginAPI(loginForm)
|
||||
console.log(res)
|
||||
console.log(res)
|
||||
if (res.code === 200) {
|
||||
// 1. 获取 token 并存储
|
||||
memberStore.setToken(res.data.access_token)
|
||||
|
|
|
|||
|
|
@ -1,177 +1,251 @@
|
|||
<template>
|
||||
<!-- 编码出库-->
|
||||
<view class="page-container">
|
||||
<view class="complete-btn">
|
||||
<view class="btn" @click="changeTab(1)">
|
||||
<span>已完成</span>
|
||||
<div v-if="active == 1" class="bt-line"></div>
|
||||
</view>
|
||||
<view class="btn" style="margin-left: 120rpx" @click="changeTab(2)">
|
||||
<span>未完成</span>
|
||||
<div v-if="active == 2" class="bt-line"></div>
|
||||
</view>
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">领料单位:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<view class="cont">{{ queryParams.leaseUnit }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">领料工程:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<view class="cont">{{ queryParams.leaseProject }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">当前出库物资:</uni-col>
|
||||
<uni-col :span="18"
|
||||
><view class="cont">{{ queryParams.maTypeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">待出库数量:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<view class="cont">{{ maxNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
<uni-row :gutter="24" class="search-form">
|
||||
<uni-col :span="12">
|
||||
<view>
|
||||
<uni-datetime-picker
|
||||
v-model="dateArray"
|
||||
type="daterange"
|
||||
@maskClick="maskClick"
|
||||
@change="onChangeDate"
|
||||
placeholder="选择日期范围"
|
||||
/>
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="8">
|
||||
<view>
|
||||
<uni-easyinput placeholder="请输入内容" v-model="queryParams.keyWord" />
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="search" @click="getTableList()">搜索</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
||||
<view
|
||||
class="table-list-item"
|
||||
v-for="(item, index) in tableList"
|
||||
:key="index"
|
||||
@click="handleItem(item)"
|
||||
>
|
||||
<div class="line"></div>
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">出库方式:</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn">编码识别</view>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn">编码识别</view>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn">二维码识别</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</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 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;
|
||||
"
|
||||
@tap="onCodeSearch"
|
||||
>编码检索
|
||||
</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" style="padding-bottom: 85rpx">
|
||||
<view class="table-list-item" v-for="item in codeDeviceList" :key="item.maId">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">申请时间:</uni-col>
|
||||
<uni-col :span="18"
|
||||
><div class="cont">{{ item.createTime }}</div></uni-col
|
||||
>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">领料单号:</uni-col>
|
||||
<uni-col :span="18"
|
||||
><div class="cont">{{ item.code }}</div></uni-col
|
||||
>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">领料物资:</uni-col>
|
||||
<uni-col :span="18"
|
||||
><div class="cont">{{ item.purchaseMaTypeName }}</div></uni-col
|
||||
>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">领料单位:</uni-col>
|
||||
<uni-col :span="18"
|
||||
><div class="cont">{{ item.purchaseMaNumber }}</div></uni-col
|
||||
>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">领料工程:</uni-col>
|
||||
<uni-col :span="18"><div class="cont"></div></uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">领料人:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ item.leasePerson }}</div>
|
||||
<uni-col :span="5">物资类型:</uni-col>
|
||||
<uni-col :span="15">
|
||||
<view class="cont">{{ item.materialName }}</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<checkbox-group @change="onChangeChecked(item)">
|
||||
<label>
|
||||
<checkbox
|
||||
color="#409eff"
|
||||
borderColor="#409eff"
|
||||
activeBorderColor="#409eff"
|
||||
:checked="item.checked"
|
||||
:disabled="maxNum === isSelectNum && !item.checked"
|
||||
style="transform: scale(0.7)"
|
||||
/>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">预领数量:</uni-col>
|
||||
<uni-col :span="5">规格型号:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ item.alNum }}</div>
|
||||
<view class="cont">{{ item.materialModel }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">已领数量:</uni-col>
|
||||
<uni-col :span="5">设备状态:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ item.alNum }}</div>
|
||||
<view class="cont">{{ item.statusName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">待领数量:</uni-col>
|
||||
<uni-col :span="5">设备数量:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ item.alNum }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">状态:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">未完成</div>
|
||||
<view class="cont">1</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
<view class="loading-text"> {{ finish ? '没有更多数据了~' : '正在加载...' }} </view>
|
||||
|
||||
<view class="loading-text">
|
||||
{{ finish ? '没有更多数据了~' : '正在加载...' }}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="outbound-btn" @tap="onHandleOutbound"> 出库 </view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { getPickingOutboundListAPI } from '@/services/picking/outbound.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const active = ref(1)
|
||||
const tableList = ref([])
|
||||
const statusList = ref(['3', '13', '4', '14', '19'])
|
||||
const finish = ref(false) // 判断数据是否加载完毕
|
||||
// 查询参数
|
||||
const queryParams = ref({
|
||||
startTime: '', // 开始时间
|
||||
endTime: '', // 结束时间
|
||||
keyWord: '',
|
||||
import { ref, computed } from 'vue'
|
||||
import { getCodeDeviceListAPI, setOutboundNumAPI } from '@/services/picking/outbound.js'
|
||||
import { onBackPress } from '@dcloudio/uni-app'
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const queryParams = JSON.parse(query.queryParams)
|
||||
const codeDeviceList = ref([])
|
||||
const total = ref(0)
|
||||
|
||||
// 编码设备列表查询参数
|
||||
const queryCodeParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 3,
|
||||
pageSize: 10,
|
||||
typeId: queryParams.typeId,
|
||||
maStatus: 1,
|
||||
})
|
||||
const dateArray = ref([]) //日期范围
|
||||
|
||||
// 日期 change 事件
|
||||
const onChangeDate = (val) => {
|
||||
const [val_1, val_2] = val
|
||||
queryParams.value.startTime = val_1
|
||||
queryParams.value.endTime = val_2
|
||||
}
|
||||
// 计算出库最大数量
|
||||
const maxNum = computed(() => {
|
||||
// 1. 先通过预领数量和已领数量计算剩余待出库数量
|
||||
const waitNum = queryParams.preNum - queryParams.alNum
|
||||
|
||||
// 获取列表数据
|
||||
const getTableList = async () => {
|
||||
console.log('queryParams.value查询参数', queryParams.value)
|
||||
const res = await getPickingOutboundListAPI(queryParams.value)
|
||||
if (res.total > tableList.value.length) {
|
||||
tableList.value = [...tableList.value, ...res.rows]
|
||||
} else {
|
||||
finish.value = true
|
||||
// 2. 判断库存数量是否大于待出库数量 如大于则取待出库数量 如小于则取库存书看了
|
||||
return total.value > waitNum ? waitNum : total.value
|
||||
})
|
||||
|
||||
// 获取编码列表
|
||||
const getCodeDeviceListData = async () => {
|
||||
// console.log('queryCodeParams', queryCodeParams)
|
||||
const res = await getCodeDeviceListAPI(queryCodeParams.value)
|
||||
codeDeviceList.value.push(...res.rows)
|
||||
|
||||
if (codeDeviceList.value.length > 0) {
|
||||
codeDeviceList.value = codeDeviceList.value.map((e) => {
|
||||
return { ...e, checked: false }
|
||||
})
|
||||
}
|
||||
total.value = res.total
|
||||
}
|
||||
getCodeDeviceListData()
|
||||
|
||||
// 页面加载完毕
|
||||
onLoad(() => {
|
||||
getTableList()
|
||||
})
|
||||
// 编码搜索按钮
|
||||
const onCodeSearch = () => {
|
||||
codeDeviceList.value = []
|
||||
getCodeDeviceListData()
|
||||
}
|
||||
|
||||
// 滚动触底事件
|
||||
const onScrollTolower = () => {
|
||||
if (!finish.value) {
|
||||
queryParams.value.pageNum++
|
||||
}
|
||||
getTableList()
|
||||
}
|
||||
|
||||
// tap 栏切换
|
||||
const changeTab = (index) => {
|
||||
active.value = index
|
||||
if (index == 1) {
|
||||
statusList.value = ['3', '13', '4', '14', '19']
|
||||
getTableList()
|
||||
} else if (index == 2) {
|
||||
statusList.value = ['2', '12']
|
||||
getTableList()
|
||||
console.log('滚动触底--')
|
||||
if (total.value > codeDeviceList.value.length) {
|
||||
queryCodeParams.value.pageNum++
|
||||
getCodeDeviceListData()
|
||||
}
|
||||
}
|
||||
// 点击跳转
|
||||
const handleItem = (item) => {
|
||||
console.log('🚀 ~ handleItem ~ item:', item)
|
||||
// uni.navigateTo({ url: '/pages/new-purchase/accept/acceptDetails' })
|
||||
|
||||
// 判断数据是否加载完毕
|
||||
const finish = computed(() => {
|
||||
if (total.value === codeDeviceList.value.length) return true
|
||||
})
|
||||
|
||||
// 复选框事件
|
||||
const onChangeChecked = (item) => {
|
||||
item.checked = !item.checked
|
||||
}
|
||||
|
||||
const maskClick = () => {}
|
||||
// 计算已选择数量
|
||||
const isSelectNum = computed(() => {
|
||||
const isSelectList = codeDeviceList.value.filter((e) => e.checked === true)
|
||||
if (maxNum.value === isSelectList.length) {
|
||||
uni.showToast({
|
||||
title: '勾选设备已达到最大待出库数量!',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
return isSelectList.length
|
||||
})
|
||||
|
||||
// 出库按钮
|
||||
const onHandleOutbound = async () => {
|
||||
const isSelect = codeDeviceList.value.some((e) => e.checked === true)
|
||||
|
||||
if (!isSelect) {
|
||||
uni.showToast({
|
||||
title: '请勾选需要出库的设备',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 解构所需要的数据
|
||||
const { typeId, parentId } = queryParams
|
||||
// 组装出库参数
|
||||
const paramsList = []
|
||||
codeDeviceList.value.map((e) => {
|
||||
if (e.checked) {
|
||||
paramsList.push({
|
||||
leaseType: 0,
|
||||
maId: e.maId,
|
||||
manageType: 0,
|
||||
outNum: 1,
|
||||
parentId,
|
||||
typeId,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const res = await setOutboundNumAPI({ leaseOutDetailsList: paramsList })
|
||||
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '出库成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
// 返回上一个页面
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
success() {
|
||||
uni.$emit('onUpdate')
|
||||
},
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -180,60 +254,26 @@ const maskClick = () => {}
|
|||
height: 100%;
|
||||
padding: 0 15rpx;
|
||||
flex-direction: column;
|
||||
background-color: #e8f5fb;
|
||||
|
||||
.complete-btn {
|
||||
display: flex;
|
||||
.table-list-item {
|
||||
margin: 5rpx 0;
|
||||
padding: 20rpx;
|
||||
.btn {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
.title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
.bt-line {
|
||||
width: 80rpx;
|
||||
height: 4rpx;
|
||||
background-color: #3784fb;
|
||||
}
|
||||
}
|
||||
|
||||
.search-form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.search {
|
||||
height: 65rpx;
|
||||
background-color: #3784fb;
|
||||
text-align: center;
|
||||
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;
|
||||
}
|
||||
.coding-btn {
|
||||
padding: 5rpx 0;
|
||||
background-color: #409eff;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -244,4 +284,17 @@ const maskClick = () => {}
|
|||
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>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<!-- <view class="search" @click="getTableList()">查询</view> -->
|
||||
<view class="search">查询</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
|
|
@ -19,47 +19,47 @@
|
|||
class="table-list-item"
|
||||
@tap="onCodingItem(item)"
|
||||
>
|
||||
<div class="line"></div>
|
||||
<view class="line"></view>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
<uni-col :span="16"
|
||||
><div class="cont">{{ item.maTypeName }}</div></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="6">规格型号:</uni-col>
|
||||
<uni-col :span="16"
|
||||
><div class="cont">{{ item.typeName }}</div></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="6">预领数量:</uni-col>
|
||||
<uni-col :span="16"
|
||||
><div class="cont">{{ item.preNum }}</div></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-col :span="6">已领数量:</uni-col>
|
||||
<uni-col :span="16"
|
||||
><div class="cont">{{ item.alNum }}</div></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-col :span="6">待领数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<div class="cont">{{ item.preNum - item.alNum }}</div>
|
||||
<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-col :span="6">单位:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<div class="cont">{{ item.unitName }}</div>
|
||||
<view class="cont">{{ item.unitName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
|
|
@ -168,7 +168,7 @@ const onCodingItem = (item) => {
|
|||
if (manageType === 0) {
|
||||
codingUrl = '/pages/picking/outbound/code-outbound' // 编码出库
|
||||
}
|
||||
if (manageType === 1) {
|
||||
if (manageType == 1) {
|
||||
codingUrl = '/pages/picking/outbound/num-outbound' // 数量出库
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { getPickingOutboundListAPI } from '@/services/picking/outbound.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { debounce } from 'lodash-es'
|
||||
|
||||
const total = ref(0) // 数据总量
|
||||
const active = ref(1) // tap索引
|
||||
|
|
@ -167,12 +167,12 @@ onShow(() => {
|
|||
})
|
||||
|
||||
// 滚动触底事件
|
||||
const onScrollTolower = () => {
|
||||
const onScrollTolower = debounce(() => {
|
||||
if (total.value > tableList.value.length) {
|
||||
queryParams.value.pageNum++
|
||||
getTableList()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// tap 栏切换
|
||||
const changeTab = (index) => {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { http } from '@/utils/http'
|
|||
* 登录接口
|
||||
*/
|
||||
export const appLoginAPI = (data) => {
|
||||
console.log('999')
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/auth/login',
|
||||
|
|
|
|||
|
|
@ -29,3 +29,13 @@ export const setOutboundNumAPI = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 领料出库 ---- 编码出库 ---- 获取编码设备列表
|
||||
*/
|
||||
export const getCodeDeviceListAPI = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/ma_machine/list',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useMemberStore } from '@/stores'
|
|||
* baseURL 设置请求ip地址和端口
|
||||
*/
|
||||
const ENV = process.env.NODE_ENV
|
||||
export const baseURL = ENV === 'development' ? '/api' : '***'
|
||||
export const baseURL = ENV === 'development' ? 'http://192.168.2.246:18080' : '***'
|
||||
/**
|
||||
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
||||
*/
|
||||
|
|
@ -65,7 +65,12 @@ export const http = (options) => {
|
|||
url: '/pages/login/index',
|
||||
})
|
||||
reject(res)
|
||||
}
|
||||
} else if (res.data.code === 500) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: `${res.data.msg}`,
|
||||
})
|
||||
}
|
||||
} else if (res.statusCode === 401) {
|
||||
// 2. 401 表示token过期 去往登录页重新登录
|
||||
const memberStore = useMemberStore()
|
||||
|
|
@ -95,4 +100,4 @@ export const http = (options) => {
|
|||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ export default defineConfig({
|
|||
proxy: {
|
||||
// 在此处编写代理规则
|
||||
'/api': {
|
||||
target: 'http://192.168.2.76:18080',
|
||||
// target: 'http://192.168.2.76:18080',
|
||||
target: 'http://localhost:18080',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => {
|
||||
return path.replace(/\/api/, '')
|
||||
|
|
|
|||
Loading…
Reference in New Issue