This commit is contained in:
parent
5939668077
commit
441ddd816f
|
|
@ -45,8 +45,8 @@
|
||||||
|
|
||||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
||||||
<div class="table-list-item" v-for="(item, index) in tableList" :key="index">
|
<div class="table-list-item" v-for="(item, index) in tableList" :key="index">
|
||||||
<uni-swipe-action>
|
<uni-swipe-action ref="swipeRef">
|
||||||
<uni-swipe-action-item :right-options="item.status==4 ? swipeOptions:swipeOptionsFail" @click="onClick($event,item)" @change="onSwipeChange">
|
<uni-swipe-action-item :right-options="item.status==4 ? swipeOptions:swipeOptionsFail" @click="onClick($event,item, index)" @change="onSwipeChange">
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="code">{{ item.boxCode }}</span>
|
<span class="code">{{ item.boxCode }}</span>
|
||||||
|
|
@ -98,6 +98,8 @@ import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { getPurchaseList } from '@/services/purchase.js'
|
import { getPurchaseList } from '@/services/purchase.js'
|
||||||
import { getQrCodeBoxListApi,appReceiveApi,appTransferRejectApi } from '@/services/standard.js'
|
import { getQrCodeBoxListApi,appReceiveApi,appTransferRejectApi } from '@/services/standard.js'
|
||||||
|
|
||||||
|
const swipeRef = ref(null)
|
||||||
const total = ref(0) // 数据总量
|
const total = ref(0) // 数据总量
|
||||||
const active = ref(1) // tap索引
|
const active = ref(1) // tap索引
|
||||||
const tableList = ref([]) // 列表数据源
|
const tableList = ref([]) // 列表数据源
|
||||||
|
|
@ -124,7 +126,7 @@ const onChangeDate = (val) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
//点击事件
|
//点击事件
|
||||||
const onClick=(e,item)=> {
|
const onClick=(e,item, itemIndex)=> {
|
||||||
if(item.status==4){
|
if(item.status==4){
|
||||||
if(e.index==0){
|
if(e.index==0){
|
||||||
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
||||||
|
|
@ -134,64 +136,69 @@ const onClick=(e,item)=> {
|
||||||
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
||||||
}else if(e.index==1){//接收
|
}else if(e.index==1){//接收
|
||||||
console.log(item)
|
console.log(item)
|
||||||
uni.showModal({
|
setTimeout(() => {
|
||||||
title: '提示',
|
uni.showModal({
|
||||||
content: '是否确认接收?',
|
title: '提示',
|
||||||
confirmText: '确定',
|
content: '是否确认接收?',
|
||||||
cancelText: '取消',
|
confirmText: '确定',
|
||||||
success: async (modalRes) => {
|
cancelText: '取消',
|
||||||
if (modalRes.confirm) {
|
success: async (modalRes) => {
|
||||||
let param = {
|
if (modalRes.confirm) {
|
||||||
boxId:item.boxId
|
let param = {
|
||||||
}
|
boxId:item.boxId
|
||||||
|
}
|
||||||
const res = await appReceiveApi(param)
|
|
||||||
console.log("yyyyyyyyyyy",res)
|
const res = await appReceiveApi(param)
|
||||||
if (res.code == 200) {
|
console.log("yyyyyyyyyyy",res)
|
||||||
uni.showToast({
|
if (res.code == 200) {
|
||||||
title: '接收成功',
|
uni.showToast({
|
||||||
icon: 'none',
|
title: '接收成功',
|
||||||
})
|
icon: 'none',
|
||||||
setTimeout(() => {
|
})
|
||||||
getTableList(true)
|
setTimeout(() => {
|
||||||
}, 500)
|
getTableList(true)
|
||||||
}else{
|
}, 500)
|
||||||
console.log("xxxxxxxxxxxxxxxxxxxxxxxxx")
|
}else{
|
||||||
uni.showToast({ title: '接收失败', icon: 'none' })
|
console.log("xxxxxxxxxxxxxxxxxxxxxxxxx")
|
||||||
}
|
uni.showToast({ title: '接收失败', icon: 'none' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}, 300)
|
||||||
}else{//驳回
|
}else{//驳回
|
||||||
console.log(item)
|
console.log(item)
|
||||||
uni.showModal({
|
setTimeout(() => {
|
||||||
title: '提示',
|
uni.showModal({
|
||||||
content: '是否确认驳回移交?',
|
title: '提示',
|
||||||
confirmText: '确定',
|
content: '是否确认驳回移交?',
|
||||||
cancelText: '取消',
|
confirmText: '确定',
|
||||||
success: async (res) => {
|
cancelText: '取消',
|
||||||
if (res.confirm) {
|
success: async (res) => {
|
||||||
let param = {
|
if (res.confirm) {
|
||||||
boxId:item.boxId
|
let param = {
|
||||||
}
|
boxId:item.boxId
|
||||||
// console.log(param)
|
}
|
||||||
const res = await appTransferRejectApi(param)
|
// console.log(param)
|
||||||
if (res.code === 200) {
|
const res = await appTransferRejectApi(param)
|
||||||
uni.showToast({
|
if (res.code === 200) {
|
||||||
title: '驳回成功',
|
uni.showToast({
|
||||||
icon: 'none',
|
title: '驳回成功',
|
||||||
})
|
icon: 'none',
|
||||||
setTimeout(() => {
|
})
|
||||||
getTableList(true)
|
setTimeout(() => {
|
||||||
}, 500)
|
getTableList(true)
|
||||||
}else{
|
}, 500)
|
||||||
uni.showToast({ title: '驳回失败', icon: 'none' })
|
}else{
|
||||||
}
|
uni.showToast({ title: '驳回失败', icon: 'none' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}, 300)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
swipeRef.value[itemIndex].closeAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
//左滑选择项1
|
//左滑选择项1
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@
|
||||||
|
|
||||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
||||||
<div class="table-list-item" v-for="(item, index) in tableList" :key="index">
|
<div class="table-list-item" v-for="(item, index) in tableList" :key="index">
|
||||||
<uni-swipe-action>
|
<uni-swipe-action ref="swipeRef">
|
||||||
<uni-swipe-action-item :right-options="item.status==3 ? swipeOptions:swipeOptionsFail" @click="onClick($event,item)" @change="onSwipeChange">
|
<uni-swipe-action-item :right-options="item.status==3 ? swipeOptions:swipeOptionsFail" @click="onClick($event,item, index)" @change="onSwipeChange">
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="code">{{ item.boxCode }}</span>
|
<span class="code">{{ item.boxCode }}</span>
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<uni-popup ref="keeperPopup" type="bottom" border-radius="10px 10px 0 0">
|
<uni-popup ref="keeperPopup" type="bottom" border-radius="10px 10px 0 0" :is-mask-click="false">
|
||||||
<view class="keeper-popup">
|
<view class="keeper-popup">
|
||||||
<view class="handle-box">
|
<view class="handle-box">
|
||||||
<view class="handle-box-btn" style="background: #CCC;color: #FFF;" @click="closePopup">取消</view>
|
<view class="handle-box-btn" style="background: #CCC;color: #FFF;" @click="closePopup">取消</view>
|
||||||
|
|
@ -125,11 +125,12 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref,computed } from 'vue'
|
import { ref,computed } from 'vue'
|
||||||
import { onLoad, onSLoad} from '@dcloudio/uni-app'
|
import { onShow } from '@dcloudio/uni-app'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { getPurchaseList } from '@/services/purchase.js'
|
import { getPurchaseList } from '@/services/purchase.js'
|
||||||
import { getQrCodeBoxListApi,getTransferKeepsListApi,appTransferApi } from '@/services/standard.js'
|
import { getQrCodeBoxListApi,getTransferKeepsListApi,appTransferApi } from '@/services/standard.js'
|
||||||
|
|
||||||
|
const swipeRef = ref(null)
|
||||||
const total = ref(0) // 数据总量
|
const total = ref(0) // 数据总量
|
||||||
const active = ref(1) // tap索引
|
const active = ref(1) // tap索引
|
||||||
const tableList = ref([]) // 列表数据源
|
const tableList = ref([]) // 列表数据源
|
||||||
|
|
@ -159,7 +160,7 @@ const onChangeDate = (val) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
//点击事件
|
//点击事件
|
||||||
const onClick=(e,item)=> {
|
const onClick=(e,item, itemIndex)=> {
|
||||||
if(item.status==3){
|
if(item.status==3){
|
||||||
if(e.index==0){
|
if(e.index==0){
|
||||||
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
||||||
|
|
@ -172,6 +173,7 @@ const onClick=(e,item)=> {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
swipeRef.value[itemIndex].closeAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
//左滑选择项1
|
//左滑选择项1
|
||||||
|
|
@ -356,11 +358,7 @@ const confirmTransfer = () => {
|
||||||
const maskClick = () => {}
|
const maskClick = () => {}
|
||||||
|
|
||||||
// // 页面加载完毕
|
// // 页面加载完毕
|
||||||
// onLoad(() => {
|
onShow(() => {
|
||||||
// getTableList()
|
|
||||||
// })
|
|
||||||
|
|
||||||
onLoad(() => {
|
|
||||||
tableList.value = []
|
tableList.value = []
|
||||||
getTableList(true)
|
getTableList(true)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue