退料签名

This commit is contained in:
bb_pan 2025-07-28 11:36:46 +08:00
parent 658177b84f
commit 98c5c238f2
5 changed files with 149 additions and 52 deletions

View File

@ -9,7 +9,7 @@
@clickLeft="leftClick"
>
<!-- 使用右侧插槽自定义提交按钮 -->
<template #right>
<template #right v-if="appTaskStatus != 1">
<button
class="submit-btn"
@click="submit"
@ -20,13 +20,13 @@
</uni-nav-bar>
<view class="accept page-common">
<uni-row :gutter="24" class="search-form">
<uni-col :span="5">
<uni-col :span="5" v-if="appTaskStatus != 1">
<view class="addBtn" @click="goCode">编码退料</view>
</uni-col>
<uni-col :span="5" style="padding-right: 0;">
<uni-col :span="5" v-if="appTaskStatus != 1" style="padding-right: 0;">
<view class="addBtn" @click="goNum">数量退料</view>
</uni-col>
<uni-col :span="10" style="margin-left: 10px">
<uni-col :span="appTaskStatus != 1 ? 10 : 20" style="margin-left: 10px">
<view><uni-easyinput placeholder="请输入内容" v-model="keyWord" maxlength="10"/></view>
</uni-col>
<uni-col :span="4">
@ -80,6 +80,7 @@ import { onLoad,onShow } from '@dcloudio/uni-app'
const keyWord = ref('')
const id = ref('')
const taskId = ref('')
const appTaskStatus = ref()
const statusList = ref(["2","12"])
const tableList = ref([])
const taskInfo = ref({})
@ -215,6 +216,7 @@ onLoad((options)=>{
console.log(options)
id.value = options.id
taskId.value = options.taskId
appTaskStatus.value = options.appTaskStatus
getTableList()
})
onShow(()=>{

View File

@ -174,14 +174,14 @@ const queryParams = ref({
// -
const options = ref([
{
text: '电子签名',
style: {
backgroundColor: '#65a1ff',
color: '#fff',
fontSize: '30rpx',
},
},
// {
// text: '',
// style: {
// backgroundColor: '#65a1ff',
// color: '#fff',
// fontSize: '30rpx',
// },
// },
// {
// text: '',
// style: {
@ -201,22 +201,22 @@ const options = ref([
])
// -
const options2 = ref([
{
text: '签名',
style: {
backgroundColor: '#65a1ff',
color: '#fff',
fontSize: '30rpx',
},
},
{
text: '查看',
style: {
backgroundColor: '#13ce66',
color: '#fff',
fontSize: '30rpx',
},
},
// {
// text: '',
// style: {
// backgroundColor: '#65a1ff',
// color: '#fff',
// fontSize: '30rpx',
// },
// },
// {
// text: '',
// style: {
// backgroundColor: '#13ce66',
// color: '#fff',
// fontSize: '30rpx',
// },
// },
// {
// text: '',
// style: {
@ -231,17 +231,17 @@ const onClick=(e,item,itemIndex)=> {
console.log('🚀 ~ onClick ~ item:', item)
const { index } = e
console.log(index)
if (index === 0) {
const params = {
id: item.id,
backSignUrl: item.backSignUrl,
backSignType: item.backSignType,
isBack: true
}
uni.navigateTo({
url: `/pages/my/signature?params=${JSON.stringify(params)}`,
})
}
// if (index === 0) {
// const params = {
// id: item.id,
// backSignUrl: item.backSignUrl,
// backSignType: item.backSignType,
// isBack: true
// }
// uni.navigateTo({
// url: `/pages/my/signature?params=${JSON.stringify(params)}`,
// })
// }
// if (index === 1) {
// if (item.taskStatus == 0) {//-
// console.log(item)
@ -266,7 +266,7 @@ const onClick=(e,item,itemIndex)=> {
// }
// }
// 2.
if (index === 1) {
if (index === 0) {
console.log(item)
let param = {
id:item.id
@ -338,7 +338,7 @@ const goAdd = () => {
//
const handleItem = (item) => {
console.log('🚀 ~ handleItem ~ item:', item)
uni.navigateTo({ url: `/pages/back/detail?id=${item.id}&taskId=${item.taskId}` })
uni.navigateTo({ url: `/pages/back/detail?id=${item.id}&taskId=${item.taskId}&appTaskStatus=${queryParams.value.appTaskStatus}` })
}
//
const finish = computed(() => {

View File

@ -26,7 +26,66 @@
</uni-col>
</uni-row>
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container" v-if="opts">
<view
class="table-list-item"
:key="index"
v-for="(item, index) in tableList"
>
<uni-swipe-action class="swipe-action">
<uni-swipe-action-item
:right-options="options"
@click="onSignature($event, item)"
>
<div class="title">
<span class="code">{{ item.code || businessCode }}</span>
</div>
<div class="line"></div>
<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.typeName }}</div>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">退料单位</uni-col>
<uni-col :span="18">
<div class="cont">{{ item.unitName }}</div>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">退料工程</uni-col>
<uni-col :span="18">
<div class="cont">{{ item.proName }}</div>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">退料人</uni-col>
<uni-col :span="18">
<div class="cont">{{ item.backPerson }}</div>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">退料数量</uni-col>
<uni-col :span="18">
<div class="cont">{{ item.backNum }}</div>
</uni-col>
</uni-row>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<view class="loading-text">
{{ finish ? '没有更多数据了~' : '正在加载...' }}
</view>
</scroll-view>
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container" v-else>
<view
class="table-list-item"
:key="index"
@ -109,10 +168,12 @@
<script setup>
import { ref, reactive, computed } from 'vue'
import { getPickingOutboundListAPI } from '@/services/picking/outbound.js'
import { getPickingOutboundListAPI, getNoSignListAPI } from '@/services/picking/outbound.js'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { debounce } from 'lodash-es'
import { onBackPress } from '@dcloudio/uni-app'
const opts = ref(null)
const total = ref(0) //
const active = ref(1) // tap
const tableList = ref([]) //
@ -148,12 +209,17 @@ const onSignature = (e, item) => {
id: item.id,
// leaseSignUrl: item.leaseSignUrl,
// leaseSignType: item.leaseSignType,
isLease: true,
// isLease: true,
taskType: item.taskType,
publishTask: item.publishTask,
ids: item.ids,
leaseProjectId: item.leaseProjectId,
}
if (opts.value) {
params.isBack = true
} else {
params.isLease = true
}
uni.navigateTo({
url: `/pages/my/signature?params=${JSON.stringify(params)}`,
})
@ -174,7 +240,12 @@ const getTableList = async (isTap = false, isSearch = false) => {
tableList.value = []
}
console.log('queryParams.value查询参数', queryParams.value)
const res = await getPickingOutboundListAPI(queryParams.value)
let res = null
if (opts.value) {
res = await getNoSignListAPI(queryParams.value)
} else {
res = await getPickingOutboundListAPI(queryParams.value)
}
console.log('res列表数据', res)
total.value = res.data.total
if (isTap) {
@ -190,15 +261,20 @@ const getTableList = async (isTap = false, isSearch = false) => {
}
// //
// onLoad(() => {
// getTableList()
// })
onLoad((opt) => {
opts.value = opt.params ? JSON.parse(opt.params) : null
console.log('🚀 ~ opts.value:', opts.value)
})
onShow(() => {
queryParams.value.pageNum = 1
tableList.value = []
total.value = 0
getTableList()
if (opts.value) {
getTableList()
} else {
getTableList()
}
})
//

View File

@ -44,7 +44,7 @@
<view
class="purchase-item"
:key="index"
@tap="onNavigateTo(item.url)"
@tap="onNavigateTo(item.url, item.params)"
v-for="(item, index) in pickingListTwo"
>
<image :src="item.iconSrc" mode="scaleToFill" />
@ -209,7 +209,7 @@ const newPurchaseListTwo = computed(() => {
//
const pickingList = ref([
{
title: '电子签名',
title: '领料签名',
url: '/pages/picking/outbound/sign',
iconSrc: '../../static/workbench/backCreate.png',
},
@ -228,6 +228,12 @@ const pickingList = ref([
// url: '',
// iconSrc: '../../static/workbench/backCreate.png',
// },
{
title: '退料签名',
url: '/pages/picking/outbound/sign',
iconSrc: '../../static/workbench/backCreate.png',
params: 'backSign'
},
{
title: '退料接收',
url: '/pages/back/index',
@ -391,9 +397,14 @@ const boxListTwo = computed(() => {
// },
// ])
const onNavigateTo = (url) => {
const onNavigateTo = (url, params) => {
uni.setStorageSync('scrollTop', null)
uni.setStorageSync('currentPage', 1)
if (params) {
url = url + '?params=' + JSON.stringify(params)
} else {
url = url
}
uni.navigateTo({ url })
}
</script>

View File

@ -10,6 +10,14 @@ export const getPickingOutboundListAPI = (data) => {
data,
})
}
// 退料签名列表
export const getNoSignListAPI = (data) => {
return http({
method: 'GET',
url: '/material/back_apply_info/getNoSignList',
data,
})
}
/**
* 领料出库 ---- 任务详情
*/