diff --git a/src/pages/materialsStation/toolsBack/toolsBack.vue b/src/pages/materialsStation/toolsBack/toolsBack.vue index 5e2158a..a56dc01 100644 --- a/src/pages/materialsStation/toolsBack/toolsBack.vue +++ b/src/pages/materialsStation/toolsBack/toolsBack.vue @@ -45,7 +45,7 @@ - + { 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() } } diff --git a/src/pages/materialsStation/toolsLease/toolsLease.vue b/src/pages/materialsStation/toolsLease/toolsLease.vue index c159eef..5568b1c 100644 --- a/src/pages/materialsStation/toolsLease/toolsLease.vue +++ b/src/pages/materialsStation/toolsLease/toolsLease.vue @@ -45,7 +45,7 @@ - + { 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() } // 删除 diff --git a/src/pages/my/signature.vue b/src/pages/my/signature.vue index 1409193..e6e646e 100644 --- a/src/pages/my/signature.vue +++ b/src/pages/my/signature.vue @@ -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) { diff --git a/src/services/materialsStation.js b/src/services/materialsStation.js index 1b73372..65a616e 100644 --- a/src/services/materialsStation.js +++ b/src/services/materialsStation.js @@ -253,6 +253,15 @@ export function getTeamWarnDetailsListApi(data) { return http({ url: '/material/material_maMachine/getTeamWarnDetailsList', method: 'get', - data + data, }) -} \ No newline at end of file +} + +// 签名-领料 +export const toolsLeaseApplyInfoSign = (data) => { + return http({ + method: 'POST', + url: '/material/material_lease_apply_info/updateLeaseApplyInfoSign', + data, + }) +}