语法错误

main
ihzero 2024-04-29 04:25:32 +08:00
parent 27e7f93ae1
commit 75ba4231cb
1 changed files with 18 additions and 11 deletions

View File

@ -1,7 +1,7 @@
<template>
<view>
<CuNavbar :isBack="false" title="数据上报"></CuNavbar>
<view
:class="[
checkPermission(['store']) && form.allow_rereport
@ -82,7 +82,10 @@
></uv-input>
</uv-form-item>
<uv-line color="#f5f5f5"></uv-line>
<uv-form-item :label="`${store?.is_lottery_store?'兑奖':'支出'}合计`" prop="expenditure">
<uv-form-item
:label="`${store?.is_lottery_store ? '兑奖' : '支出'}合计`"
prop="expenditure"
>
<uv-input
type="digit"
:border="`none`"
@ -185,7 +188,15 @@ import { http } from '@/utils/request'
import CuNavbar from '@/components/cu-navbar/index'
import TitleComp from '@/components/title-comp/index'
import { addUnit, sys } from '@climblee/uv-ui/libs/function/index'
import { computed, ref, onBeforeMount, reactive, onMounted, watch,nextTick } from 'vue'
import {
computed,
ref,
onBeforeMount,
reactive,
onMounted,
watch,
nextTick,
} from 'vue'
import { useUserStore } from '@/store/modules/user'
import { timeFormat } from '@climblee/uv-ui/libs/function/index'
import { add } from '@/utils/index'
@ -263,7 +274,6 @@ const submit = () => {
}
const onSubmit = async () => {
const params = {
date: form.date,
sales: form.sales,
@ -289,7 +299,6 @@ const onSubmit = async () => {
}
const getData = async () => {
const resData = await http.get(`/ledgers/${form.date}`)
Object.assign(form, resData, {
@ -370,7 +379,6 @@ const uploadFilePromise = (url) => {
.upload('/fileupload', {
filePath: url,
name: 'file',
})
.then((res) => {
resolve(res.url)
@ -385,19 +393,18 @@ const deletePic = (event) => {
form[event.name].splice(event.index, 1)
}
const salesChange = async() => {
const salesChange = async () => {
await nextTick()
const val = form?.items || []
const sales = val.reduce((a, b) => {
return add(a, b?.sales ?? 0)
}, 0)
console.log(sales);
console.log(sales)
form.sales = sales || null
}
const expenditureChange = () => {
const expenditureChange = async () => {
await nextTick()
const val = form?.items || []
const expenditure = val.reduce((a, b) => {