Merge branch 'dev-sy-11-18'
This commit is contained in:
commit
dc234efd1e
|
|
@ -37,13 +37,20 @@
|
||||||
"navigationBarTitleText": "新购验收"
|
"navigationBarTitleText": "新购验收"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 绑定
|
// 新购绑定
|
||||||
{
|
{
|
||||||
"path": "pages/new-purchase/bind/index",
|
"path": "pages/new-purchase/bind/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "新购绑定"
|
"navigationBarTitleText": "新购绑定"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 详情
|
||||||
|
{
|
||||||
|
"path": "pages/new-purchase/bind/details",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "新购绑定详情"
|
||||||
|
}
|
||||||
|
},
|
||||||
// 入库
|
// 入库
|
||||||
{
|
{
|
||||||
"path": "pages/new-purchase/entry/index",
|
"path": "pages/new-purchase/entry/index",
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ const loginForm = reactive({
|
||||||
// 登录按钮
|
// 登录按钮
|
||||||
const onHandleLogin = async () => {
|
const onHandleLogin = async () => {
|
||||||
const res = await appLoginAPI(loginForm)
|
const res = await appLoginAPI(loginForm)
|
||||||
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)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,254 @@
|
||||||
|
<template>
|
||||||
|
<!-- 领料出库详情 -->
|
||||||
|
<view class="page-container">
|
||||||
|
<uni-row :gutter="24" class="search-form">
|
||||||
|
<uni-col :span="12">
|
||||||
|
<view>
|
||||||
|
<uni-easyinput placeholder="请输入内容" />
|
||||||
|
</view>
|
||||||
|
</uni-col>
|
||||||
|
<uni-col :span="4">
|
||||||
|
<view class="search">查询</view>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
|
||||||
|
<scroll-view scroll-y class="scroll-container">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in detailsList"
|
||||||
|
:key="index"
|
||||||
|
class="table-list-item"
|
||||||
|
@tap="onCodingItem(item)"
|
||||||
|
>
|
||||||
|
<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">
|
||||||
|
<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">
|
||||||
|
<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">
|
||||||
|
<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="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="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="6">管理模式:</uni-col>
|
||||||
|
<uni-col :span="16">
|
||||||
|
<uni-tag
|
||||||
|
text="编码"
|
||||||
|
type="warning"
|
||||||
|
v-if="item.manageType === 0"
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
<uni-tag
|
||||||
|
text="数量"
|
||||||
|
type="success"
|
||||||
|
v-if="item.manageType === 1"
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
</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">
|
||||||
|
<uni-tag
|
||||||
|
text="未完成"
|
||||||
|
type="warning"
|
||||||
|
size="small"
|
||||||
|
v-if="item.status == 3"
|
||||||
|
/>
|
||||||
|
<uni-tag
|
||||||
|
text="已完成"
|
||||||
|
type="success"
|
||||||
|
size="small"
|
||||||
|
v-if="item.status == 2"
|
||||||
|
/>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onUnmounted } from 'vue'
|
||||||
|
import { getPurchaseBindDetailsAPI } from '@/services/new-purchase/bind.js'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
const detailsList = ref([])
|
||||||
|
const query = defineProps() // 获取上级页面传递的路由参数
|
||||||
|
|
||||||
|
// 查询参数
|
||||||
|
const queryParams = ref({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
taskId: query.taskId,
|
||||||
|
id: query.id,
|
||||||
|
statusList: [3, 13],
|
||||||
|
})
|
||||||
|
|
||||||
|
// 领料单位,参数等信息
|
||||||
|
const leaseApplyInfo = ref({
|
||||||
|
leaseUnit: '', // 领料单位
|
||||||
|
leaseProject: '', // 领料工程
|
||||||
|
maTypeName: '', // 物资类型
|
||||||
|
typeName: '', // 规格型号
|
||||||
|
unitName: '', // 单位
|
||||||
|
storageNum: '', // 库存数量
|
||||||
|
preNum: '', // 预领数量
|
||||||
|
parentId: query.id, // 出库时所需参数 取列表 id
|
||||||
|
id: '', // 出库时所需参数 取详情接口 id
|
||||||
|
typeId: '', // 出库时所需参数 取详情接口 typeId
|
||||||
|
manageType: '', // 出库时所需参数 取详情接口 manageType
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取列表详情
|
||||||
|
const getOutboundDetailsData = async () => {
|
||||||
|
console.log('queryParams参数', queryParams.value)
|
||||||
|
const { data: res } = await getPurchaseBindDetailsAPI(queryParams.value)
|
||||||
|
// console.log('res详情', res)
|
||||||
|
detailsList.value = res.purchaseCheckDetailsList
|
||||||
|
// leaseApplyInfo.value.leaseUnit = res.leaseApplyInfo.leaseUnit
|
||||||
|
// leaseApplyInfo.value.leaseProject = res.leaseApplyInfo.leaseProject
|
||||||
|
// console.log('详情数据', res)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 点击跳转出库页面
|
||||||
|
const onCodingItem = (item) => {
|
||||||
|
// 解构所需要的数据
|
||||||
|
const {
|
||||||
|
status,
|
||||||
|
manageType,
|
||||||
|
maTypeName,
|
||||||
|
typeName,
|
||||||
|
storageNum,
|
||||||
|
preNum,
|
||||||
|
alNum,
|
||||||
|
unitName,
|
||||||
|
id,
|
||||||
|
typeId,
|
||||||
|
} = item
|
||||||
|
|
||||||
|
leaseApplyInfo.value.maTypeName = maTypeName
|
||||||
|
leaseApplyInfo.value.typeName = typeName
|
||||||
|
leaseApplyInfo.value.unitName = unitName
|
||||||
|
leaseApplyInfo.value.storageNum = storageNum
|
||||||
|
leaseApplyInfo.value.preNum = preNum
|
||||||
|
leaseApplyInfo.value.alNum = alNum
|
||||||
|
leaseApplyInfo.value.id = id
|
||||||
|
leaseApplyInfo.value.typeId = typeId
|
||||||
|
leaseApplyInfo.value.manageType = manageType
|
||||||
|
|
||||||
|
if (status == 2) {
|
||||||
|
uni.showToast({ title: '该物资已完成出库!', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let codingUrl = ''
|
||||||
|
if (manageType === 0) {
|
||||||
|
codingUrl = '/pages/picking/outbound/code-outbound' // 编码出库
|
||||||
|
}
|
||||||
|
if (manageType == 1) {
|
||||||
|
codingUrl = '/pages/picking/outbound/num-outbound' // 数量出库
|
||||||
|
}
|
||||||
|
|
||||||
|
// 把 leaseApplyInfo 领料信息转成 json 传递到下个页面
|
||||||
|
uni.navigateTo({ url: `${codingUrl}?queryParams=${JSON.stringify(leaseApplyInfo.value)}` })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 页面加载完毕
|
||||||
|
onLoad(() => {
|
||||||
|
getOutboundDetailsData()
|
||||||
|
|
||||||
|
// 监听出库完成事件 刷新列表
|
||||||
|
uni.$on('onUpdate', () => {
|
||||||
|
// console.log('监听事件')
|
||||||
|
// 刷新列表
|
||||||
|
getOutboundDetailsData()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// 页面销毁时移除事件监听
|
||||||
|
onUnmounted(() => {
|
||||||
|
uni.$off('onUpdate') // 移除事件监听
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-container {
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 15rpx;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: #e8f5fb;
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
margin: 10rpx 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search {
|
||||||
|
height: 60rpx;
|
||||||
|
background-color: #3784fb;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 60rpx;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-container {
|
||||||
|
.table-list-item {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
min-height: 300rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
margin: 20rpx 0;
|
||||||
|
height: 1px;
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 加载提示文字
|
||||||
|
.loading-text {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 新购验收 -->
|
<!-- 新购绑定 -->
|
||||||
<view class="accept page-common">
|
<view class="page-container">
|
||||||
<view class="complete-btn">
|
<view class="complete-btn">
|
||||||
<view class="btn" @click="changeTab(1)">
|
<view class="btn" @click="changeTab(1)">
|
||||||
<span>已完成</span>
|
<span>已完成</span>
|
||||||
|
|
@ -12,93 +12,178 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-row :gutter="24" class="search-form">
|
<uni-row :gutter="24" class="search-form">
|
||||||
<uni-col :span="10">
|
<uni-col :span="12">
|
||||||
<view>
|
<view>
|
||||||
<uni-datetime-picker
|
<uni-datetime-picker
|
||||||
type="date"
|
v-model="dateArray"
|
||||||
placeholder="请选择日期"
|
type="daterange"
|
||||||
:clear-icon="false"
|
|
||||||
@maskClick="maskClick"
|
@maskClick="maskClick"
|
||||||
|
@change="onChangeDate"
|
||||||
|
placeholder="选择日期范围"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="10">
|
<uni-col :span="8">
|
||||||
<view>
|
<view>
|
||||||
<uni-easyinput placeholder="请输入项目名称" />
|
<uni-easyinput placeholder="请输入内容" v-model="queryParams.keyWord" />
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="4">
|
<uni-col :span="4">
|
||||||
<view class="search">搜索</view>
|
<view class="search" @click="getTableList()">搜索</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
|
||||||
<div class="table-list-item" v-for="(item, index) in tableList" :key="index">
|
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
||||||
<div class="title">
|
<view
|
||||||
<span style="font-size: 15px; font-weight: 800">新购绑定</span>
|
class="table-list-item"
|
||||||
<span :style="{ color: item.status == 1 ? '#3784fb' : '#ff4d4f' }">{{
|
:key="index"
|
||||||
item.status == 1 ? '已完成' : '未完成'
|
@click="handleItem(item)"
|
||||||
}}</span>
|
v-for="(item, index) in tableList"
|
||||||
</div>
|
>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="6">到货时间:</uni-col>
|
<uni-col :span="6">到货时间:</uni-col>
|
||||||
<uni-col :span="18"><div class="cont">{{ item.arrivalTime }}</div></uni-col>
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.createTime }}</div></uni-col
|
||||||
|
>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="6">采购单号:</uni-col>
|
<uni-col :span="6">采购单号:</uni-col>
|
||||||
<uni-col :span="18"><div class="cont">{{ item.purchaseNumber }}</div></uni-col>
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.code }}</div></uni-col
|
||||||
|
>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="6">采购物资:</uni-col>
|
<uni-col :span="6">采购物资:</uni-col>
|
||||||
<uni-col :span="18"><div class="cont">{{ item.purchaseMaterial }}</div></uni-col>
|
<uni-col :span="18">
|
||||||
|
<div class="cont">{{ item.purchaseMaTypeName }}</div>
|
||||||
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="6">物资数量:</uni-col>
|
<uni-col :span="6">物资数量:</uni-col>
|
||||||
<uni-col :span="18"><div class="cont">{{ item.arrivalQuantity }}</div></uni-col>
|
<uni-col :span="18">
|
||||||
|
<div class="cont">{{ item.purchaseMaNumber }}</div>
|
||||||
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row :gutter="24">
|
<!-- <uni-row :gutter="24">
|
||||||
<uni-col :span="6">绑定数量:</uni-col>
|
<uni-col :span="6">绑定数量:</uni-col>
|
||||||
<uni-col :span="18"><div class="cont">{{ item.acceptQuantity }}</div></uni-col>
|
<uni-col :span="18">
|
||||||
</uni-row>
|
<div class="cont">{{ item.leaseProject }}</div>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row> -->
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">状态:</uni-col>
|
||||||
|
<uni-col :span="18">
|
||||||
|
<div class="cont">
|
||||||
|
<uni-tag text="未完成" type="warning" v-if="item.taskStatus === 21" />
|
||||||
|
<uni-tag text="已完成" type="success" v-if="item.taskStatus === 22" />
|
||||||
</div>
|
</div>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
</view>
|
||||||
|
<view class="loading-text">
|
||||||
|
{{ finish ? '没有更多数据了~' : '正在加载...' }}
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
|
import { getPurchaseBindListAPI } from '@/services/new-purchase/bind.js'
|
||||||
|
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
|
import { debounce } from 'lodash-es'
|
||||||
|
|
||||||
const active = ref(1)
|
const total = ref(0) // 数据总量
|
||||||
const tableList = reactive([
|
const active = ref(1) // tap索引
|
||||||
{
|
const tableList = ref([]) // 列表数据源
|
||||||
status: '1', // 状态
|
const dateArray = ref([]) // 日期范围
|
||||||
arrivalTime: '2021-08-01 12:12:12', // 到货时间
|
// 查询参数
|
||||||
purchaseNumber: '123', // 采购单号
|
const queryParams = ref({
|
||||||
// 采购物资
|
startTime: '', // 开始时间
|
||||||
purchaseMaterial: '物资1、物资2、物资3、物资4、物资5、物资6、物资7、物资8、物资9、物资10',
|
endTime: '', // 结束时间
|
||||||
arrivalQuantity: '100', // 到货数量
|
keyWord: '', // 关键字
|
||||||
acceptQuantity: '100', // 验收数量
|
statusList: [3, 13], // 状态
|
||||||
},
|
pageNum: 1,
|
||||||
{
|
pageSize: 3,
|
||||||
status: '0', // 状态
|
})
|
||||||
arrivalTime: '2021-08-01 12:12:12', // 到货时间
|
|
||||||
purchaseNumber: '123456', // 采购单号
|
|
||||||
// 采购物资
|
|
||||||
purchaseMaterial: 'fdhsajfkldsajfkldjsaklgjdklsahjgldjsafkljdsklajfdklsajfkdsajfkldsjfkldas',
|
|
||||||
arrivalQuantity: '100', // 到货数量
|
|
||||||
acceptQuantity: '100', // 验收数量
|
|
||||||
},
|
|
||||||
])
|
|
||||||
|
|
||||||
|
// 日期 change 事件
|
||||||
|
const onChangeDate = (val) => {
|
||||||
|
const [val_1, val_2] = val
|
||||||
|
queryParams.value.startTime = val_1
|
||||||
|
queryParams.value.endTime = val_2
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
const getTableList = async (isTap = false) => {
|
||||||
|
// console.log('queryParams.value查询参数', queryParams.value)
|
||||||
|
const { data: res } = await getPurchaseBindListAPI(queryParams.value)
|
||||||
|
console.log('res列表数据', res)
|
||||||
|
total.value = res.total
|
||||||
|
if (isTap) {
|
||||||
|
tableList.value = res.rows
|
||||||
|
} else {
|
||||||
|
if (res.rows.length == 0) {
|
||||||
|
tableList.value = []
|
||||||
|
} else {
|
||||||
|
tableList.value.push(...res.rows)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// // 页面加载完毕
|
||||||
|
// onLoad(() => {
|
||||||
|
// getTableList()
|
||||||
|
// })
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
tableList.value = []
|
||||||
|
total.value = 0
|
||||||
|
getTableList()
|
||||||
|
})
|
||||||
|
|
||||||
|
// 滚动触底事件
|
||||||
|
const onScrollTolower = debounce(() => {
|
||||||
|
console.log('触底事件')
|
||||||
|
if (total.value > tableList.value.length) {
|
||||||
|
queryParams.value.pageNum++
|
||||||
|
getTableList()
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
// tap 栏切换
|
||||||
const changeTab = (index) => {
|
const changeTab = (index) => {
|
||||||
active.value = index
|
active.value = index
|
||||||
|
if (index == 1) {
|
||||||
|
queryParams.value.statusList = [22] // 查已完成的
|
||||||
|
} else if (index == 2) {
|
||||||
|
queryParams.value.statusList = [21] // 查未完成的
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queryParams.value.pageNum = 1
|
||||||
|
getTableList(true)
|
||||||
|
}
|
||||||
|
// 点击跳转详情
|
||||||
|
const handleItem = (item) => {
|
||||||
|
uni.navigateTo({ url: `/pages/new-purchase/bind/details?id=${item.id}&taskId=${item.taskId}` })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断数据是否加载完毕
|
||||||
|
const finish = computed(() => {
|
||||||
|
if (total.value === tableList.value.length) return true
|
||||||
|
})
|
||||||
|
|
||||||
const maskClick = () => {}
|
const maskClick = () => {}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.accept {
|
.page-container {
|
||||||
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
word-break: break-all;
|
padding: 0 15rpx;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
.complete-btn {
|
.complete-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
|
@ -123,16 +208,17 @@ const maskClick = () => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
height: 70rpx;
|
height: 65rpx;
|
||||||
background-color: #3784fb;
|
background-color: #3784fb;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 70rpx;
|
line-height: 65rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
.scroll-container {
|
||||||
.table-list-item {
|
.table-list-item {
|
||||||
margin: 20rpx 0;
|
margin: 20rpx 0;
|
||||||
padding: 40rpx;
|
padding: 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
min-height: 300rpx;
|
min-height: 300rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
@ -152,4 +238,13 @@ const maskClick = () => {}
|
||||||
background-color: #e8e8e8;
|
background-color: #e8e8e8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 加载提示文字
|
||||||
|
.loading-text {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -3,26 +3,26 @@
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<view class="table-list-item">
|
<view class="table-list-item">
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="6">领料单位:</uni-col>
|
<uni-col :span="8">领料单位:</uni-col>
|
||||||
<uni-col :span="18">
|
<uni-col :span="16">
|
||||||
<view class="cont">{{ queryParams.leaseUnit }}</view>
|
<view class="cont">{{ queryParams.leaseUnit }}</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="8">领料工程:</uni-col>
|
||||||
<uni-col :span="18">
|
<uni-col :span="16">
|
||||||
<view class="cont">{{ queryParams.leaseProject }}</view>
|
<view class="cont">{{ queryParams.leaseProject }}</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="8">当前出库物资:</uni-col>
|
||||||
<uni-col :span="18"
|
<uni-col :span="16"
|
||||||
><view class="cont">{{ queryParams.maTypeName }}</view>
|
><view class="cont">{{ queryParams.maTypeName }}</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="8">待出库数量:</uni-col>
|
||||||
<uni-col :span="18">
|
<uni-col :span="16">
|
||||||
<view class="cont">{{ maxNum }}</view>
|
<view class="cont">{{ maxNum }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
|
@ -32,13 +32,13 @@
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="6">出库方式:</uni-col>
|
<uni-col :span="6">出库方式:</uni-col>
|
||||||
<uni-col :span="6">
|
<uni-col :span="6">
|
||||||
<view class="coding-btn">编码识别</view>
|
<view class="coding-btn" @tap="onCodeIdentify">编码识别</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="6">
|
<uni-col :span="6">
|
||||||
<view class="coding-btn">编码识别</view>
|
<view class="coding-btn" @tap="onCodeIdentify">编码识别</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="6">
|
<uni-col :span="6">
|
||||||
<view class="coding-btn">二维码识别</view>
|
<view class="coding-btn" @tap="onCodeIdentify">二维码识别</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view>
|
<view>
|
||||||
<uni-easyinput placeholder="请输入内容" />
|
<uni-easyinput v-model="queryCodeParams.maCode" placeholder="请输入内容" />
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="6">
|
<uni-col :span="6">
|
||||||
|
|
@ -72,8 +72,8 @@
|
||||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" style="padding-bottom: 85rpx">
|
<scroll-view scroll-y @scrolltolower="onScrollTolower" style="padding-bottom: 85rpx">
|
||||||
<view class="table-list-item" v-for="item in codeDeviceList" :key="item.maId">
|
<view class="table-list-item" v-for="item in codeDeviceList" :key="item.maId">
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="5">物资类型:</uni-col>
|
<uni-col :span="8">物资类型:</uni-col>
|
||||||
<uni-col :span="15">
|
<uni-col :span="12">
|
||||||
<view class="cont">{{ item.materialName }}</view>
|
<view class="cont">{{ item.materialName }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="4">
|
<uni-col :span="4">
|
||||||
|
|
@ -92,20 +92,26 @@
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="5">规格型号:</uni-col>
|
<uni-col :span="8">规格型号:</uni-col>
|
||||||
<uni-col :span="18">
|
<uni-col :span="12">
|
||||||
<view class="cont">{{ item.materialModel }}</view>
|
<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="5">设备状态:</uni-col>
|
<uni-col :span="8">设备编码:</uni-col>
|
||||||
<uni-col :span="18">
|
<uni-col :span="12">
|
||||||
|
<view class="cont">{{ item.maCode }}</view>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="8">设备状态:</uni-col>
|
||||||
|
<uni-col :span="12">
|
||||||
<view class="cont">{{ item.statusName }}</view>
|
<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="5">设备数量:</uni-col>
|
<uni-col :span="8">设备数量:</uni-col>
|
||||||
<uni-col :span="18">
|
<uni-col :span="12">
|
||||||
<view class="cont">1</view>
|
<view class="cont">1</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
|
@ -124,6 +130,7 @@
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { getCodeDeviceListAPI, setOutboundNumAPI } from '@/services/picking/outbound.js'
|
import { getCodeDeviceListAPI, setOutboundNumAPI } from '@/services/picking/outbound.js'
|
||||||
import { onBackPress } from '@dcloudio/uni-app'
|
import { onBackPress } from '@dcloudio/uni-app'
|
||||||
|
import { debounce } from 'lodash-es'
|
||||||
const query = defineProps() // 获取上级页面传递的路由参数
|
const query = defineProps() // 获取上级页面传递的路由参数
|
||||||
const queryParams = JSON.parse(query.queryParams)
|
const queryParams = JSON.parse(query.queryParams)
|
||||||
const codeDeviceList = ref([])
|
const codeDeviceList = ref([])
|
||||||
|
|
@ -135,6 +142,7 @@ const queryCodeParams = ref({
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
typeId: queryParams.typeId,
|
typeId: queryParams.typeId,
|
||||||
maStatus: 1,
|
maStatus: 1,
|
||||||
|
maCode: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
// 计算出库最大数量
|
// 计算出库最大数量
|
||||||
|
|
@ -148,7 +156,7 @@ const maxNum = computed(() => {
|
||||||
|
|
||||||
// 获取编码列表
|
// 获取编码列表
|
||||||
const getCodeDeviceListData = async () => {
|
const getCodeDeviceListData = async () => {
|
||||||
// console.log('queryCodeParams', queryCodeParams)
|
console.log('queryCodeParams', queryCodeParams.value)
|
||||||
const res = await getCodeDeviceListAPI(queryCodeParams.value)
|
const res = await getCodeDeviceListAPI(queryCodeParams.value)
|
||||||
codeDeviceList.value.push(...res.rows)
|
codeDeviceList.value.push(...res.rows)
|
||||||
|
|
||||||
|
|
@ -161,20 +169,36 @@ const getCodeDeviceListData = async () => {
|
||||||
}
|
}
|
||||||
getCodeDeviceListData()
|
getCodeDeviceListData()
|
||||||
|
|
||||||
|
// 编码识别按钮
|
||||||
|
const onCodeIdentify = () => {
|
||||||
|
console.log('编码识别--')
|
||||||
|
|
||||||
|
// 只允许通过相机扫码
|
||||||
|
uni.scanCode({
|
||||||
|
onlyFromCamera: true,
|
||||||
|
scanType: ['qrCode', 'pdf417'],
|
||||||
|
success: function (res) {
|
||||||
|
console.log('条码类型:' + res.scanType)
|
||||||
|
console.log('条码内容:' + res.result)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 编码搜索按钮
|
// 编码搜索按钮
|
||||||
const onCodeSearch = () => {
|
const onCodeSearch = () => {
|
||||||
|
queryCodeParams.value.pageNum = 1
|
||||||
codeDeviceList.value = []
|
codeDeviceList.value = []
|
||||||
getCodeDeviceListData()
|
getCodeDeviceListData()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 滚动触底事件
|
// 滚动触底事件
|
||||||
const onScrollTolower = () => {
|
const onScrollTolower = debounce(() => {
|
||||||
console.log('滚动触底--')
|
// console.log('滚动触底--')
|
||||||
if (total.value > codeDeviceList.value.length) {
|
if (total.value > codeDeviceList.value.length) {
|
||||||
queryCodeParams.value.pageNum++
|
queryCodeParams.value.pageNum++
|
||||||
getCodeDeviceListData()
|
getCodeDeviceListData()
|
||||||
}
|
}
|
||||||
}
|
}, 500)
|
||||||
|
|
||||||
// 判断数据是否加载完毕
|
// 判断数据是否加载完毕
|
||||||
const finish = computed(() => {
|
const finish = computed(() => {
|
||||||
|
|
|
||||||
|
|
@ -156,23 +156,25 @@ const getTableList = async (isTap = false) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 页面加载完毕
|
// // 页面加载完毕
|
||||||
onLoad(() => {
|
// onLoad(() => {
|
||||||
getTableList()
|
// getTableList()
|
||||||
})
|
// })
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
tableList.value = []
|
tableList.value = []
|
||||||
|
total.value = 0
|
||||||
getTableList()
|
getTableList()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 滚动触底事件
|
// 滚动触底事件
|
||||||
const onScrollTolower = debounce(() => {
|
const onScrollTolower = debounce(() => {
|
||||||
|
console.log('触底事件')
|
||||||
if (total.value > tableList.value.length) {
|
if (total.value > tableList.value.length) {
|
||||||
queryParams.value.pageNum++
|
queryParams.value.pageNum++
|
||||||
getTableList()
|
getTableList()
|
||||||
}
|
}
|
||||||
})
|
}, 500)
|
||||||
|
|
||||||
// tap 栏切换
|
// tap 栏切换
|
||||||
const changeTab = (index) => {
|
const changeTab = (index) => {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ 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',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import { http } from '@/utils/http'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新购绑定 ---- 列表查询
|
||||||
|
*/
|
||||||
|
export const getPurchaseBindListAPI = (data) => {
|
||||||
|
return http({
|
||||||
|
method: 'GET',
|
||||||
|
url: '/material/purchase_check_info/list',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 新购绑定 ---- 列表查询
|
||||||
|
*/
|
||||||
|
export const getPurchaseBindDetailsAPI = (data) => {
|
||||||
|
return http({
|
||||||
|
method: 'GET',
|
||||||
|
url: '/material/purchase_check_info/getInfo',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -121,5 +121,5 @@ a:hover {
|
||||||
|
|
||||||
page {
|
page {
|
||||||
/* height: 100%; */
|
/* height: 100%; */
|
||||||
font-size: 16px;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue