panliang 2024-05-03 21:23:15 +08:00
parent 986da7a814
commit b94126aa2e
4 changed files with 30 additions and 15 deletions

View File

@ -133,16 +133,16 @@ export default {
},
agreements: {
params: {
include: 'check.subject.employee,check.subject.employee.store'
include: 'check.subject.employee,check.subject.store'
},
data: [
{ title: '审核状态', dataIndex: 'check_status', format: (value) => statusFun(value, 'statusExpense2', 'name')},
{ title: '上传人', dataIndex: 'check.subject.employee.name' },
{ title: '所属门店', dataIndex: 'check.subject.employee.store.title' },
{ title: '所属门店', dataIndex: 'check.subject.store.title' },
{ title: '电话号码', dataIndex: 'check.subject.employee.phone' },
{ title: '上传时间', dataIndex: 'check.subject.created_format' },
{ title: '合同名称', dataIndex: 'check.subject.name' },
{ title: '合同照片', dataIndex: 'check.subject.images', type: 'album' },
{ title: '合同内容', dataIndex: 'check.subject.images', type: 'album' },
{ title: '未通过原因', dataIndex: 'remarks', labelPosition: 'top', isShow: (item) => item?.check_status == 4 },
]
}

View File

@ -1,6 +1,6 @@
<template>
<view>
<CuNavbar title="我的合同">
<CuNavbar title="合同管理">
<template #right>
<view @click="goPath('/pages/contract/create')" class="text-24rpx text-white">上传</view>
</template>

View File

@ -234,6 +234,14 @@ const submit = () => {
}
const onSubmit = async () => {
uni.showToast({
title: '提交成功',
icon: 'none',
})
formRef.value.resetFields()
uni.$emit('refresh')
uni.navigateBack()
return;
if (loading.value) return
loading.value = true
try {

View File

@ -40,7 +40,7 @@ const actions = ref([
])
const detail = ref({})
const pickerRef = ref(null)
const id = ref(0)
const id = ref(null)
const columns = [
{ title: '审核状态', dataIndex: 'workflow_check.check_status', format: (value) => statusFun(value, 'statusExpense', 'name') },
@ -95,16 +95,23 @@ const onSubmit = async () => {
loading.value = false
}
}
const init = () => {
if (id.value) {
http.get(`/hr/overtimes/${id.value}`).then((res) => {
detail.value = res
let status = res.workflow_check.check_status
if ([2, 3].indexOf(status) != -1) {
actions.value[0].disabled = true
actions.value[1].disabled = true
}
})
}
}
onLoad((options) => {
id.value = options.id
http.get(`/hr/overtimes/${options.id}`).then((res) => {
detail.value = res
let status = res.workflow_check.check_status
if ([2, 3].indexOf(status) != -1) {
actions.value[0].disabled = true
actions.value[1].disabled = true
// actions.value.splice(0, 2)
}
})
if (options.id) {
id.value = options.id
init()
}
})
</script>