diff --git a/src/manifest.json b/src/manifest.json
index 8845708..bebc660 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -10,17 +10,20 @@
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
- "compatible": {
- "ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
+ "compatible" : {
+ "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
},
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : true,
"autoclose" : false,
"delay" : 0
- },
+ },
/* 模块配置 */
- "modules" : {},
+ "modules" : {
+ "VideoPlayer" : {},
+ "Camera" : {}
+ },
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
diff --git a/src/pages.json b/src/pages.json
index 99f62ed..b025a73 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -391,31 +391,31 @@
"tabBar": {
"color": "#333",
"selectedColor": "#ff3c2a",
- "borderStyle": "black",
+ "borderStyle": "#fff",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/home/index",
- "selectedIconPath": "static/images/home.png",
+ "selectedIconPath": "static/images/home-a.png",
"iconPath": "static/images/home.png",
"text": "首页"
},
{
"pagePath": "pages/revert/index",
- "selectedIconPath": "static/images/home.png",
- "iconPath": "static/images/home.png",
+ "selectedIconPath": "static/images/update-a.png",
+ "iconPath": "static/images/update.png",
"text": "上报"
},
{
"pagePath": "pages/statement/index",
- "selectedIconPath": "static/images/home.png",
- "iconPath": "static/images/home.png",
+ "selectedIconPath": "static/images/table-a.png",
+ "iconPath": "static/images/table.png",
"text": "报表"
},
{
"pagePath": "pages/mine/index",
- "selectedIconPath": "static/images/home.png",
- "iconPath": "static/images/home.png",
+ "selectedIconPath": "static/images/mine-a.png",
+ "iconPath": "static/images/mine.png",
"text": "我的"
}
]
diff --git a/src/pages/audits/detail.vue b/src/pages/audits/detail.vue
index f919c10..85cc0a9 100644
--- a/src/pages/audits/detail.vue
+++ b/src/pages/audits/detail.vue
@@ -37,7 +37,7 @@
>
-
+
diff --git a/src/pages/contract/create.vue b/src/pages/contract/create.vue
index d1b131c..f4c2b58 100644
--- a/src/pages/contract/create.vue
+++ b/src/pages/contract/create.vue
@@ -42,11 +42,11 @@ const form = reactive({
images: []
})
const rules = reactive({
- name: [{ required: true, message: "请输入清洁范围" }],
+ name: [{ required: true, message: "请输入合同名称" }],
images: {
type: "array",
required: true,
- message: "请上传报销凭证"
+ message: "请上传合同照片",
}
})
onLoad(options => {
@@ -98,6 +98,7 @@ const onSubmit = async () => {
title: "提交成功",
icon: "none"
})
+ form.images = []
formRef.value.resetFields()
uni.$emit("task:submit")
uni.navigateBack()
diff --git a/src/pages/examination/detail.vue b/src/pages/examination/detail.vue
index a2e91af..a42a4e3 100644
--- a/src/pages/examination/detail.vue
+++ b/src/pages/examination/detail.vue
@@ -75,7 +75,8 @@
diff --git a/src/pages/expense-account/submit.vue b/src/pages/expense-account/submit.vue
index 6013d65..86c4a1d 100644
--- a/src/pages/expense-account/submit.vue
+++ b/src/pages/expense-account/submit.vue
@@ -36,32 +36,31 @@
label="报销原因"
required
prop="reason"
- :borderBottom="true"
labelPosition="top"
>
-
-
-
-
+
+
+ {{ form.photos.length }}/9
+
+
+
@@ -110,7 +109,21 @@ const rules = reactive({
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: '请输入报销原因' }],
photos: {
type: 'array',
diff --git a/src/pages/home/components/chart.vue b/src/pages/home/components/chart.vue
index 67bc7c0..74b4fbc 100644
--- a/src/pages/home/components/chart.vue
+++ b/src/pages/home/components/chart.vue
@@ -10,7 +10,7 @@ const props = defineProps({
data: Array,
})
-const opts = ref({
+const opts = {
color: ['#ee2c37'],
dataLabel: false,
dataPointShape: true,
@@ -20,10 +20,7 @@ const opts = ref({
},
xAxis: {
- // disableGrid: true,
-
boundaryGap: 'justify',
-
format: 'ssss',
},
yAxis: {
@@ -43,22 +40,39 @@ const opts = ref({
legendShow: false,
},
},
-})
+}
-const chartData = reactive({
- categories: [],
- series: [
- {
- name: '金额',
- data: [],
- },
- ],
-})
+const chartData = reactive({})
watch(
() => props.data,
(e) => {
- chartData.categories = e.map((el) => el.key)
- chartData.series[0].data = e.map((el) => el.value)
+ const obj = {
+ 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,
diff --git a/src/pages/home/components/store-down.vue b/src/pages/home/components/store-down.vue
new file mode 100644
index 0000000..9a49125
--- /dev/null
+++ b/src/pages/home/components/store-down.vue
@@ -0,0 +1,194 @@
+
+
+
+
+ {{ regionseText }}
+
+
+
+ {{ storeText }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/home/components/store-drop-down/index.vue b/src/pages/home/components/store-drop-down/index.vue
index 706b61c..8b452fa 100644
--- a/src/pages/home/components/store-drop-down/index.vue
+++ b/src/pages/home/components/store-drop-down/index.vue
@@ -1,25 +1,25 @@
-
-
-
- {{ selected.area_text }}
-
-
-
- {{ selected.store_text }}
-
-
+
+
+ {{ selected.area_text }}
+
-
+
+ {{ selected.store_text }}
+
+
+
{
- this.cityLoading = false
- this.cityData = res
- const firstProvince = this.cityData.province[0]
- this.cityList = [
- this.cityData.province,
- this.findCityByProvince(firstProvince.code)
- ]
- this.findStoreList()
- }).catch(error => {
- this.cityLoading = false
- })
+ http
+ .get('/region')
+ .then((res) => {
+ this.cityLoading = false
+ this.cityData = res
+ const firstProvince = this.cityData.province[0]
+ this.cityList = [
+ this.cityData.province,
+ this.findCityByProvince(firstProvince.code),
+ ]
+ this.findStoreList()
+ })
+ .catch((error) => {
+ this.cityLoading = false
+ })
},
findStoreList() {
const params = {}
@@ -87,13 +90,16 @@ export default {
params.city_code = this.selected.city.code
}
this.storeLoading = true
- http.get('/auth/stores', { params }).then(res => {
- this.storeLoading = false
- res.unshift({title: '全部门店', id: 'all'})
- this.storeList = [res]
- }).catch(error => {
- this.storeLoading = false
- })
+ http
+ .get('/auth/stores', { params })
+ .then((res) => {
+ this.storeLoading = false
+ res.unshift({ title: '全部门店', id: 'all' })
+ this.storeList = [res]
+ })
+ .catch((error) => {
+ this.storeLoading = false
+ })
},
loadData() {
console.log('加载数据....', this.selected)
@@ -123,10 +129,13 @@ export default {
}
},
cityChange(e) {
- const { columnIndex , index} = e
+ const { columnIndex, index } = e
if (columnIndex == 0) {
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() {
@@ -149,10 +158,10 @@ export default {
findCityByProvince(provinceCode) {
const cityList = this.cityData.city[provinceCode]
if (cityList.length > 1 && cityList[0].code != 'all') {
- cityList.unshift({name: '全部', code: 'all'})
+ cityList.unshift({ name: '全部', code: 'all' })
}
return cityList
- }
- }
+ },
+ },
}
diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue
index 18bbed7..e5680ac 100644
--- a/src/pages/home/index.vue
+++ b/src/pages/home/index.vue
@@ -3,13 +3,19 @@
-
+
+
-
+
昨日累计金额
截止{{ yesterday }}
@@ -40,7 +46,8 @@
:scrollable="false"
>
-
+
+
@@ -52,6 +59,39 @@ import StoreDropDown from '@/pages/home/components/store-drop-down/index.vue'
import { http } from '@/utils/request'
import { onShow } from '@dcloudio/uni-app'
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([
{
name: '销售金额',
@@ -69,6 +109,7 @@ const detail = ref({
expenditure: 0,
},
})
+const chartData = ref({})
const yesday_ledger = computed(() => detail.value.yesday_ledger)
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)
})
const tabObj = computed(() => list.value[tabIndex.value])
-const countData = computed(() => {
+
+
+const onTabClick = (e) => {
+ tabIndex.value = e.index
+ updateData()
+}
+
+const updateData = () => {
+
const arr =
trends_of_30days?.value?.reduce((p, c) => {
p.push({
@@ -85,12 +134,16 @@ const countData = computed(() => {
})
return p
}, []) ?? []
- return JSON.parse(JSON.stringify(arr))
-})
-
-const onTabClick = (e) => {
- console.log(e)
- tabIndex.value = e.index
+ chartData.value = {
+ categories: arr.map((el) => el.key),
+ series: [
+ {
+ name: '金额',
+ data: arr.map((el) => el.value),
+ },
+ ],
+ }
+ // countData.value = arr
}
onShow(() => {
@@ -106,6 +159,7 @@ const getData = () => {
})
.then((res) => {
detail.value = res
+ updateData()
})
}
diff --git a/src/pages/work/commone.vue b/src/pages/work/commone.vue
index d5082ab..bf0f012 100644
--- a/src/pages/work/commone.vue
+++ b/src/pages/work/commone.vue
@@ -65,13 +65,13 @@
{
const params = {
...form,
}
-
+
const resData = await http.request({
url: `/hr/promotion/${props.id}`,
method: 'POST',
@@ -302,7 +304,7 @@ const open = () => {
const select = (e) => {
const { value } = e
- if(value === 'submit') {
+ if (value === 'submit') {
uni.navigateTo({
url: `/pages/work/create?id=${props.id}`,
})
diff --git a/src/static/images/home-a.png b/src/static/images/home-a.png
new file mode 100644
index 0000000..e2d8402
Binary files /dev/null and b/src/static/images/home-a.png differ
diff --git a/src/static/images/home.png b/src/static/images/home.png
index b6e9c92..4499bbc 100644
Binary files a/src/static/images/home.png and b/src/static/images/home.png differ
diff --git a/src/static/images/mine-a.png b/src/static/images/mine-a.png
new file mode 100644
index 0000000..810805f
Binary files /dev/null and b/src/static/images/mine-a.png differ
diff --git a/src/static/images/mine.png b/src/static/images/mine.png
new file mode 100644
index 0000000..3087514
Binary files /dev/null and b/src/static/images/mine.png differ
diff --git a/src/static/images/table-a.png b/src/static/images/table-a.png
new file mode 100644
index 0000000..97c16ae
Binary files /dev/null and b/src/static/images/table-a.png differ
diff --git a/src/static/images/table.png b/src/static/images/table.png
new file mode 100644
index 0000000..39ee850
Binary files /dev/null and b/src/static/images/table.png differ
diff --git a/src/static/images/update-a.png b/src/static/images/update-a.png
new file mode 100644
index 0000000..2265c1d
Binary files /dev/null and b/src/static/images/update-a.png differ
diff --git a/src/static/images/update.png b/src/static/images/update.png
new file mode 100644
index 0000000..c7002bb
Binary files /dev/null and b/src/static/images/update.png differ
diff --git a/src/static/images/首页.svg b/src/static/images/首页.svg
new file mode 100644
index 0000000..7ed55ec
--- /dev/null
+++ b/src/static/images/首页.svg
@@ -0,0 +1 @@
+
\ No newline at end of file