main
parent
60108397c9
commit
2103dfff4e
|
|
@ -340,6 +340,12 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "审核详情"
|
"navigationBarTitleText": "审核详情"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "log",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "审核流程"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,48 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- <uv-list v-if="colums.length && data && Object.keys(data).length">
|
|
||||||
<template v-for="(item, i) in columsList" :key="i">
|
|
||||||
<slot :slotName="item.dataIndex" :data="item">
|
|
||||||
<uv-list-item :title="item.title" :right-text="item?.value">
|
|
||||||
</uv-list-item>
|
|
||||||
</slot>
|
|
||||||
</template>
|
|
||||||
</uv-list> -->
|
|
||||||
<uv-form labelWidth="160rpx">
|
<uv-form labelWidth="160rpx">
|
||||||
<template v-for="(item, i) in columsList" :key="i">
|
<template v-for="(item, i) in columsList" :key="i">
|
||||||
<slot :slotName="item.dataIndex" :data="item">
|
<uv-form-item
|
||||||
<uv-form-item :label="item.title" :labelPosition="item.labelPosition">
|
v-if="item.type == 'album'"
|
||||||
<uv-input inputAlign="right" :border="`none`" v-model="item.value"></uv-input>
|
:label="item.title"
|
||||||
</uv-form-item>
|
labelPosition="top"
|
||||||
</slot>
|
>
|
||||||
|
<!-- {{ item.value }} -->
|
||||||
|
<view class="mt-20rpx w-full">
|
||||||
|
|
||||||
|
<uv-album
|
||||||
|
multipleSize="190rpx"
|
||||||
|
singleSize="190rpx"
|
||||||
|
:urls="item.value"
|
||||||
|
:rowCount="3"
|
||||||
|
space="18rpx"
|
||||||
|
:showMore="false"
|
||||||
|
></uv-album>
|
||||||
|
</view>
|
||||||
|
</uv-form-item>
|
||||||
|
<uv-form-item
|
||||||
|
v-else
|
||||||
|
:label="item.title"
|
||||||
|
:labelPosition="item.labelPosition"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="w-full text-hex-999"
|
||||||
|
:style="[addStyle(item.customStyle)]"
|
||||||
|
:class="[
|
||||||
|
[item.labelPosition == 'top' ? 'text-left mt-10rpx' : 'text-right'],
|
||||||
|
]"
|
||||||
|
>{{ item.value }}</view
|
||||||
|
>
|
||||||
|
</uv-form-item>
|
||||||
|
<uv-line
|
||||||
|
v-if="i < columsList.length - 1 && (item?.bottomBorder || true)"
|
||||||
|
color="#f5f5f5"
|
||||||
|
></uv-line>
|
||||||
</template>
|
</template>
|
||||||
</uv-form>
|
</uv-form>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
import { addStyle } from '@climblee/uv-ui/libs/function/index'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
colums: {
|
colums: {
|
||||||
|
|
@ -35,9 +59,7 @@ const columsList = computed(() => {
|
||||||
const arr = []
|
const arr = []
|
||||||
props.colums.forEach((e) => {
|
props.colums.forEach((e) => {
|
||||||
const { dataIndex, format } = e
|
const { dataIndex, format } = e
|
||||||
// console.log(props.data)
|
let str = getValue(props.data, dataIndex)
|
||||||
// props.data[dataIndex]
|
|
||||||
let str =getValue(props.data,dataIndex)
|
|
||||||
if (isFunction(format)) {
|
if (isFunction(format)) {
|
||||||
str = format(str)
|
str = format(str)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ export default {
|
||||||
{
|
{
|
||||||
title: '所属门店',
|
title: '所属门店',
|
||||||
dataIndex: 'taskable.store.address',
|
dataIndex: 'taskable.store.address',
|
||||||
|
borderBottom: false,
|
||||||
|
labelPosition: 'top'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '电话号码',
|
title: '电话号码',
|
||||||
|
|
@ -27,6 +29,7 @@ export default {
|
||||||
{
|
{
|
||||||
title: '清洁结果',
|
title: '清洁结果',
|
||||||
dataIndex: 'taskable.photos',
|
dataIndex: 'taskable.photos',
|
||||||
|
type: 'album',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -1,22 +1,108 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<CuNavbar title="任务详情">
|
<CuNavbar title="任务详情">
|
||||||
<!-- <BaseData ></BaseData> -->
|
<template #right>
|
||||||
|
<view class="text-sm text-white" @click="goPath('/pages/audits/log')">审核流程</view>
|
||||||
|
</template>
|
||||||
</CuNavbar>
|
</CuNavbar>
|
||||||
{{ colums }}
|
<view class="px-base mt-30rpx">
|
||||||
|
<view class="card-shadow bg-white rounded-19rpx px-base">
|
||||||
|
<BaseData :colums="colums" :data="data"></BaseData>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="h-100rpx">
|
||||||
|
<view
|
||||||
|
class="fixed bottom-0 left-0 right-0 h-120rpx bg-white flex items-center px-base space-x-30rpx"
|
||||||
|
>
|
||||||
|
<view class="flex-1">
|
||||||
|
<uv-button @click="onJj" color="#999999" shape="circle" plain block>
|
||||||
|
拒绝
|
||||||
|
</uv-button>
|
||||||
|
</view>
|
||||||
|
<view class="flex-1">
|
||||||
|
<uv-button type="primary" shape="circle" block @click="onTg">
|
||||||
|
通过
|
||||||
|
</uv-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<uv-modal
|
||||||
|
ref="modalRef"
|
||||||
|
title="提示"
|
||||||
|
:content="modelOptions.content"
|
||||||
|
@confirm="modelOptions.onConfirm"
|
||||||
|
:showCancelButton="true"
|
||||||
|
>
|
||||||
|
<view class="flex-1" v-if="modelOptions.isValue">
|
||||||
|
<view class="w-full">
|
||||||
|
<uv-textarea v-model="value" placeholder="拒绝原因"></uv-textarea>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uv-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import CuNavbar from '@/components/cu-navbar/index'
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed, reactive } from 'vue'
|
||||||
import { http } from '@/utils/request'
|
import { http } from '@/utils/request'
|
||||||
import BaseData from './base-data.vue'
|
import BaseData from './base-data.vue'
|
||||||
import datajson from './data.data'
|
import datajson from './data.data'
|
||||||
|
|
||||||
|
const value = ref('')
|
||||||
const colums = computed(() => datajson[type.value] ?? [])
|
const colums = computed(() => datajson[type.value] ?? [])
|
||||||
const id = ref(null)
|
const id = ref(null)
|
||||||
const type = ref(null)
|
const type = ref(null)
|
||||||
|
const data = ref(null)
|
||||||
|
|
||||||
|
const modalRef = ref(null)
|
||||||
|
|
||||||
|
const modelOptions = reactive({
|
||||||
|
title: '提示',
|
||||||
|
content: '确定通过吗?',
|
||||||
|
isValue: false,
|
||||||
|
onConfirm: () => {},
|
||||||
|
})
|
||||||
|
|
||||||
|
const onConfirm = async () => {
|
||||||
|
try {
|
||||||
|
await http.post(
|
||||||
|
`/workflow/${id.value}/check`,
|
||||||
|
{
|
||||||
|
subject_type: type.value,
|
||||||
|
status: !modelOptions.isValue,
|
||||||
|
remarks: modelOptions.isValue ? value.value : '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
Accept: 'application/json',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
uni.$emit('audits:onRefresh')
|
||||||
|
uni.navigateBack()
|
||||||
|
} catch (error) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
const onTg = () => {
|
||||||
|
value.value = ''
|
||||||
|
modelOptions.title = '提示'
|
||||||
|
modelOptions.content = '确定通过吗?'
|
||||||
|
modelOptions.isValue = false
|
||||||
|
modelOptions.onConfirm = onConfirm
|
||||||
|
modalRef.value.open()
|
||||||
|
}
|
||||||
|
const onJj = () => {
|
||||||
|
value.value = ''
|
||||||
|
modelOptions.title = '拒绝原因'
|
||||||
|
modelOptions.content = '确定拒绝吗?'
|
||||||
|
modelOptions.isValue = true
|
||||||
|
modelOptions.onConfirm = onConfirm
|
||||||
|
modalRef.value.open()
|
||||||
|
}
|
||||||
|
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
id.value = opt.id
|
id.value = opt.id
|
||||||
type.value = opt.type
|
type.value = opt.type
|
||||||
|
|
@ -29,7 +115,12 @@ const getData = async () => {
|
||||||
subject_type: type.value,
|
subject_type: type.value,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
data.value = resData
|
||||||
console.log(resData)
|
console.log(resData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const goPath = (url) => {
|
||||||
|
uni.navigateTo({ url })
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<CuNavbar title="审核流程"></CuNavbar>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue