This commit is contained in:
parent
3f7330e52d
commit
6bd7fc1627
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
<!-- 滚动列表 -->
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
||||
<uni-swipe-action class="swipe-action">
|
||||
<uni-swipe-action class="swipe-action" ref="swipeRef">
|
||||
<uni-swipe-action-item
|
||||
v-for="(item, index) in tableList"
|
||||
:right-options="item.options"
|
||||
|
|
@ -112,6 +112,7 @@ const items = ref(['未完成', '已完成'])
|
|||
const current = ref(0)
|
||||
const tableList = ref([])
|
||||
const total = ref(0)
|
||||
const swipeRef = ref()
|
||||
const finish = computed(() => {
|
||||
if (total.value === tableList.value.length) return true
|
||||
})
|
||||
|
|
@ -199,12 +200,14 @@ const onClickSwipe = async (e, item) => {
|
|||
// 删除
|
||||
await deleteItem(item)
|
||||
}
|
||||
swipeRef.value.closeAll()
|
||||
} catch (error) {
|
||||
console.error('操作失败:', error)
|
||||
uni.showToast({
|
||||
title: error.message || '操作失败',
|
||||
icon: 'error',
|
||||
})
|
||||
swipeRef.value.closeAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
<!-- 滚动列表 -->
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower">
|
||||
<uni-swipe-action>
|
||||
<uni-swipe-action ref="swipeRef">
|
||||
<uni-swipe-action-item
|
||||
v-for="(item, index) in tableList"
|
||||
:right-options="item.options"
|
||||
|
|
@ -110,6 +110,7 @@ const items = ref(['未完成', '已完成'])
|
|||
const current = ref(0)
|
||||
const tableList = ref([])
|
||||
const total = ref(0)
|
||||
const swipeRef = ref()
|
||||
|
||||
const finish = computed(() => {
|
||||
if (total.value === tableList.value.length) return true
|
||||
|
|
@ -196,7 +197,7 @@ const onScrollTolower = () => {
|
|||
}
|
||||
|
||||
// 滑动
|
||||
const onClickSwipe = async (e, item) => {
|
||||
const onClickSwipe = async (e, item, itemIndex) => {
|
||||
console.log('🚀 ~ onClickSwipe ~ e:', e, item)
|
||||
if (e.content.text == '电子签名') {
|
||||
// 电子签名
|
||||
|
|
@ -205,6 +206,7 @@ const onClickSwipe = async (e, item) => {
|
|||
const params = {
|
||||
id: item.id,
|
||||
leaseSignUrl: item.leaseSignUrl,
|
||||
leaseSignType: item.leaseSignType,
|
||||
isToolsLease: true,
|
||||
}
|
||||
uni.navigateTo({
|
||||
|
|
@ -225,6 +227,7 @@ const onClickSwipe = async (e, item) => {
|
|||
// 删除
|
||||
deleteItem(item)
|
||||
}
|
||||
swipeRef.value.closeAll()
|
||||
}
|
||||
|
||||
// 删除
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import {
|
|||
updateLeaseApplyInfoSign,
|
||||
updateSignById,
|
||||
} from '@/services/signature.js'
|
||||
import { toolsLeaseApplyInfoSign } from '@/services/materialsStation'
|
||||
import { baseURL } from '@/utils/http'
|
||||
|
||||
let isCanvas = ref(false)
|
||||
|
|
@ -37,7 +38,7 @@ onLoad((opt) => {
|
|||
// console.log('🚀 ~ onLoad ~ opt:', opt)
|
||||
const params = opt.params ? JSON.parse(opt.params) : {}
|
||||
Object.assign(opts, params)
|
||||
if (opts.isLease) {
|
||||
if (opts.isLease || opts.isToolsLease) {
|
||||
signType.value = opts.leaseSignType
|
||||
imgPath.value = opts.leaseSignUrl
|
||||
}
|
||||
|
|
@ -206,7 +207,7 @@ const onCameraSuccess = (file) => {
|
|||
publishTask: opts.publishTask || '',
|
||||
}
|
||||
console.log('🚀 ~ success: ~ params:', params)
|
||||
updateLeaseApplyInfoSign(params).then((res) => {
|
||||
toolsLeaseApplyInfoSign(params).then((res) => {
|
||||
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
||||
uni.navigateBack()
|
||||
})
|
||||
|
|
@ -262,7 +263,7 @@ const uploadImg2 = async (base64Data) => {
|
|||
publishTask: opts.publishTask || '',
|
||||
}
|
||||
console.log('🚀 ~ success: ~ params:', params)
|
||||
const res = await updateLeaseApplyInfoSign(params)
|
||||
const res = await toolsLeaseApplyInfoSign(params)
|
||||
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
||||
uni.navigateBack()
|
||||
} else if (opts.isBack) {
|
||||
|
|
|
|||
|
|
@ -253,6 +253,15 @@ export function getTeamWarnDetailsListApi(data) {
|
|||
return http({
|
||||
url: '/material/material_maMachine/getTeamWarnDetailsList',
|
||||
method: 'get',
|
||||
data
|
||||
data,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 签名-领料
|
||||
export const toolsLeaseApplyInfoSign = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material/material_lease_apply_info/updateLeaseApplyInfoSign',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue