修改bug
|
|
@ -10,17 +10,20 @@
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion" : 3,
|
||||||
"compatible": {
|
"compatible" : {
|
||||||
"ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||||
},
|
},
|
||||||
"splashscreen" : {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender" : false,
|
"alwaysShowBeforeRender" : false,
|
||||||
"waiting" : true,
|
"waiting" : true,
|
||||||
"autoclose" : false,
|
"autoclose" : false,
|
||||||
"delay" : 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules" : {},
|
"modules" : {
|
||||||
|
"VideoPlayer" : {},
|
||||||
|
"Camera" : {}
|
||||||
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
/* android打包配置 */
|
/* android打包配置 */
|
||||||
|
|
|
||||||
|
|
@ -391,31 +391,31 @@
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"color": "#333",
|
"color": "#333",
|
||||||
"selectedColor": "#ff3c2a",
|
"selectedColor": "#ff3c2a",
|
||||||
"borderStyle": "black",
|
"borderStyle": "#fff",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"pagePath": "pages/home/index",
|
"pagePath": "pages/home/index",
|
||||||
"selectedIconPath": "static/images/home.png",
|
"selectedIconPath": "static/images/home-a.png",
|
||||||
"iconPath": "static/images/home.png",
|
"iconPath": "static/images/home.png",
|
||||||
"text": "首页"
|
"text": "首页"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/revert/index",
|
"pagePath": "pages/revert/index",
|
||||||
"selectedIconPath": "static/images/home.png",
|
"selectedIconPath": "static/images/update-a.png",
|
||||||
"iconPath": "static/images/home.png",
|
"iconPath": "static/images/update.png",
|
||||||
"text": "上报"
|
"text": "上报"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/statement/index",
|
"pagePath": "pages/statement/index",
|
||||||
"selectedIconPath": "static/images/home.png",
|
"selectedIconPath": "static/images/table-a.png",
|
||||||
"iconPath": "static/images/home.png",
|
"iconPath": "static/images/table.png",
|
||||||
"text": "报表"
|
"text": "报表"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/mine/index",
|
"pagePath": "pages/mine/index",
|
||||||
"selectedIconPath": "static/images/home.png",
|
"selectedIconPath": "static/images/mine-a.png",
|
||||||
"iconPath": "static/images/home.png",
|
"iconPath": "static/images/mine.png",
|
||||||
"text": "我的"
|
"text": "我的"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
>
|
>
|
||||||
<view class="flex-1" v-if="modelOptions.isValue">
|
<view class="flex-1" v-if="modelOptions.isValue">
|
||||||
<view class="w-full">
|
<view class="w-full">
|
||||||
<uv-textarea v-model="value" placeholder="拒绝原因"></uv-textarea>
|
<uv-textarea v-model="value" placeholder="请输入未通过原因"></uv-textarea>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uv-modal>
|
</uv-modal>
|
||||||
|
|
|
||||||
|
|
@ -42,11 +42,11 @@ const form = reactive({
|
||||||
images: []
|
images: []
|
||||||
})
|
})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
name: [{ required: true, message: "请输入清洁范围" }],
|
name: [{ required: true, message: "请输入合同名称" }],
|
||||||
images: {
|
images: {
|
||||||
type: "array",
|
type: "array",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请上传报销凭证"
|
message: "请上传合同照片",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
onLoad(options => {
|
onLoad(options => {
|
||||||
|
|
@ -98,6 +98,7 @@ const onSubmit = async () => {
|
||||||
title: "提交成功",
|
title: "提交成功",
|
||||||
icon: "none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
|
form.images = []
|
||||||
formRef.value.resetFields()
|
formRef.value.resetFields()
|
||||||
uni.$emit("task:submit")
|
uni.$emit("task:submit")
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,8 @@
|
||||||
<uv-modal
|
<uv-modal
|
||||||
ref="modalRef"
|
ref="modalRef"
|
||||||
title="提示"
|
title="提示"
|
||||||
:content="`是否确认提交?`"
|
:content="`确认提交?`"
|
||||||
|
:showCancelButton="true"
|
||||||
@confirm="onSubmit"
|
@confirm="onSubmit"
|
||||||
></uv-modal>
|
></uv-modal>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -36,32 +36,31 @@
|
||||||
label="报销原因"
|
label="报销原因"
|
||||||
required
|
required
|
||||||
prop="reason"
|
prop="reason"
|
||||||
:borderBottom="true"
|
|
||||||
labelPosition="top"
|
labelPosition="top"
|
||||||
>
|
>
|
||||||
<uv-textarea
|
<uv-textarea
|
||||||
:border="`none`"
|
:border="`none`"
|
||||||
v-model="form.reason"
|
v-model="form.reason"
|
||||||
placeholder="请输入报销原因"
|
placeholder="请输入报销原因"
|
||||||
|
:customStyle="{ padding: '0' }"
|
||||||
></uv-textarea>
|
></uv-textarea>
|
||||||
</uv-form-item>
|
</uv-form-item>
|
||||||
<uv-form-item
|
<uv-line color="#f5f5f5"></uv-line>
|
||||||
label="报销凭证"
|
<uv-form-item label="报销凭证" prop="photos" required>
|
||||||
labelPosition="top"
|
<view class="text-right w-full text-hex-999"
|
||||||
prop="photos"
|
>{{ form.photos.length }}/9</view
|
||||||
required
|
>
|
||||||
>
|
|
||||||
<view class="w-full mt-15rpx">
|
|
||||||
<uv-upload
|
|
||||||
:maxCount="9"
|
|
||||||
multiple
|
|
||||||
:fileList="form.photos"
|
|
||||||
@afterRead="afterRead"
|
|
||||||
@delete="deletePic"
|
|
||||||
name="photos"
|
|
||||||
></uv-upload>
|
|
||||||
</view>
|
|
||||||
</uv-form-item>
|
</uv-form-item>
|
||||||
|
<view class="w-full">
|
||||||
|
<uv-upload
|
||||||
|
:maxCount="9"
|
||||||
|
multiple
|
||||||
|
:fileList="form.photos"
|
||||||
|
@afterRead="afterRead"
|
||||||
|
@delete="deletePic"
|
||||||
|
name="photos"
|
||||||
|
></uv-upload>
|
||||||
|
</view>
|
||||||
</uv-form>
|
</uv-form>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -110,7 +109,21 @@ const rules = reactive({
|
||||||
message: '请选择报销分类',
|
message: '请选择报销分类',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
expense: [{ required: true, message: '请输入报销金额' }],
|
expense: [
|
||||||
|
{ required: true, message: '请输入报销金额' },
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
type: 'number',
|
||||||
|
min: 0.01,
|
||||||
|
max: 22,
|
||||||
|
message: '报销金额不能小于0.01',
|
||||||
|
},{
|
||||||
|
validator: (rule, value) => {
|
||||||
|
return value > 0
|
||||||
|
},
|
||||||
|
message: '报销金额不能小于0',
|
||||||
|
}
|
||||||
|
],
|
||||||
reason: [{ required: true, message: '请输入报销原因' }],
|
reason: [{ required: true, message: '请输入报销原因' }],
|
||||||
photos: {
|
photos: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ const props = defineProps({
|
||||||
data: Array,
|
data: Array,
|
||||||
})
|
})
|
||||||
|
|
||||||
const opts = ref({
|
const opts = {
|
||||||
color: ['#ee2c37'],
|
color: ['#ee2c37'],
|
||||||
dataLabel: false,
|
dataLabel: false,
|
||||||
dataPointShape: true,
|
dataPointShape: true,
|
||||||
|
|
@ -20,10 +20,7 @@ const opts = ref({
|
||||||
},
|
},
|
||||||
|
|
||||||
xAxis: {
|
xAxis: {
|
||||||
// disableGrid: true,
|
|
||||||
|
|
||||||
boundaryGap: 'justify',
|
boundaryGap: 'justify',
|
||||||
|
|
||||||
format: 'ssss',
|
format: 'ssss',
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
|
|
@ -43,22 +40,39 @@ const opts = ref({
|
||||||
legendShow: false,
|
legendShow: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
|
|
||||||
const chartData = reactive({
|
const chartData = reactive({})
|
||||||
categories: [],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '金额',
|
|
||||||
data: [],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
watch(
|
watch(
|
||||||
() => props.data,
|
() => props.data,
|
||||||
(e) => {
|
(e) => {
|
||||||
chartData.categories = e.map((el) => el.key)
|
const obj = {
|
||||||
chartData.series[0].data = e.map((el) => el.value)
|
categories: e.map((el) => el.key),
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '金额',
|
||||||
|
data: e.map((el) => el.value),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
Object.assign(chartData, JSON.parse(JSON.stringify(obj)))
|
||||||
|
|
||||||
|
|
||||||
|
// chartData = {
|
||||||
|
// categories: e.map((el) => el.key),
|
||||||
|
// series: [
|
||||||
|
// {
|
||||||
|
// name: '金额',
|
||||||
|
// data: e.map((el) => el.value),
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// }
|
||||||
|
console.log(e)
|
||||||
|
// chartData.categories= ['03月29日', '03月30日', '03月31日', '04月01日', '04月02日', '04月03日', '04月04日', '04月05日', '04月06日', '04月07日', '04月08日', '04月09日', '04月10日', '04月11日', '04月12日', '04月13日', '04月14日', '04月15日', '04月16日', '04月17日', '04月18日', '04月19日', '04月20日', '04月21日', '04月22日', '04月23日', '04月24日', '04月25日', '04月26日', '04月27日']
|
||||||
|
// chartData.categories = e.map((el) => el.key)
|
||||||
|
// console.log(e.map((el) => el.value));
|
||||||
|
// chartData.series[0].data = e.map((el) => el.value)
|
||||||
|
// chartData.series[0].data = ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '2', '0', '0', '0', '0', '0', '0', '0', '1', '11', '112', '1', '0', '100', '20040']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,194 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="flex-center h-44px text-white">
|
||||||
|
<view class="flex-center flex-1" @click="openRegions">
|
||||||
|
<view class="max-w-190rpx line-clamp-1">{{ regionseText }}</view>
|
||||||
|
<uv-icon
|
||||||
|
color="white"
|
||||||
|
class="ml-10rpx"
|
||||||
|
size="20rpx"
|
||||||
|
name="arrow-down-fill"
|
||||||
|
></uv-icon>
|
||||||
|
</view>
|
||||||
|
<view class="flex-center flex-1" @click="openStore">
|
||||||
|
<view>{{ storeText }}</view>
|
||||||
|
<uv-icon
|
||||||
|
color="white"
|
||||||
|
class="ml-10rpx"
|
||||||
|
size="20rpx"
|
||||||
|
name="arrow-down-fill"
|
||||||
|
></uv-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uv-picker
|
||||||
|
ref="regionsRef"
|
||||||
|
:columns="addressList"
|
||||||
|
@change="regionsChange"
|
||||||
|
keyName="name"
|
||||||
|
@confirm="regionsConfirm"
|
||||||
|
>
|
||||||
|
</uv-picker>
|
||||||
|
|
||||||
|
<uv-picker
|
||||||
|
ref="storeRef"
|
||||||
|
:columns="storeList"
|
||||||
|
keyName="title"
|
||||||
|
@confirm="storeConfirm"
|
||||||
|
>
|
||||||
|
</uv-picker>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { http } from '@/utils/request'
|
||||||
|
import { onMounted, ref, reactive, computed, toRaw } from 'vue'
|
||||||
|
import debounce from '@climblee/uv-ui/libs/function/debounce'
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getData()
|
||||||
|
getStoreData()
|
||||||
|
})
|
||||||
|
|
||||||
|
const regionsRef = ref(null)
|
||||||
|
const storeRef = ref(null)
|
||||||
|
// 筛选结果
|
||||||
|
const result = ref([])
|
||||||
|
// 地区数据
|
||||||
|
const regions = ref([])
|
||||||
|
const provinces = ref([])
|
||||||
|
const citys = ref([])
|
||||||
|
const areas = ref([])
|
||||||
|
const store = ref([])
|
||||||
|
const addressList = computed(() => {
|
||||||
|
return [provinces.value, citys.value]
|
||||||
|
})
|
||||||
|
const storeList = computed(() => {
|
||||||
|
return [store.value]
|
||||||
|
})
|
||||||
|
const emit = defineEmits(['change'])
|
||||||
|
|
||||||
|
const regionseText = computed(() => {
|
||||||
|
if (result.value.length == 0) {
|
||||||
|
return '全部区域'
|
||||||
|
} else {
|
||||||
|
const province = result.value.find((item) => item.name == 'province_code')
|
||||||
|
const city = result.value.find((item) => item.name == 'city_code')
|
||||||
|
let text = province?.label
|
||||||
|
if (city?.value) text += `/${city?.label}`
|
||||||
|
return text
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const storeText = computed(() => {
|
||||||
|
if (result.value.length == 0) {
|
||||||
|
return '全部门店'
|
||||||
|
} else {
|
||||||
|
const store = result.value.find((item) => item.name == 'store_id')
|
||||||
|
return store?.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const selectMenu = (e) => {
|
||||||
|
e.forEach((item) => {
|
||||||
|
const findIndex = result.value.findIndex((el) => el.name == item.name)
|
||||||
|
if (findIndex >= 0) {
|
||||||
|
result.value[findIndex] = item
|
||||||
|
} else {
|
||||||
|
result.value.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
debounce(
|
||||||
|
() => {
|
||||||
|
emit('change', toRaw(result.value))
|
||||||
|
},
|
||||||
|
200,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
http.get('/region').then((res) => {
|
||||||
|
regions.value = res
|
||||||
|
provinces.value = [{ name: '全部区域', code: null }].concat(res.province)
|
||||||
|
citys.value = getCityByCode()
|
||||||
|
regionsConfirm({
|
||||||
|
value: [provinces.value[0], citys.value[0]],
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const regionsConfirm = (e) => {
|
||||||
|
const { value } = e
|
||||||
|
const parmas = [
|
||||||
|
{
|
||||||
|
name: 'province_code',
|
||||||
|
value: value[0].code,
|
||||||
|
label: value[0].name,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'city_code',
|
||||||
|
value: value[1].code,
|
||||||
|
label: value[1].name,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
selectMenu(parmas)
|
||||||
|
getStoreData()
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStoreData = () => {
|
||||||
|
storeRef.value?.setIndexs([0], true)
|
||||||
|
const params = {
|
||||||
|
province_code: result.value.find((item) => item.name == 'province_code')
|
||||||
|
?.value,
|
||||||
|
city_code: result.value.find((item) => item.name == 'city_code')?.value,
|
||||||
|
}
|
||||||
|
http
|
||||||
|
.get('/auth/stores', {
|
||||||
|
// params: params,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
store.value = [{ title: '全部门店', id: 'all' }].concat(res)
|
||||||
|
storeConfirm({ value: [store.value[0]] })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const openRegions = () => {
|
||||||
|
regionsRef.value?.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
const openStore = () => {
|
||||||
|
storeRef.value?.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
const regionsChange = (e) => {
|
||||||
|
const { columnIndex, index, indexs } = e
|
||||||
|
if (columnIndex === 0) {
|
||||||
|
const { code } = provinces.value[index]
|
||||||
|
citys.value = getCityByCode(code)
|
||||||
|
regionsRef.value?.setIndexs([index, 0], true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getCityByCode = (code) => {
|
||||||
|
const _citys = regions.value.city
|
||||||
|
const _city = _citys[code]
|
||||||
|
let arr = [{ name: '全部市', code: null }]
|
||||||
|
if (_city == null) {
|
||||||
|
arr = arr.concat(Object.values(_citys).flat())
|
||||||
|
} else {
|
||||||
|
arr = arr.concat(_city)
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
|
const storeConfirm = (e) => {
|
||||||
|
const parmas = [
|
||||||
|
{
|
||||||
|
name: 'store_id',
|
||||||
|
value: e.value[0].id,
|
||||||
|
label: e.value[0].title,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
selectMenu(parmas)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<uv-sticky bgColor="#fff">
|
<view class="flex-center h-44px text-white">
|
||||||
<view class="flex-center h-44px">
|
<view class="flex-center flex-1" @click="openCity">
|
||||||
<view class="flex-center flex-1" @click="openCity">
|
<view>{{ selected.area_text }}</view>
|
||||||
<view>{{ selected.area_text }}</view>
|
<uv-icon
|
||||||
<uv-icon
|
color="white"
|
||||||
class="ml-10rpx"
|
class="ml-10rpx"
|
||||||
size="20rpx"
|
size="20rpx"
|
||||||
name="arrow-down-fill"
|
name="arrow-down-fill"
|
||||||
></uv-icon>
|
></uv-icon>
|
||||||
</view>
|
|
||||||
<view class="flex-center flex-1" @click="openStore">
|
|
||||||
<view>{{ selected.store_text }}</view>
|
|
||||||
<uv-icon
|
|
||||||
class="ml-10rpx"
|
|
||||||
size="20rpx"
|
|
||||||
name="arrow-down-fill"
|
|
||||||
></uv-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</uv-sticky>
|
<view class="flex-center flex-1" @click="openStore">
|
||||||
|
<view>{{ selected.store_text }}</view>
|
||||||
|
<uv-icon
|
||||||
|
color="white"
|
||||||
|
class="ml-10rpx"
|
||||||
|
size="20rpx"
|
||||||
|
name="arrow-down-fill"
|
||||||
|
></uv-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<uv-picker
|
<uv-picker
|
||||||
ref="cityRef"
|
ref="cityRef"
|
||||||
keyName="name"
|
keyName="name"
|
||||||
|
|
@ -65,18 +65,21 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
this.cityLoading = true
|
this.cityLoading = true
|
||||||
http.get('/region').then(res => {
|
http
|
||||||
this.cityLoading = false
|
.get('/region')
|
||||||
this.cityData = res
|
.then((res) => {
|
||||||
const firstProvince = this.cityData.province[0]
|
this.cityLoading = false
|
||||||
this.cityList = [
|
this.cityData = res
|
||||||
this.cityData.province,
|
const firstProvince = this.cityData.province[0]
|
||||||
this.findCityByProvince(firstProvince.code)
|
this.cityList = [
|
||||||
]
|
this.cityData.province,
|
||||||
this.findStoreList()
|
this.findCityByProvince(firstProvince.code),
|
||||||
}).catch(error => {
|
]
|
||||||
this.cityLoading = false
|
this.findStoreList()
|
||||||
})
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
this.cityLoading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
findStoreList() {
|
findStoreList() {
|
||||||
const params = {}
|
const params = {}
|
||||||
|
|
@ -87,13 +90,16 @@ export default {
|
||||||
params.city_code = this.selected.city.code
|
params.city_code = this.selected.city.code
|
||||||
}
|
}
|
||||||
this.storeLoading = true
|
this.storeLoading = true
|
||||||
http.get('/auth/stores', { params }).then(res => {
|
http
|
||||||
this.storeLoading = false
|
.get('/auth/stores', { params })
|
||||||
res.unshift({title: '全部门店', id: 'all'})
|
.then((res) => {
|
||||||
this.storeList = [res]
|
this.storeLoading = false
|
||||||
}).catch(error => {
|
res.unshift({ title: '全部门店', id: 'all' })
|
||||||
this.storeLoading = false
|
this.storeList = [res]
|
||||||
})
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
this.storeLoading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
loadData() {
|
loadData() {
|
||||||
console.log('加载数据....', this.selected)
|
console.log('加载数据....', this.selected)
|
||||||
|
|
@ -123,10 +129,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cityChange(e) {
|
cityChange(e) {
|
||||||
const { columnIndex , index} = e
|
const { columnIndex, index } = e
|
||||||
if (columnIndex == 0) {
|
if (columnIndex == 0) {
|
||||||
const province = this.cityData.province[index]
|
const province = this.cityData.province[index]
|
||||||
this.$refs.cityRef.setColumnValues(1, this.findCityByProvince(province.code))
|
this.$refs.cityRef.setColumnValues(
|
||||||
|
1,
|
||||||
|
this.findCityByProvince(province.code)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openStore() {
|
openStore() {
|
||||||
|
|
@ -149,10 +158,10 @@ export default {
|
||||||
findCityByProvince(provinceCode) {
|
findCityByProvince(provinceCode) {
|
||||||
const cityList = this.cityData.city[provinceCode]
|
const cityList = this.cityData.city[provinceCode]
|
||||||
if (cityList.length > 1 && cityList[0].code != 'all') {
|
if (cityList.length > 1 && cityList[0].code != 'all') {
|
||||||
cityList.unshift({name: '全部', code: 'all'})
|
cityList.unshift({ name: '全部', code: 'all' })
|
||||||
}
|
}
|
||||||
return cityList
|
return cityList
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,19 @@
|
||||||
<CuNavbar :isBack="false" title="首页">
|
<CuNavbar :isBack="false" title="首页">
|
||||||
<template #center>
|
<template #center>
|
||||||
<view class="w-full">
|
<view class="w-full">
|
||||||
<StoreDropDown></StoreDropDown>
|
<StoreDown></StoreDown>
|
||||||
|
<!-- <StoreDropDown></StoreDropDown> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</CuNavbar>
|
</CuNavbar>
|
||||||
<view class="bg-primary p-base text-center text-white relative">
|
<view class="bg-primary p-base text-center text-white relative">
|
||||||
<view class="absolute top-20rpx right-20rpx">
|
<view class="absolute top-20rpx right-20rpx">
|
||||||
<uv-icon @click="goPath('/pages/message/index')" color="#fff" size="48rpx" name="chat"></uv-icon>
|
<uv-icon
|
||||||
|
@click="goPath('/pages/message/index')"
|
||||||
|
color="#fff"
|
||||||
|
size="48rpx"
|
||||||
|
name="chat"
|
||||||
|
></uv-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-60rpx">昨日累计金额</view>
|
<view class="mt-60rpx">昨日累计金额</view>
|
||||||
<view class="mt-20rpx">截止{{ yesterday }}</view>
|
<view class="mt-20rpx">截止{{ yesterday }}</view>
|
||||||
|
|
@ -40,7 +46,8 @@
|
||||||
:scrollable="false"
|
:scrollable="false"
|
||||||
></uv-tabs>
|
></uv-tabs>
|
||||||
|
|
||||||
<ChartComp :data="countData"></ChartComp>
|
<!-- <ChartComp :data="countData"></ChartComp> -->
|
||||||
|
<qiun-data-charts type="area" :opts="opts" :chartData="chartData" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -52,6 +59,39 @@ import StoreDropDown from '@/pages/home/components/store-drop-down/index.vue'
|
||||||
import { http } from '@/utils/request'
|
import { http } from '@/utils/request'
|
||||||
import { onShow } from '@dcloudio/uni-app'
|
import { onShow } from '@dcloudio/uni-app'
|
||||||
import { timeFormat } from '@climblee/uv-ui/libs/function'
|
import { timeFormat } from '@climblee/uv-ui/libs/function'
|
||||||
|
import StoreDown from './components/store-down.vue'
|
||||||
|
const opts = {
|
||||||
|
color: ['#ee2c37'],
|
||||||
|
dataLabel: false,
|
||||||
|
dataPointShape: true,
|
||||||
|
enableScroll: false,
|
||||||
|
legend: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
xAxis: {
|
||||||
|
boundaryGap: 'justify',
|
||||||
|
format: 'ssss',
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
gridType: 'dash',
|
||||||
|
dashLength: 2,
|
||||||
|
},
|
||||||
|
extra: {
|
||||||
|
area: {
|
||||||
|
type: 'curve',
|
||||||
|
opacity: 0.2,
|
||||||
|
addLine: true,
|
||||||
|
width: 2,
|
||||||
|
gradient: true,
|
||||||
|
activeType: 'hollow',
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
legendShow: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
const list = ref([
|
const list = ref([
|
||||||
{
|
{
|
||||||
name: '销售金额',
|
name: '销售金额',
|
||||||
|
|
@ -69,6 +109,7 @@ const detail = ref({
|
||||||
expenditure: 0,
|
expenditure: 0,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
const chartData = ref({})
|
||||||
const yesday_ledger = computed(() => detail.value.yesday_ledger)
|
const yesday_ledger = computed(() => detail.value.yesday_ledger)
|
||||||
const trends_of_30days = computed(() => detail.value.trends_of_30days)
|
const trends_of_30days = computed(() => detail.value.trends_of_30days)
|
||||||
|
|
||||||
|
|
@ -76,7 +117,15 @@ const yesterday = computed(() => {
|
||||||
return timeFormat(Number(new Date()) - 1000 * 60 * 60 * 24)
|
return timeFormat(Number(new Date()) - 1000 * 60 * 60 * 24)
|
||||||
})
|
})
|
||||||
const tabObj = computed(() => list.value[tabIndex.value])
|
const tabObj = computed(() => list.value[tabIndex.value])
|
||||||
const countData = computed(() => {
|
|
||||||
|
|
||||||
|
const onTabClick = (e) => {
|
||||||
|
tabIndex.value = e.index
|
||||||
|
updateData()
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateData = () => {
|
||||||
|
|
||||||
const arr =
|
const arr =
|
||||||
trends_of_30days?.value?.reduce((p, c) => {
|
trends_of_30days?.value?.reduce((p, c) => {
|
||||||
p.push({
|
p.push({
|
||||||
|
|
@ -85,12 +134,16 @@ const countData = computed(() => {
|
||||||
})
|
})
|
||||||
return p
|
return p
|
||||||
}, []) ?? []
|
}, []) ?? []
|
||||||
return JSON.parse(JSON.stringify(arr))
|
chartData.value = {
|
||||||
})
|
categories: arr.map((el) => el.key),
|
||||||
|
series: [
|
||||||
const onTabClick = (e) => {
|
{
|
||||||
console.log(e)
|
name: '金额',
|
||||||
tabIndex.value = e.index
|
data: arr.map((el) => el.value),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
// countData.value = arr
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
|
@ -106,6 +159,7 @@ const getData = () => {
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
detail.value = res
|
detail.value = res
|
||||||
|
updateData()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,13 +65,13 @@
|
||||||
<uv-line color="#f5f5f5"></uv-line>
|
<uv-line color="#f5f5f5"></uv-line>
|
||||||
<uv-form-item
|
<uv-form-item
|
||||||
:required="isEdit"
|
:required="isEdit"
|
||||||
|
@click="openDatePicker"
|
||||||
label="首次参加工作时间"
|
label="首次参加工作时间"
|
||||||
prop="first_work_time"
|
prop="first_work_time"
|
||||||
>
|
>
|
||||||
<uv-input
|
<uv-input
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
:required="isEdit"
|
:required="isEdit"
|
||||||
@click="openDatePicker"
|
|
||||||
inputAlign="right"
|
inputAlign="right"
|
||||||
:border="`none`"
|
:border="`none`"
|
||||||
v-model="form.first_work_time"
|
v-model="form.first_work_time"
|
||||||
|
|
@ -111,6 +111,7 @@
|
||||||
>
|
>
|
||||||
<uv-textarea
|
<uv-textarea
|
||||||
v-model="form.comment_self"
|
v-model="form.comment_self"
|
||||||
|
:customStyle="{ padding: '0' }"
|
||||||
count
|
count
|
||||||
placeholder="请输入员工自评"
|
placeholder="请输入员工自评"
|
||||||
:border="`none`"
|
:border="`none`"
|
||||||
|
|
@ -125,6 +126,7 @@
|
||||||
labelPosition="top"
|
labelPosition="top"
|
||||||
>
|
>
|
||||||
<uv-textarea
|
<uv-textarea
|
||||||
|
:customStyle="{ padding: '0' }"
|
||||||
v-model="form.plans"
|
v-model="form.plans"
|
||||||
count
|
count
|
||||||
placeholder="请输入未来计划"
|
placeholder="请输入未来计划"
|
||||||
|
|
@ -141,6 +143,7 @@
|
||||||
labelPosition="top"
|
labelPosition="top"
|
||||||
>
|
>
|
||||||
<uv-textarea
|
<uv-textarea
|
||||||
|
:customStyle="{ padding: '0' }"
|
||||||
v-model="form.reason"
|
v-model="form.reason"
|
||||||
count
|
count
|
||||||
placeholder="请输入推荐理由"
|
placeholder="请输入推荐理由"
|
||||||
|
|
@ -165,7 +168,6 @@
|
||||||
@confirm="confirmPicker"
|
@confirm="confirmPicker"
|
||||||
></uv-picker>
|
></uv-picker>
|
||||||
<uv-datetime-picker
|
<uv-datetime-picker
|
||||||
:minDate="50"
|
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
ref="datetimePicker"
|
ref="datetimePicker"
|
||||||
mode="year-month"
|
mode="year-month"
|
||||||
|
|
@ -245,7 +247,7 @@ const rules = reactive({
|
||||||
sex: [{ required: true, message: '请选择性别' }],
|
sex: [{ required: true, message: '请选择性别' }],
|
||||||
education: [{ required: true, message: '请输入学历' }],
|
education: [{ required: true, message: '请输入学历' }],
|
||||||
first_work_time: [{ required: true, message: '请输入首次参加工作时间' }],
|
first_work_time: [{ required: true, message: '请输入首次参加工作时间' }],
|
||||||
work_years: [{ required: true, message: '请输入清洁范围' }],
|
work_years: [{ required: true, message: '请输入工作年限' }],
|
||||||
work_years_in_company: [{ required: true, message: '请输入本公司工作年限' }],
|
work_years_in_company: [{ required: true, message: '请输入本公司工作年限' }],
|
||||||
comment_self: [{ required: true, message: '请输入员工自评' }],
|
comment_self: [{ required: true, message: '请输入员工自评' }],
|
||||||
plans: [{ required: true, message: '请输入未来计划' }],
|
plans: [{ required: true, message: '请输入未来计划' }],
|
||||||
|
|
@ -269,7 +271,7 @@ const onSubmit = async () => {
|
||||||
const params = {
|
const params = {
|
||||||
...form,
|
...form,
|
||||||
}
|
}
|
||||||
|
|
||||||
const resData = await http.request({
|
const resData = await http.request({
|
||||||
url: `/hr/promotion/${props.id}`,
|
url: `/hr/promotion/${props.id}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
@ -302,7 +304,7 @@ const open = () => {
|
||||||
|
|
||||||
const select = (e) => {
|
const select = (e) => {
|
||||||
const { value } = e
|
const { value } = e
|
||||||
if(value === 'submit') {
|
if (value === 'submit') {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/work/create?id=${props.id}`,
|
url: `/pages/work/create?id=${props.id}`,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1714249022351" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="27566" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M878.933333 441.787733a25.3952 25.3952 0 0 1-15.9744-5.597866l-323.413333-258.730667a30.208 30.208 0 0 0-37.9904 0l-323.413333 258.730667a25.6 25.6 0 1 1-31.982934-39.970134l323.3792-258.730666a81.169067 81.169067 0 0 1 101.9904 0l323.413334 258.730666a25.6 25.6 0 0 1-16.042667 45.568z m-133.393066 452.266667H614.4a25.6 25.6 0 0 1-25.6-25.6v-176.366933a2.833067 2.833067 0 0 0-2.798933-2.833067h-130.901334a2.833067 2.833067 0 0 0-2.833066 2.833067v176.366933a25.6 25.6 0 0 1-25.6 25.6H293.956267a80.6912 80.6912 0 0 1-80.622934-80.5888v-320.477867a25.6 25.6 0 1 1 51.2 0v320.477867c0 16.213333 13.2096 29.3888 29.422934 29.3888h107.1104v-150.766933c0-29.7984 24.234667-54.033067 54.033066-54.033067h130.901334c29.764267 0 53.998933 24.234667 53.998933 54.033067v150.766933h105.540267a31.061333 31.061333 0 0 0 30.993066-30.993067v-318.8736a25.6 25.6 0 1 1 51.2 0v318.8736a82.295467 82.295467 0 0 1-82.193066 82.193067z" fill="#8a8a8a" p-id="27567"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |