修改bug
parent
5057e9579c
commit
6c1b67d865
10
src/App.vue
10
src/App.vue
|
|
@ -3,13 +3,9 @@ import { useUserStoreWithOut } from '@/store/modules/user'
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
const userStore = useUserStoreWithOut()
|
const userStore = useUserStoreWithOut()
|
||||||
// if (userStore.isLogin) {
|
if (userStore.isLogin) {
|
||||||
// userStore.fetchUserInfo()
|
userStore.fetchUserInfo()
|
||||||
// } else {
|
}
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/pages/login/index',
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
if (userStore.isLogin) {
|
if (userStore.isLogin) {
|
||||||
plus.navigator.closeSplashscreen()
|
plus.navigator.closeSplashscreen()
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,12 @@
|
||||||
"navigationBarTitleText": "报销管理"
|
"navigationBarTitleText": "报销管理"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "detail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "报销详情"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "submit",
|
"path": "submit",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
||||||
|
|
@ -1,42 +1,47 @@
|
||||||
<template>
|
<template>
|
||||||
<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">
|
||||||
<uv-form-item
|
<template v-if="item.show">
|
||||||
v-if="item.type == 'album'"
|
<uv-form-item
|
||||||
:label="item.title"
|
v-if="item.type == 'album'"
|
||||||
labelPosition="top"
|
:label="item.title"
|
||||||
>
|
labelPosition="top"
|
||||||
<!-- {{ 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>
|
<!-- {{ item.value }} -->
|
||||||
<uv-line
|
<view class="mt-20rpx w-full">
|
||||||
v-if="i < columsList.length - 1 && (item?.bottomBorder || true)"
|
<uv-album
|
||||||
color="#f5f5f5"
|
multipleSize="190rpx"
|
||||||
></uv-line>
|
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>
|
</template>
|
||||||
</uv-form>
|
</uv-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -58,14 +63,19 @@ const props = defineProps({
|
||||||
const columsList = computed(() => {
|
const columsList = computed(() => {
|
||||||
const arr = []
|
const arr = []
|
||||||
props.colums.forEach((e) => {
|
props.colums.forEach((e) => {
|
||||||
const { dataIndex, format } = e
|
const { dataIndex, format, isShow } = e
|
||||||
let str = getValue(props.data, dataIndex)
|
let str = getValue(props.data, dataIndex)
|
||||||
|
let show = true
|
||||||
if (isFunction(format)) {
|
if (isFunction(format)) {
|
||||||
str = format(str)
|
str = format(str)
|
||||||
}
|
}
|
||||||
|
if (isFunction(isShow)) {
|
||||||
|
show = isShow(props.data)
|
||||||
|
}
|
||||||
arr.push({
|
arr.push({
|
||||||
...e,
|
...e,
|
||||||
value: str,
|
value: str,
|
||||||
|
show: show,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return arr
|
return arr
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ import { timeFormat } from '@climblee/uv-ui/libs/function'
|
||||||
export default {
|
export default {
|
||||||
//清洁任务
|
//清洁任务
|
||||||
task_hygienes: [
|
task_hygienes: [
|
||||||
{
|
// {
|
||||||
title: '申请人',
|
// title: '申请人',
|
||||||
dataIndex: 'name',
|
// dataIndex: 'name',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '所属门店',
|
title: '所属门店',
|
||||||
dataIndex: 'taskable.store.address',
|
dataIndex: 'taskable.store.title',
|
||||||
borderBottom: false,
|
// borderBottom: false,
|
||||||
labelPosition: 'top'
|
// labelPosition: 'top'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '电话号码',
|
title: '电话号码',
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,42 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="p-base">
|
||||||
<CuNavbar title="审核流程"></CuNavbar>
|
<CuNavbar title="审核流程"></CuNavbar>
|
||||||
<view class="list">
|
<view class="card-shadow bg-white p-base">
|
||||||
<view class="item flex" v-for="item in list" :key="item.id">
|
<uv-steps direction="column">
|
||||||
<view class="name">{{ item.check_name }}</view>
|
<uv-steps-item
|
||||||
<view v-if="item.check_status != 1" class="status bg-red">{{ item.check_status_text }}</view>
|
v-for="item in list"
|
||||||
<view v-if="item.checked_at" class="time text-gray">{{ item.checked_at }}</view>
|
:key="item.id"
|
||||||
</view>
|
:title="item.check_status_text"
|
||||||
|
:desc="timeFormat(item.checked_at, 'yyyy-mm-dd hh:MM:ss')"
|
||||||
|
>
|
||||||
|
<template #icon>
|
||||||
|
<view class="w-31rpx h-31rpx rounded-full mt-4rpx"
|
||||||
|
|
||||||
|
:class="[item.check_status==2 || item.check_status==3 ? 'bg-blue' : 'bg-gray-300']"
|
||||||
|
></view>
|
||||||
|
</template>
|
||||||
|
<template #title>
|
||||||
|
<view class="space-y-6rpx">
|
||||||
|
<view class="flex items-center space-x-14rpx">
|
||||||
|
<view> {{ item.check_name }}</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="item.checked_at"
|
||||||
|
class="text-24rpx"
|
||||||
|
:style="{
|
||||||
|
color: statusFun(item.check_status, 'statusExpense', 'color'),
|
||||||
|
}"
|
||||||
|
>{{ item.check_status_text }}</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template #desc>
|
||||||
|
<view v-if="item.checked_at" class="text-22rpx text-hex-999">
|
||||||
|
{{ timeFormat(item.checked_at, 'yyyy-mm-dd hh:MM:ss') }}
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</uv-steps-item>
|
||||||
|
</uv-steps>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -14,13 +44,18 @@
|
||||||
import CuNavbar from '@/components/cu-navbar/index'
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
import { http } from '@/utils/request'
|
import { http } from '@/utils/request'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
|
import { timeFormat } from '@climblee/uv-ui/libs/function'
|
||||||
|
import statusFun from '@/utils/status'
|
||||||
const list = ref([])
|
const list = ref([])
|
||||||
|
// const currentStop = computed(()=>list.value.filter(e=>e.check_status>=3))
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
http.get(`/workflow/${options.id}/logs`, { params: { subject_type: options.type } }).then(res => {
|
http
|
||||||
list.value = res
|
.get(`/workflow/${options.id}/logs`, {
|
||||||
})
|
params: { subject_type: options.type },
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
list.value = res
|
||||||
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<CuNavbar title="报销详情">
|
||||||
|
<template #right>
|
||||||
|
<uv-icon
|
||||||
|
v-if="data?.workflow_check?.check_status == 4"
|
||||||
|
color="white"
|
||||||
|
@click="open"
|
||||||
|
name="more-dot-fill"
|
||||||
|
></uv-icon>
|
||||||
|
</template>
|
||||||
|
</CuNavbar>
|
||||||
|
<view class="px-base mt-30rpx">
|
||||||
|
<view class="card-shadow bg-white rounded-19rpx px-base">
|
||||||
|
<BaseData :colums="colums" :data="data"></BaseData>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<uv-action-sheet
|
||||||
|
ref="actionSheet"
|
||||||
|
:actions="actionlist"
|
||||||
|
@select="select"
|
||||||
|
cancelText="取消"
|
||||||
|
>
|
||||||
|
</uv-action-sheet>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import CuNavbar from '@/components/cu-navbar/index.vue'
|
||||||
|
import BaseData from '@/pages/audits/base-data.vue'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
import { http } from '@/utils/request'
|
||||||
|
|
||||||
|
const actionlist = ref([
|
||||||
|
{
|
||||||
|
name: '删除',
|
||||||
|
value: 'delete',
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
const colums = [
|
||||||
|
{
|
||||||
|
title: '审核状态',
|
||||||
|
dataIndex: 'workflow_check.check_status_text',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '未通过理由',
|
||||||
|
dataIndex: 'workflow_check.check_remarks',
|
||||||
|
isShow: (item) => {
|
||||||
|
return item?.workflow_check?.check_status == 4
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '报销分类',
|
||||||
|
dataIndex: 'type.name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '报销金额',
|
||||||
|
dataIndex: 'expense',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '报销原因',
|
||||||
|
dataIndex: 'reason',
|
||||||
|
labelPosition: 'top',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '报销凭证',
|
||||||
|
dataIndex: 'photos',
|
||||||
|
type: 'album',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const actionSheet = ref(null)
|
||||||
|
const data = ref(null)
|
||||||
|
const id = ref(null)
|
||||||
|
|
||||||
|
const open = () => {
|
||||||
|
actionSheet.value.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
const select = (e) => {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad((option) => {
|
||||||
|
id.value = option.id
|
||||||
|
getDetail()
|
||||||
|
})
|
||||||
|
|
||||||
|
const getDetail = () => {
|
||||||
|
http.get(`/reimbursements/${id.value}`).then((res) => {
|
||||||
|
data.value = res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
@change="tabChange"
|
@change="tabChange"
|
||||||
></uv-tabs>
|
></uv-tabs>
|
||||||
</uv-sticky>
|
</uv-sticky>
|
||||||
<view class="px-base space-y-20rpx mt-30rpx">
|
<view class="">
|
||||||
<MescrollItem
|
<MescrollItem
|
||||||
ref="mescrollItem0"
|
ref="mescrollItem0"
|
||||||
:top="88"
|
:top="88"
|
||||||
|
|
@ -28,7 +28,11 @@
|
||||||
:apiUrl="tabList[0].apiUrl"
|
:apiUrl="tabList[0].apiUrl"
|
||||||
>
|
>
|
||||||
<template v-slot="{ list }">
|
<template v-slot="{ list }">
|
||||||
<Item v-for="item in list" :key="item.id" :item="item" @click="detail" />
|
<view class="space-y-15rpx p-base">
|
||||||
|
<view v-for="item in list" :key="item.id">
|
||||||
|
<Item :item="item" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</MescrollItem>
|
</MescrollItem>
|
||||||
<MescrollItem
|
<MescrollItem
|
||||||
|
|
@ -40,7 +44,14 @@
|
||||||
:params="tabList[1].params"
|
:params="tabList[1].params"
|
||||||
>
|
>
|
||||||
<template v-slot="{ list }">
|
<template v-slot="{ list }">
|
||||||
<Item v-for="item in list" :key="item.id" :item="item" @click="checkDetail" />
|
<view class="space-y-15rpx p-base">
|
||||||
|
<view v-for="item in list" :key="item.id">
|
||||||
|
<Item
|
||||||
|
:item="item"
|
||||||
|
:type="tabList[1].params.subject_type"
|
||||||
|
status="statusExpense"
|
||||||
|
/> </view
|
||||||
|
></view>
|
||||||
</template>
|
</template>
|
||||||
</MescrollItem>
|
</MescrollItem>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -48,13 +59,9 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import CuNavbar from '@/components/cu-navbar/index'
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
import { http } from '@/utils/request'
|
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
|
||||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||||
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
|
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
|
||||||
import { timeFormat } from '@climblee/uv-ui/libs/function'
|
|
||||||
import statusFun from '@/utils/status'
|
|
||||||
import MescrollItem from '@/components/mescroll-api/more.vue'
|
import MescrollItem from '@/components/mescroll-api/more.vue'
|
||||||
import Item from './item.vue'
|
import Item from './item.vue'
|
||||||
|
|
||||||
|
|
@ -76,7 +83,7 @@ const tabList = ref([
|
||||||
{
|
{
|
||||||
name: '报销审核',
|
name: '报销审核',
|
||||||
apiUrl: '/workflow',
|
apiUrl: '/workflow',
|
||||||
params: { subject_type: 'reimbursements', include: 'employee,type' }
|
params: { subject_type: 'reimbursements' },
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
@ -90,13 +97,4 @@ const goPath = (url) => {
|
||||||
url,
|
url,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转详细页
|
|
||||||
const detail = (item) => {
|
|
||||||
console.log(item.id)
|
|
||||||
}
|
|
||||||
// 跳转审核页
|
|
||||||
const checkDetail = (item) => {
|
|
||||||
console.log(item.id)
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="detail(item)">
|
<view
|
||||||
|
class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
|
||||||
|
@click="detail(item)"
|
||||||
|
>
|
||||||
<view class="flex items-center justify-between">
|
<view class="flex items-center justify-between">
|
||||||
<view class="text-30rpx"> {{ item.type?.name }} </view>
|
<view class="text-30rpx"> {{ item.type?.name }} </view>
|
||||||
<view :style="[
|
<view
|
||||||
{
|
:style="[
|
||||||
color: statusFun(
|
{
|
||||||
item.workflow_check?.check_status,
|
color: statusFun(
|
||||||
'statusExpense',
|
item.workflow_check?.check_status,
|
||||||
'color'
|
status || 'statusExpense',
|
||||||
),
|
'color'
|
||||||
},
|
),
|
||||||
]" class="text-24rpx">{{ item.workflow_check?.check_status_text }}</view>
|
},
|
||||||
|
]"
|
||||||
|
class="text-24rpx"
|
||||||
|
>{{ item.workflow_check?.check_status_text }}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-24rpx text-hex-999999 flex">
|
<view class="text-24rpx text-hex-999999 flex">
|
||||||
<view class="w-140rpx">报销金额</view>
|
<view class="w-140rpx">报销金额</view>
|
||||||
|
|
@ -35,9 +42,20 @@ const emits = defineEmits(['click'])
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: Object,
|
item: Object,
|
||||||
|
type: String,
|
||||||
|
status: String,
|
||||||
})
|
})
|
||||||
|
|
||||||
const detail = (item) => {
|
const detail = (item) => {
|
||||||
emits('click', item)
|
let url
|
||||||
|
if (props.type) {
|
||||||
|
url = `/pages/audits/detail?id=${props.item.id}&type=${props.type}`
|
||||||
|
} else {
|
||||||
|
url = `/pages/expense-account/detail?id=${props.item.id}`
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
ref="datetimePicker"
|
ref="datetimePicker"
|
||||||
mode="datetime"
|
mode="datetime"
|
||||||
|
:maxDate="new Date().getTime()"
|
||||||
@confirm="confirmDatePicker"
|
@confirm="confirmDatePicker"
|
||||||
>
|
>
|
||||||
</uv-datetime-picker>
|
</uv-datetime-picker>
|
||||||
|
|
@ -69,7 +70,7 @@ import { ref, reactive, computed } from "vue"
|
||||||
import { onLoad } from "@dcloudio/uni-app"
|
import { onLoad } from "@dcloudio/uni-app"
|
||||||
import { http } from "@/utils/request"
|
import { http } from "@/utils/request"
|
||||||
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
|
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
|
||||||
const columns = [["上班补卡", "上班补卡"]]
|
const columns = [["上班补卡", "下班补卡"]]
|
||||||
const formRef = ref(null)
|
const formRef = ref(null)
|
||||||
const datetimePicker = ref(null)
|
const datetimePicker = ref(null)
|
||||||
const pickerRef = ref(null)
|
const pickerRef = ref(null)
|
||||||
|
|
@ -154,6 +155,7 @@ const onSubmit = async () => {
|
||||||
title: "提交成功",
|
title: "提交成功",
|
||||||
icon: "none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
|
uni.$emit("make-card:update")
|
||||||
formRef.value.resetFields()
|
formRef.value.resetFields()
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import CuNavbar from '@/components/cu-navbar/index'
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
|
import { onPageScroll, onReachBottom, onShow,onLoad } from '@dcloudio/uni-app'
|
||||||
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
|
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
|
||||||
import MescrollItem from '@/components/mescroll-api/more.vue'
|
import MescrollItem from '@/components/mescroll-api/more.vue'
|
||||||
import Item from './components/item.vue'
|
import Item from './components/item.vue'
|
||||||
|
|
@ -80,6 +80,14 @@ const { tabIndex, getMescroll, scrollToLastY } = useMescrollMore(
|
||||||
onPageScroll,
|
onPageScroll,
|
||||||
onReachBottom
|
onReachBottom
|
||||||
)
|
)
|
||||||
|
|
||||||
|
onLoad(()=>{
|
||||||
|
uni.$on('make-card:update',()=>{
|
||||||
|
getMescroll(0).resetUpScroll()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const goPath = (url) => {
|
const goPath = (url) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url,
|
url,
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ const opList = [
|
||||||
icon: 'folder',
|
icon: 'folder',
|
||||||
title: '提成数据',
|
title: '提成数据',
|
||||||
url: '/pages/data/brokerage/index',
|
url: '/pages/data/brokerage/index',
|
||||||
|
rouls: ['store'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -55,7 +56,7 @@ const opList = [
|
||||||
icon: 'photo-fill',
|
icon: 'photo-fill',
|
||||||
title: '员工管理',
|
title: '员工管理',
|
||||||
url: '/pages/user/index',
|
url: '/pages/user/index',
|
||||||
rouls: ['admin'],
|
rouls: ['store', 'admin', 'store_user'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'lock',
|
icon: 'lock',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<template>
|
||||||
|
<uv-popup ref="popup" round="19rpx" mode="bottom">
|
||||||
|
<view class="py-30rpx">
|
||||||
|
<view
|
||||||
|
class="px-base"
|
||||||
|
@click="handleClick(item)"
|
||||||
|
v-for="(item, i) in list"
|
||||||
|
:key="i"
|
||||||
|
>
|
||||||
|
<view class="flex items-center">
|
||||||
|
<view class="py-10rpx flex-1">
|
||||||
|
<view class="text-28rpx"> {{ item.title }}</view>
|
||||||
|
<view class="text-hex-999 text-24rpx mt-10rpx">{{
|
||||||
|
item.address
|
||||||
|
}}</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<uv-icon v-if="id == item.id" name="checkbox-mark"></uv-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uv-line></uv-line>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="h-100rpx"></view>
|
||||||
|
</uv-popup>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import { http } from '@/utils/request'
|
||||||
|
const props = defineProps({
|
||||||
|
id: [Number, String],
|
||||||
|
})
|
||||||
|
const popup = ref(null)
|
||||||
|
const list = ref([])
|
||||||
|
onMounted(() => {
|
||||||
|
getStore()
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits(['change'])
|
||||||
|
const handleClick = (e) => {
|
||||||
|
emit('change', e)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStore = () => {
|
||||||
|
http.get('/auth/stores').then((res) => {
|
||||||
|
list.value = res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const open = () => {
|
||||||
|
popup.value.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
const close = () => {
|
||||||
|
popup.value.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open, close })
|
||||||
|
</script>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<uv-line color="#f5f5f5"></uv-line>
|
<uv-line color="#f5f5f5"></uv-line>
|
||||||
<view class="flex justify-between items-center min-h-88rpx">
|
<view class="flex justify-between items-center min-h-88rpx">
|
||||||
<view class="text-hex-999">门店</view>
|
<view class="text-hex-999">门店</view>
|
||||||
<view class="" v-if="detail.store">{{ detail.store.address }}</view>
|
<view class="" v-if="detail.store">{{ detail.store.title }}</view>
|
||||||
<view class="" v-else>无</view>
|
<view class="" v-else>无</view>
|
||||||
</view>
|
</view>
|
||||||
<uv-line color="#f5f5f5"></uv-line>
|
<uv-line color="#f5f5f5"></uv-line>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="p-base">
|
<view class="p-base">
|
||||||
<CuNavbar :title="title">
|
<CuNavbar :title="title"></CuNavbar>
|
||||||
<!-- <template #right>
|
|
||||||
<view class="text-white">保存</view>
|
|
||||||
</template> -->
|
|
||||||
</CuNavbar>
|
|
||||||
<view class="card-shadow px-base">
|
<view class="card-shadow px-base">
|
||||||
<uv-form
|
<uv-form
|
||||||
labelPosition="left"
|
labelPosition="left"
|
||||||
|
|
@ -14,6 +10,23 @@
|
||||||
errorType="toast"
|
errorType="toast"
|
||||||
labelWidth="150rpx"
|
labelWidth="150rpx"
|
||||||
>
|
>
|
||||||
|
<template v-if="isEdit">
|
||||||
|
<uv-form-item label="门店" prop="" @click="showStoreSelect">
|
||||||
|
<uv-input
|
||||||
|
disabled
|
||||||
|
disabledColor="#ffffff"
|
||||||
|
placeholder="请选择门店"
|
||||||
|
inputAlign="right"
|
||||||
|
:border="`none`"
|
||||||
|
v-model="form.store"
|
||||||
|
>
|
||||||
|
</uv-input>
|
||||||
|
<template v-slot:right>
|
||||||
|
<uv-icon name="arrow-right"></uv-icon>
|
||||||
|
</template>
|
||||||
|
</uv-form-item>
|
||||||
|
</template>
|
||||||
|
<uv-line color="#f5f5f5"></uv-line>
|
||||||
<uv-form-item required label="姓名" prop="name">
|
<uv-form-item required label="姓名" prop="name">
|
||||||
<uv-input
|
<uv-input
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
|
|
@ -36,16 +49,18 @@
|
||||||
</uv-input>
|
</uv-input>
|
||||||
</uv-form-item>
|
</uv-form-item>
|
||||||
<uv-line color="#f5f5f5"></uv-line>
|
<uv-line color="#f5f5f5"></uv-line>
|
||||||
<uv-form-item required label="登录用户名" prop="username">
|
<template v-if="!isEdit">
|
||||||
<uv-input
|
<uv-form-item required label="登录用户名" prop="username">
|
||||||
placeholder="请输入登录用户名"
|
<uv-input
|
||||||
inputAlign="right"
|
placeholder="请输入登录用户名"
|
||||||
v-model="form.username"
|
inputAlign="right"
|
||||||
:border="`none`"
|
v-model="form.username"
|
||||||
>
|
:border="`none`"
|
||||||
</uv-input>
|
>
|
||||||
</uv-form-item>
|
</uv-input>
|
||||||
<uv-line color="#f5f5f5"></uv-line>
|
</uv-form-item>
|
||||||
|
<uv-line color="#f5f5f5"></uv-line>
|
||||||
|
</template>
|
||||||
<uv-form-item :required="!isEdit" label="登录密码" prop="password">
|
<uv-form-item :required="!isEdit" label="登录密码" prop="password">
|
||||||
<uv-input
|
<uv-input
|
||||||
placeholder="请输入登录密码"
|
placeholder="请输入登录密码"
|
||||||
|
|
@ -56,9 +71,6 @@
|
||||||
>
|
>
|
||||||
</uv-input>
|
</uv-input>
|
||||||
</uv-form-item>
|
</uv-form-item>
|
||||||
<uv-form-item :required="!isEdit" label="门店" prop="password">
|
|
||||||
|
|
||||||
</uv-form-item>
|
|
||||||
</uv-form>
|
</uv-form>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-100rpx">
|
<view class="mt-100rpx">
|
||||||
|
|
@ -72,6 +84,12 @@
|
||||||
@confirm="onSubmit"
|
@confirm="onSubmit"
|
||||||
:showCancelButton="true"
|
:showCancelButton="true"
|
||||||
></uv-modal>
|
></uv-modal>
|
||||||
|
|
||||||
|
<StorePopup
|
||||||
|
:id="form.store_id"
|
||||||
|
ref="storeRef"
|
||||||
|
@change="storeChange"
|
||||||
|
></StorePopup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -80,6 +98,8 @@ import { ref, reactive, computed } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { mobile } from '@climblee/uv-ui/libs/function/test'
|
import { mobile } from '@climblee/uv-ui/libs/function/test'
|
||||||
import { http } from '@/utils/request'
|
import { http } from '@/utils/request'
|
||||||
|
import StorePopup from '@/pages/user/components/store-popup.vue'
|
||||||
|
const storeRef = ref(null)
|
||||||
const formRef = ref(null)
|
const formRef = ref(null)
|
||||||
const modalRef = ref(null)
|
const modalRef = ref(null)
|
||||||
const id = ref(0)
|
const id = ref(0)
|
||||||
|
|
@ -90,6 +110,8 @@ const form = reactive({
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
confirm_password: '',
|
confirm_password: '',
|
||||||
|
store_id: '',
|
||||||
|
store: '',
|
||||||
})
|
})
|
||||||
const rules = computed(() => {
|
const rules = computed(() => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -118,17 +140,28 @@ const rules = computed(() => {
|
||||||
})
|
})
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
id.value = options.id
|
id.value = options.id
|
||||||
if(isEdit.value) getDetail()
|
if (isEdit.value) getDetail()
|
||||||
})
|
})
|
||||||
const isEdit = computed(() => !!id.value)
|
const isEdit = computed(() => !!id.value)
|
||||||
const title = computed(() => (isEdit.value ? '员工修改' : '员工添加'))
|
const title = computed(() => (isEdit.value ? '员工修改' : '员工添加'))
|
||||||
|
|
||||||
|
const storeChange = (data) => {
|
||||||
|
form.store_id = data.id
|
||||||
|
form.store = data.title
|
||||||
|
storeRef.value.close()
|
||||||
|
}
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
formRef.value.validate().then((res) => {
|
formRef.value.validate().then((res) => {
|
||||||
modalRef.value.open()
|
modalRef.value.open()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const showStoreSelect = () => {
|
||||||
|
// uni.$emit('showStoreSelect')
|
||||||
|
storeRef.value.open()
|
||||||
|
}
|
||||||
|
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
if (isEdit.value) {
|
if (isEdit.value) {
|
||||||
updateUser()
|
updateUser()
|
||||||
|
|
@ -186,7 +219,7 @@ const getDetail = () => {
|
||||||
phone: res.phone,
|
phone: res.phone,
|
||||||
username: res.username,
|
username: res.username,
|
||||||
}
|
}
|
||||||
Object.assign(form, info)
|
Object.assign(form, info, { store: res.store?.title })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ const tabList = ref([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '推荐列表',
|
name: '推荐列表',
|
||||||
apiUrl: '/hr/promotion/apply',
|
apiUrl: '/hr/promotion/invite',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '审核列表',
|
name: '审核列表',
|
||||||
|
|
@ -99,7 +99,9 @@ const { tabIndex, getMescroll, scrollToLastY } = useMescrollMore(
|
||||||
)
|
)
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
uni.$on('work:submit', getMescroll(tabIndex.value))
|
uni.$on('work:submit', ()=>{
|
||||||
|
getMescroll(tabIndex.value).resetUpScroll()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const goPath = (url) => {
|
const goPath = (url) => {
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,9 @@ const data = {
|
||||||
value: 4,
|
value: 4,
|
||||||
name: '未完成',
|
name: '未完成',
|
||||||
color: '#999999'
|
color: '#999999'
|
||||||
|
}],
|
||||||
|
job_text:[{
|
||||||
|
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
export default function (value, status, key) {
|
export default function (value, status, key) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue