新购入库
This commit is contained in:
parent
27f7ebbd80
commit
e7ccbebba6
|
|
@ -51,6 +51,31 @@
|
|||
"navigationBarTitleText": "新购入库"
|
||||
}
|
||||
},
|
||||
|
||||
//新购入库详情
|
||||
{
|
||||
"path": "pages/new-purchase/entry/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新购入库详情"
|
||||
}
|
||||
},
|
||||
|
||||
//新购入库未完成入库
|
||||
{
|
||||
"path": "pages/new-purchase/entry/inEntry",
|
||||
"style": {
|
||||
"navigationBarTitleText": "入库"
|
||||
}
|
||||
},
|
||||
|
||||
//新购入库未完成编码入库
|
||||
{
|
||||
"path": "pages/new-purchase/entry/code-inbound",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编码入库"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/new-purchase/accept/acceptDetails",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,213 @@
|
|||
<template>
|
||||
<!-- 编码出库-->
|
||||
<view class="page-container">
|
||||
<!-- <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> -->
|
||||
|
||||
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" style="padding-bottom: 85rpx">
|
||||
<view class="table-list-item" v-for="item in codeDeviceList" :key="item.id">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="7" >类型名称:</uni-col>
|
||||
<uni-col :span="13">
|
||||
<view class="cont">{{ queryParams.maTypeName }}</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<checkbox-group @change="onChangeChecked(item)">
|
||||
<label>
|
||||
<checkbox
|
||||
color="#409eff"
|
||||
borderColor="#409eff"
|
||||
activeBorderColor="#409eff"
|
||||
:checked="item.checked"
|
||||
style="transform: scale(0.7)"
|
||||
/>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="7">规格型号:</uni-col>
|
||||
<uni-col :span="17">
|
||||
<view class="cont">{{ queryParams.typeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="7">设备编码:</uni-col>
|
||||
<uni-col :span="17">
|
||||
<view class="cont">{{ item.maCode }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
<view class="outbound-btn" @tap="onHandleOutbound"> 入库 </view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { getMachineById,setInboundCodeAPI } from '@/services/purchase.js'
|
||||
import { onBackPress,onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
const codeDeviceList = ref([])
|
||||
const total = ref(0)
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const queryParams = JSON.parse(query.queryParams)
|
||||
|
||||
// const typeId = ref('')
|
||||
// const taskId = ref('')
|
||||
// const maTypeName = ref('')
|
||||
// const typeName = ref('')
|
||||
|
||||
// 页面加载完毕
|
||||
onLoad(() => {
|
||||
// typeId.value = options.typeId
|
||||
// taskId.value = options.taskId
|
||||
// maTypeName.value = options.maTypeName
|
||||
// typeName.value = options.typeName
|
||||
getCodeDeviceListData()
|
||||
|
||||
// // 监听出库完成事件 刷新列表
|
||||
// uni.$on('onUpdate', () => {
|
||||
// // console.log('监听事件')
|
||||
// // 刷新列表
|
||||
// getCodeDeviceListData()
|
||||
// })
|
||||
})
|
||||
|
||||
// 获取编码列表
|
||||
const getCodeDeviceListData = async () => {
|
||||
console.log('queryParams',queryParams)
|
||||
let obj = {
|
||||
"typeId":queryParams.typeId,
|
||||
"taskId":queryParams.taskId,
|
||||
}
|
||||
const res = await getMachineById(obj)
|
||||
codeDeviceList.value.push(...res.data)
|
||||
|
||||
if (codeDeviceList.value.length > 0) {
|
||||
codeDeviceList.value = codeDeviceList.value.map((e) => {
|
||||
return { ...e, checked: false }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 滚动触底事件
|
||||
const onScrollTolower = () => {
|
||||
console.log('滚动触底--')
|
||||
}
|
||||
|
||||
|
||||
// 复选框事件
|
||||
const onChangeChecked = (item) => {
|
||||
item.checked = !item.checked
|
||||
}
|
||||
|
||||
// 入库按钮
|
||||
const onHandleOutbound = async () => {
|
||||
const isSelect = codeDeviceList.value.some((e) => e.checked === true)
|
||||
|
||||
if (!isSelect) {
|
||||
uni.showToast({
|
||||
title: '请勾选需要入库的设备',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 组装入库参数
|
||||
const paramsList = []
|
||||
codeDeviceList.value.map((e) => {
|
||||
if (e.checked) {
|
||||
paramsList.push({
|
||||
maCode: e.maCode,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const res = await setInboundCodeAPI({taskId:queryParams.taskId, typeId:queryParams.typeId, purchaseId:queryParams.id, inPutList: 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>
|
||||
.page-container {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding: 0 15rpx;
|
||||
flex-direction: column;
|
||||
background-color: #e8f5fb;
|
||||
|
||||
.table-list-item {
|
||||
margin: 5rpx 0;
|
||||
padding: 20rpx;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 加载提示文字
|
||||
.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>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<!-- 领料入库详情 -->
|
||||
<!-- 领料入库未完成入库 -->
|
||||
<view class="page-container">
|
||||
<uni-row :gutter="24" class="search-form">
|
||||
<uni-col :span="12">
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
v-for="(item, index) in detailsList"
|
||||
:key="index"
|
||||
class="table-list-item"
|
||||
@tap="onCodingItem(item)"
|
||||
|
||||
>
|
||||
<view class="line"></view>
|
||||
<uni-row :gutter="24">
|
||||
|
|
@ -36,30 +36,23 @@
|
|||
</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="6">到货数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.preNum }}</view>
|
||||
<view class="cont">{{ }}</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="6">已入库数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.alNum }}</view>
|
||||
<view class="cont">{{ }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-row :gutter="24">
|
||||
<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">
|
||||
<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">
|
||||
<view class="cont">{{ item.unitName }}</view>
|
||||
<view class="cont">{{ }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
|
|
@ -88,13 +81,13 @@
|
|||
text="未完成"
|
||||
type="warning"
|
||||
size="small"
|
||||
v-if="item.status == 0 || item.status == 1"
|
||||
v-if="item.status == 4"
|
||||
/>
|
||||
<uni-tag
|
||||
text="已完成"
|
||||
type="success"
|
||||
size="small"
|
||||
v-if="item.status == 2"
|
||||
v-if="item.status == 19"
|
||||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
|
@ -106,86 +99,38 @@
|
|||
<script setup>
|
||||
import { ref, onUnmounted } from 'vue'
|
||||
import { getOutboundDetailsAPI } from '@/services/picking/outbound.js'
|
||||
import { getPurchaseDetailsList } from '@/services/purchase.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const detailsList = ref([])
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const id = ref('')
|
||||
const taskId = ref('')
|
||||
|
||||
// 领料单位,参数等信息
|
||||
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('query.id',query.id)
|
||||
const { data: res } = await getOutboundDetailsAPI(query.id)
|
||||
detailsList.value = res.leaseApplyDetailsList
|
||||
leaseApplyInfo.value.leaseUnit = res.leaseApplyInfo.leaseUnit
|
||||
leaseApplyInfo.value.leaseProject = res.leaseApplyInfo.leaseProject
|
||||
const getTableList = async () => {
|
||||
let obj = {
|
||||
"id":id.value,
|
||||
"taskId":taskId.value,
|
||||
"statusList":[3,13,4,14,19],
|
||||
}
|
||||
const { data: res } = await getPurchaseDetailsList(obj)
|
||||
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()
|
||||
onLoad((options) => {
|
||||
id.value = options.id
|
||||
taskId.value = options.taskId
|
||||
getTableList()
|
||||
|
||||
// 监听出库完成事件 刷新列表
|
||||
uni.$on('onUpdate', () => {
|
||||
// console.log('监听事件')
|
||||
// 刷新列表
|
||||
getOutboundDetailsData()
|
||||
getTableList()
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,261 @@
|
|||
<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">{{ }}</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">{{ }}</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">{{ }}</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 == 4"
|
||||
/>
|
||||
<uni-tag
|
||||
text="已完成"
|
||||
type="success"
|
||||
size="small"
|
||||
v-if="item.status == 19"
|
||||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onUnmounted } from 'vue'
|
||||
import { getPurchaseDetailsList,setInboundCodeAPI } from '@/services/purchase.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const detailsList = ref([])
|
||||
const id = ref('')
|
||||
const taskId = ref('')
|
||||
|
||||
// 新购入库,参数等信息
|
||||
const inBoundInfo = ref({
|
||||
manageType: '', // 出库时所需参数 取详情接口 manageType
|
||||
taskId: '', // 出库时所需参数 取详情接口 taskId
|
||||
typeId: '', // 出库时所需参数 取详情接口 typeId
|
||||
|
||||
})
|
||||
|
||||
// 获取列表详情
|
||||
const getTableList = async () => {
|
||||
let obj = {
|
||||
"id":id.value,
|
||||
"taskId":taskId.value,
|
||||
"statusList":[3,13,4,14,19],
|
||||
}
|
||||
const { data: res } = await getPurchaseDetailsList(obj)
|
||||
detailsList.value = res.purchaseCheckDetailsList
|
||||
}
|
||||
|
||||
// 点击跳转入库页面
|
||||
const onCodingItem = (item) => {
|
||||
console.log('item----------',item)
|
||||
// 解构所需要的数据
|
||||
const {
|
||||
status,
|
||||
manageType,
|
||||
taskId,
|
||||
typeId,
|
||||
maTypeName,
|
||||
typeName,
|
||||
id,
|
||||
} = item
|
||||
|
||||
inBoundInfo.value.taskId = taskId
|
||||
inBoundInfo.value.typeId = typeId
|
||||
inBoundInfo.value.manageType = manageType
|
||||
inBoundInfo.value.maTypeName = maTypeName
|
||||
inBoundInfo.value.typeName = typeName
|
||||
inBoundInfo.value.id = id
|
||||
|
||||
if (status == 19) {
|
||||
uni.showToast({ title: '该设备已完成出库!', icon: 'none' })
|
||||
return
|
||||
}
|
||||
if (manageType === 1 && status!=19) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否确认入库?',
|
||||
confirmText: '确定',
|
||||
cancelText: '取消',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
// 用户点击了确定
|
||||
//数量入库
|
||||
const res = await setInboundCodeAPI({taskId:taskId, typeId:typeId, purchaseId:id})
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '入库成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
setTimeout(() => {
|
||||
getTableList()
|
||||
}, 500)
|
||||
}
|
||||
// uni.showToast({
|
||||
// title: '您点击了确定',
|
||||
// icon: 'success'
|
||||
// });
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
let codingUrl = ''
|
||||
if (manageType === 0) {
|
||||
codingUrl = '/pages/new-purchase/entry/code-inbound' // 编码入库
|
||||
// 把 inBoundInfo 领料信息转成 json 传递到下个页面
|
||||
uni.navigateTo({ url: `${codingUrl}?queryParams=${JSON.stringify(inBoundInfo.value)}` })
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载完毕
|
||||
onLoad((options) => {
|
||||
console.log(options)
|
||||
id.value = options.id
|
||||
taskId.value = options.taskId
|
||||
getTableList()
|
||||
|
||||
// 监听入库完成事件 刷新列表
|
||||
uni.$on('onUpdate', () => {
|
||||
// console.log('监听事件')
|
||||
// 刷新列表
|
||||
getTableList()
|
||||
})
|
||||
})
|
||||
|
||||
// 页面销毁时移除事件监听
|
||||
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>
|
||||
|
|
@ -59,9 +59,13 @@
|
|||
<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">{{ item.supplier }}</div></uni-col>
|
||||
<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">{{ }}</div></uni-col>
|
||||
</uni-row>
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
|
|
@ -105,15 +109,21 @@ const onChangeDate = (val) => {
|
|||
//点击事件
|
||||
const onClick=(e,item)=> {
|
||||
if(item.taskStatus==22){
|
||||
console.log(e.index)
|
||||
if(e.index==0){
|
||||
uni.navigateTo({ url: `/pages/new-purchase/entry/details?id=${item.id}` })
|
||||
uni.navigateTo({ url: `/pages/new-purchase/entry/details?id=${item.id}&taskId=${item.taskId}` })
|
||||
}
|
||||
// console.log(e,'item',item);
|
||||
// console.log(e.index);
|
||||
}else{
|
||||
if(e.index==0){
|
||||
uni.navigateTo({ url: `/pages/new-purchase/entry/details?id=${item.id}&taskId=${item.taskId}` })
|
||||
}else{
|
||||
uni.navigateTo({ url: `/pages/new-purchase/entry/inEntry?id=${item.id}&taskId=${item.taskId}` })
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//左滑选择项1
|
||||
const swipeOptions = ref([
|
||||
{
|
||||
|
|
@ -121,11 +131,11 @@ const swipeOptions = ref([
|
|||
style: { backgroundColor: '#34C759' },
|
||||
onClick: () => { handleAction('查看'); }
|
||||
},
|
||||
{
|
||||
text: '驳回',
|
||||
style: { backgroundColor: '#dd524d' },
|
||||
onClick: () => { handleAction('驳回'); }
|
||||
}
|
||||
// {
|
||||
// text: '驳回',
|
||||
// style: { backgroundColor: '#dd524d' },
|
||||
// onClick: () => { handleAction('驳回'); }
|
||||
// }
|
||||
])
|
||||
|
||||
//左滑选择项2
|
||||
|
|
@ -138,10 +148,10 @@ const swipeOptions = ref([
|
|||
text: '入库',
|
||||
style: { backgroundColor: '#007AFF' },
|
||||
},
|
||||
{
|
||||
text: '驳回',
|
||||
style: { backgroundColor: '#dd524d' },
|
||||
}
|
||||
// {
|
||||
// text: '驳回',
|
||||
// style: { backgroundColor: '#dd524d' },
|
||||
// }
|
||||
])
|
||||
|
||||
//左滑改变
|
||||
|
|
@ -153,10 +163,9 @@ const swipeOptions = ref([
|
|||
|
||||
// 获取列表数据
|
||||
const getTableList = async (isTap = false) => {
|
||||
// console.log('queryParams.value查询参数', queryParams.value)
|
||||
const res = await getPurchaseList(queryParams.value)
|
||||
console.log('res列表数据', res)
|
||||
total.value = res.total
|
||||
total.value = res.data.total
|
||||
if (isTap) {
|
||||
tableList.value = res.data.rows
|
||||
} else {
|
||||
|
|
@ -182,10 +191,10 @@ const changeTab = (index) => {
|
|||
}
|
||||
const maskClick = () => {}
|
||||
|
||||
// 页面加载完毕
|
||||
onLoad(() => {
|
||||
getTableList()
|
||||
})
|
||||
// // 页面加载完毕
|
||||
// onLoad(() => {
|
||||
// getTableList()
|
||||
// })
|
||||
|
||||
onShow(() => {
|
||||
tableList.value = []
|
||||
|
|
@ -198,10 +207,12 @@ const onScrollTolower = debounce(() => {
|
|||
queryParams.value.pageNum++
|
||||
getTableList()
|
||||
}
|
||||
})
|
||||
},500)
|
||||
|
||||
// 判断数据是否加载完毕
|
||||
const finish = computed(() => {
|
||||
console.log('total.value',total.value)
|
||||
console.log('tableList.value.length',tableList.value.length)
|
||||
if (total.value === tableList.value.length) return true
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,34 @@ export const getPurchaseInfo = (data) => {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询新购验收任务详细列表
|
||||
export const getPurchaseDetailsList = (data)=> {
|
||||
return http({
|
||||
url: '/material/purchase_check_info/getInfo',
|
||||
method: 'GET',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 查询入库编码列表
|
||||
export const getMachineById = (data)=> {
|
||||
return http({
|
||||
url: '/material/purchase/storage/getMachineById',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 查询入库编码列表 || 数量入库
|
||||
export const setInboundCodeAPI = (data)=> {
|
||||
return http({
|
||||
url: '/material/purchase/storage/warehouse',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 验收接口
|
||||
export const innerVerify = (data) => {
|
||||
return http({
|
||||
|
|
|
|||
Loading…
Reference in New Issue