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