退料签名
This commit is contained in:
parent
2cbb446286
commit
e369203df9
|
|
@ -85,6 +85,14 @@
|
|||
custom-style="successStyle"
|
||||
/>
|
||||
</div>
|
||||
<div style="line-height: 1.8; display: flex; align-items: center">
|
||||
<span style="margin-right: 5px">是否签名:</span>
|
||||
<uni-tag
|
||||
:text="item.isElectronicSign == 1 ? '未签名' : '已签名'"
|
||||
:inverted="true"
|
||||
:type="item.isElectronicSign == 1 ? 'error' : 'success'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</uni-swipe-action-item>
|
||||
|
|
@ -146,14 +154,21 @@ const getList = async () => {
|
|||
console.log('🚀 ~ getList ~ res:', res)
|
||||
if (res.code == 200) {
|
||||
tableList.value = res.data.rows.map((item, index) => {
|
||||
let options = [
|
||||
// { text: '电子签名', style: { backgroundColor: '#c6bf3b' } },
|
||||
{ text: '编辑', style: { backgroundColor: '#2f8cf0' } },
|
||||
{ text: '删除', style: { backgroundColor: '#ff4949' } },
|
||||
]
|
||||
let options = []
|
||||
if (item.taskStatus != 2) {
|
||||
options = [
|
||||
{ text: '编辑', style: { backgroundColor: '#2f8cf0' } },
|
||||
{ text: '删除', style: { backgroundColor: '#ff4949' } },
|
||||
]
|
||||
} else {
|
||||
options = []
|
||||
}
|
||||
if (item.isElectronicSign == 1) {
|
||||
options.unshift({ text: '电子签名', style: { backgroundColor: '#c6bf3b' } })
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
options: item.taskStatus == 2 ? [] : options, // 如果任务状态为4,则不显示操作按钮
|
||||
options,
|
||||
}
|
||||
})
|
||||
console.log('🚀 ~ getList ~ tableList.value:', tableList.value)
|
||||
|
|
@ -202,6 +217,14 @@ const onClickSwipe = async (e, item) => {
|
|||
} else if (e.content.text == '删除') {
|
||||
// 删除
|
||||
await deleteItem(item)
|
||||
} else if (e.content.text == '电子签名') {
|
||||
const params = {
|
||||
id: item.id,
|
||||
isToolsBack: true,
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/my/signature?params=${JSON.stringify(params)}`,
|
||||
})
|
||||
}
|
||||
swipeRef.value.closeAll()
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import {
|
|||
updateLeaseApplyInfoSign,
|
||||
updateSignById,
|
||||
} from '@/services/signature.js'
|
||||
import { toolsLeaseApplyInfoSign, updateLeaseApplyInfoSignApi } from '@/services/materialsStation'
|
||||
import { toolsLeaseApplyInfoSign, updateLeaseApplyInfoSignApi, updateSignByIdApi } from '@/services/materialsStation'
|
||||
import { baseURL } from '@/utils/http'
|
||||
import { uploadImgSignUrl } from '@/utils/bnsBase'
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ onLoad((opt) => {
|
|||
})
|
||||
|
||||
onMounted(() => {
|
||||
if (opts.isLease || opts.isBack || opts.isAuthorize || opts.isToolsLease) return
|
||||
if (opts.isLease || opts.isBack || opts.isAuthorize || opts.isToolsLease || opts.isToolsBack) return
|
||||
getSignData()
|
||||
})
|
||||
|
||||
|
|
@ -240,6 +240,23 @@ const uploadSignUrl = async (url) => {
|
|||
}, 1000)
|
||||
},
|
||||
})
|
||||
} else if (opts.isToolsBack) {
|
||||
const params = {
|
||||
id: opts.id,
|
||||
backSignUrl: signUrl,
|
||||
backSignType: signType.value
|
||||
}
|
||||
const res = await updateSignByIdApi(params)
|
||||
console.log('🚀 ~ 退料签名 ~ res:', res)
|
||||
uni.showToast({
|
||||
title: '签名成功',
|
||||
mask: true,
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
},
|
||||
})
|
||||
} else if (opts.isAuthorize) {
|
||||
const params = {
|
||||
parentId: opts.id,
|
||||
|
|
|
|||
|
|
@ -425,4 +425,13 @@ export const getSafeDetailsListApi = (data) => {
|
|||
url: '/material/material_maMachine/getSafeDetailsList',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 退料签名
|
||||
export const updateSignByIdApi = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material/material_back_apply_info/updateSignById',
|
||||
data,
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue