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