语法错误
parent
27e7f93ae1
commit
75ba4231cb
|
|
@ -82,7 +82,10 @@
|
||||||
></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 :label="`${store?.is_lottery_store?'兑奖':'支出'}合计`" prop="expenditure">
|
<uv-form-item
|
||||||
|
:label="`${store?.is_lottery_store ? '兑奖' : '支出'}合计`"
|
||||||
|
prop="expenditure"
|
||||||
|
>
|
||||||
<uv-input
|
<uv-input
|
||||||
type="digit"
|
type="digit"
|
||||||
:border="`none`"
|
:border="`none`"
|
||||||
|
|
@ -185,7 +188,15 @@ import { http } from '@/utils/request'
|
||||||
import CuNavbar from '@/components/cu-navbar/index'
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
import TitleComp from '@/components/title-comp/index'
|
import TitleComp from '@/components/title-comp/index'
|
||||||
import { addUnit, sys } from '@climblee/uv-ui/libs/function/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 { useUserStore } from '@/store/modules/user'
|
||||||
import { timeFormat } from '@climblee/uv-ui/libs/function/index'
|
import { timeFormat } from '@climblee/uv-ui/libs/function/index'
|
||||||
import { add } from '@/utils/index'
|
import { add } from '@/utils/index'
|
||||||
|
|
@ -263,7 +274,6 @@ const submit = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
date: form.date,
|
date: form.date,
|
||||||
sales: form.sales,
|
sales: form.sales,
|
||||||
|
|
@ -289,7 +299,6 @@ const onSubmit = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
|
|
||||||
const resData = await http.get(`/ledgers/${form.date}`)
|
const resData = await http.get(`/ledgers/${form.date}`)
|
||||||
|
|
||||||
Object.assign(form, resData, {
|
Object.assign(form, resData, {
|
||||||
|
|
@ -370,7 +379,6 @@ const uploadFilePromise = (url) => {
|
||||||
.upload('/fileupload', {
|
.upload('/fileupload', {
|
||||||
filePath: url,
|
filePath: url,
|
||||||
name: 'file',
|
name: 'file',
|
||||||
|
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
resolve(res.url)
|
resolve(res.url)
|
||||||
|
|
@ -385,19 +393,18 @@ const deletePic = (event) => {
|
||||||
form[event.name].splice(event.index, 1)
|
form[event.name].splice(event.index, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
const salesChange = async() => {
|
const salesChange = async () => {
|
||||||
|
|
||||||
await nextTick()
|
await nextTick()
|
||||||
const val = form?.items || []
|
const val = form?.items || []
|
||||||
const sales = val.reduce((a, b) => {
|
const sales = val.reduce((a, b) => {
|
||||||
return add(a, b?.sales ?? 0)
|
return add(a, b?.sales ?? 0)
|
||||||
}, 0)
|
}, 0)
|
||||||
console.log(sales);
|
console.log(sales)
|
||||||
|
|
||||||
form.sales = sales || null
|
form.sales = sales || null
|
||||||
}
|
}
|
||||||
|
|
||||||
const expenditureChange = () => {
|
const expenditureChange = async () => {
|
||||||
await nextTick()
|
await nextTick()
|
||||||
const val = form?.items || []
|
const val = form?.items || []
|
||||||
const expenditure = val.reduce((a, b) => {
|
const expenditure = val.reduce((a, b) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue