fix: 新功能增加,原有bug修复。
This commit is contained in:
@@ -114,7 +114,7 @@ const data = reactive({
|
||||
rules: {
|
||||
typeName: [{ required: true, message: '记账类型不能为空', trigger:['change', 'blur'] }],
|
||||
accountName: [{ required: true, message: '记账账户不能为空', trigger: ['change', 'blur'] }],
|
||||
amount: [{type: 'string', required: true, message: '交易金额不能为空', trigger: ['change', 'blur'] }],
|
||||
amount: [{type: 'float', required: true, message: '交易金额不能为空', trigger: ['change', 'blur'] }],
|
||||
dealTypeName: [{ required: true, message: '交易类型不能为空', trigger:['change', 'blur'] }],
|
||||
dealCategoryName: [{ required: true, message: '交易类别不能为空', trigger: ['change', 'blur'] }],
|
||||
createTime: [{ required: true, message: '交易时间不能为空', trigger: ['change', 'blur'] }]
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入账户名称" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择记账账户" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
@@ -120,6 +120,8 @@
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountList" keyName="typeNameCodeAvailableLimit" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -128,6 +130,7 @@ import {
|
||||
listAccountDealRecord,
|
||||
delAccountDealRecord,
|
||||
} from '@/api/invest/accountDealRecord'
|
||||
import { listAccounts } from '@/api/invest/accounts'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
@@ -142,11 +145,18 @@ const dealTypeList = ref([])
|
||||
const dealCategoryList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const showAccount = ref(false)
|
||||
const accountList = ref([])
|
||||
const timeShow= ref(false)
|
||||
const flag= ref(true)
|
||||
const time =ref( Number(new Date()))
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
name: null,
|
||||
type: null,
|
||||
@@ -156,7 +166,7 @@ const data = reactive({
|
||||
dealCategory: null
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
@@ -204,6 +214,9 @@ function getList() {
|
||||
timeShow.value = false
|
||||
}
|
||||
function getDict() {
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
// 记账类型类型
|
||||
getDicts('account_type').then(res => {
|
||||
accountTypeList.value = res.data
|
||||
@@ -234,6 +247,26 @@ function dictStr(val, arr) {
|
||||
})
|
||||
return str
|
||||
}
|
||||
function handleAccount() {
|
||||
if (accountList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '记账账户为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.accountName = e.value[0].typeNameCodeAvailableLimit
|
||||
queryParams.value.accountId= e.value[0].id
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
showAccount.value = false
|
||||
}
|
||||
function selectAccountType(item) {
|
||||
queryParams.value.type = item.dictValue
|
||||
accountTypeList.value.map(ele => {
|
||||
@@ -279,7 +312,8 @@ function selectAccountType(item) {
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.name = ''
|
||||
queryParams.value.accountId = ''
|
||||
queryParams.value.accountName = ''
|
||||
queryParams.value.type = ''
|
||||
queryParams.value.dealType = ''
|
||||
queryParams.value.startTime = ''
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入名称" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择记账账户" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<!-- <u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
@@ -50,6 +50,8 @@
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountList" keyName="typeNameCodeAvailableLimit" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -66,17 +68,24 @@ const status = ref('loadmore')
|
||||
const accountType = ref([])
|
||||
const debitType = ref([])
|
||||
const accountState= ref([])
|
||||
const showAccount = ref(false)
|
||||
const accountList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
name: null,
|
||||
type: null,
|
||||
state: null
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
@@ -112,6 +121,9 @@ function getList() {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
// 类型
|
||||
getDicts('account_type').then(res => {
|
||||
accountType.value = res.data
|
||||
@@ -165,6 +177,26 @@ function selectType(item) {
|
||||
}
|
||||
})
|
||||
}
|
||||
function handleAccount() {
|
||||
if (accountList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '记账账户为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.accountName = e.value[0].typeNameCodeAvailableLimit
|
||||
queryParams.value.accountId= e.value[0].id
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
showAccount.value = false
|
||||
}
|
||||
function searchSubmit() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
@@ -177,11 +209,16 @@ function selectType(item) {
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.name = '',
|
||||
queryParams.value.accountId = ''
|
||||
queryParams.value.accountName = ''
|
||||
queryParams.value.state = '',
|
||||
queryParams.value.type = ''
|
||||
accountType.value.map(ele => {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
})
|
||||
accountState.value.map(ele => {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
})
|
||||
}
|
||||
function enterDetails(item) {
|
||||
uni.navigateTo({ url: `/pages/work/accounts/accounts/details?id=${item.id}` })
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入名称" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择记账账户" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<!-- <u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
@@ -93,6 +93,8 @@
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountList" keyName="typeNameCodeAvailableLimit" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -109,17 +111,24 @@ const status = ref('loadmore')
|
||||
const accountType = ref([])
|
||||
const debitType = ref([])
|
||||
const accountState= ref([])
|
||||
const showAccount = ref(false)
|
||||
const accountList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
name: null,
|
||||
type: null,
|
||||
state: null
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
@@ -155,6 +164,9 @@ function getList() {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
// 类型
|
||||
getDicts('account_type').then(res => {
|
||||
accountType.value = res.data
|
||||
@@ -214,12 +226,34 @@ function selectType(item) {
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function handleAccount() {
|
||||
if (accountList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '记账账户为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.accountName = e.value[0].typeNameCodeAvailableLimit
|
||||
queryParams.value.accountId= e.value[0].id
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
showAccount.value = false
|
||||
}
|
||||
function searchBlur() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.accountId = ''
|
||||
queryParams.value.accountName = ''
|
||||
queryParams.value.name = '',
|
||||
queryParams.value.type = ''
|
||||
accountType.value.map(ele => {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入信用卡名称" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-input v-model="queryParams.creditCardName" border="false" type="select" @click="handleCreditCard" placeholder="请选择信用卡" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
@@ -103,6 +103,8 @@
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showCreditCard" :columns="bankCardLendList" keyName="nameCode" @cancel="handleCreditCardCancel"
|
||||
@confirm="handleCreditCardConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -111,6 +113,7 @@ import {
|
||||
listAccountsTransferRecord,
|
||||
delAccountsTransferRecord,
|
||||
} from '@/api/invest/accountsTransferRecord'
|
||||
import { listAccounts } from '@/api/invest/accounts'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
@@ -124,10 +127,18 @@ const dealTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const timeShow= ref(false)
|
||||
const showCreditCard = ref(false)
|
||||
const bankCardLendList = ref([])
|
||||
const flag= ref(true)
|
||||
const time =ref( Number(new Date()))
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryBankCardLendParams: {
|
||||
pageNum: 1,
|
||||
type: '2',
|
||||
state: '1',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
name: null,
|
||||
type: '2',
|
||||
@@ -138,7 +149,7 @@ const data = reactive({
|
||||
dealType: null
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const { filterPanel, queryBankCardLendParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
@@ -186,6 +197,9 @@ function getList() {
|
||||
timeShow.value = false
|
||||
}
|
||||
function getDict() {
|
||||
listAccounts(queryBankCardLendParams.value).then((response) => {
|
||||
bankCardLendList.value = [response.rows]
|
||||
})
|
||||
// 交易类型
|
||||
getDicts('credit_repayment_type').then(res => {
|
||||
dealTypeList.value = res.data
|
||||
@@ -225,13 +239,29 @@ function dictStr(val, arr) {
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function searchBlur() {
|
||||
pageNum.value = 1
|
||||
function handleCreditCard() {
|
||||
if (bankCardLendList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '信用卡为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showCreditCard.value = true
|
||||
}
|
||||
}
|
||||
function handleCreditCardConfirm(e) {
|
||||
queryParams.value.creditCardName = e.value[0].nameCode
|
||||
queryParams.value.inAccountId= e.value[0].id
|
||||
showCreditCard.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
}
|
||||
function handleCreditCardCancel() {
|
||||
showCreditCard.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.name = ''
|
||||
queryParams.value.creditCardName = ''
|
||||
queryParams.value.inAccountId = ''
|
||||
queryParams.value.type = '2'
|
||||
queryParams.value.dealType = ''
|
||||
queryParams.value.startTime = ''
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入储蓄账户名称" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择储蓄账户" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
@@ -92,6 +92,8 @@
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountList" keyName="typeNameCodeAvailableLimit" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -100,6 +102,7 @@ import {
|
||||
listAccountsTransferRecord,
|
||||
delAccountsTransferRecord,
|
||||
} from '@/api/invest/accountsTransferRecord'
|
||||
import { listAccounts } from '@/api/invest/accounts'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
@@ -112,11 +115,19 @@ const status = ref('loadmore')
|
||||
const dealTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const showAccount = ref(false)
|
||||
const accountList = ref([])
|
||||
const timeShow= ref(false)
|
||||
const flag= ref(true)
|
||||
const time =ref( Number(new Date()))
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
type: '1',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
name: null,
|
||||
type: '4',
|
||||
@@ -127,7 +138,7 @@ const data = reactive({
|
||||
dealType: null
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
@@ -175,6 +186,9 @@ function getList() {
|
||||
timeShow.value = false
|
||||
}
|
||||
function getDict() {
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
// 交易类型
|
||||
getDicts('credit_repayment_type').then(res => {
|
||||
dealTypeList.value = res.data
|
||||
@@ -214,6 +228,26 @@ function dictStr(val, arr) {
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function handleAccount() {
|
||||
if (accountList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '记账账户为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.accountName = e.value[0].typeNameCodeAvailableLimit
|
||||
queryParams.value.name = e.value[0].name
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
showAccount.value = false
|
||||
}
|
||||
function searchBlur() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
@@ -221,6 +255,7 @@ function dictStr(val, arr) {
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.name = ''
|
||||
queryParams.value.accountName = ''
|
||||
queryParams.value.type = ''
|
||||
queryParams.value.dealType = ''
|
||||
queryParams.value.startTime = ''
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入POS机或信用卡名称" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择POS机" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
@@ -108,6 +108,8 @@
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountList" keyName="nameCode" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -116,6 +118,7 @@ import {
|
||||
listAccountsTransferRecord,
|
||||
delAccountsTransferRecord,
|
||||
} from '@/api/invest/accountsTransferRecord'
|
||||
import { listAccounts } from '@/api/invest/accounts'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
@@ -128,10 +131,18 @@ const status = ref('loadmore')
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const timeShow= ref(false)
|
||||
const showAccount = ref(false)
|
||||
const accountList = ref([])
|
||||
const flag= ref(true)
|
||||
const time =ref( Number(new Date()))
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
type: '6',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
name: null,
|
||||
type: '1',
|
||||
@@ -142,7 +153,7 @@ const data = reactive({
|
||||
dealType: null
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
@@ -167,6 +178,9 @@ function loadmore() {
|
||||
}
|
||||
}
|
||||
function getList() {
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
status.value = 'loading'
|
||||
listAccountsTransferRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||
listData.value = listData.value.concat(res.rows)
|
||||
@@ -202,6 +216,26 @@ function settingCancel() {
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function handleAccount() {
|
||||
if (accountList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '记账账户为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.accountName = e.value[0].nameCode
|
||||
queryParams.value.posId= e.value[0].id
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
showAccount.value = false
|
||||
}
|
||||
function searchBlur() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
@@ -209,6 +243,7 @@ function settingCancel() {
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.name = ''
|
||||
queryParams.value.posId = ''
|
||||
queryParams.value.type = '1'
|
||||
queryParams.value.dealType = ''
|
||||
queryParams.value.startTime = ''
|
||||
|
||||
Reference in New Issue
Block a user