退料签名
This commit is contained in:
parent
658177b84f
commit
98c5c238f2
|
|
@ -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(()=>{
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
// 滚动触底事件
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,14 @@ export const getPickingOutboundListAPI = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
// 退料签名列表
|
||||
export const getNoSignListAPI = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/back_apply_info/getNoSignList',
|
||||
data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 领料出库 ---- 任务详情
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue