diff --git a/src/pages.json b/src/pages.json index 8b9b1db..46348a8 100644 --- a/src/pages.json +++ b/src/pages.json @@ -90,6 +90,27 @@ } } , + { + "path": "pages/work/accounts/posTransferRecord/list", + "style": { + "navigationBarTitleText": "POS机刷卡记账" + } + } + , + { + "path": "pages/work/accounts/posTransferRecord/details", + "style": { + "navigationBarTitleText": "POS机刷卡记账详情" + } + } + , + { + "path": "pages/work/accounts/posTransferRecord/addEdit", + "style": { + "navigationBarTitleText": "POS机刷卡记账" + } + } + , { "path": "pages/work/accounts/accounts/index", "style": { diff --git a/src/pages/work/accounts/accountDealRecord/addEdit.vue b/src/pages/work/accounts/accountDealRecord/addEdit.vue index bb59406..a04f819 100644 --- a/src/pages/work/accounts/accountDealRecord/addEdit.vue +++ b/src/pages/work/accounts/accountDealRecord/addEdit.vue @@ -89,7 +89,22 @@ const accountNameList = ref([]) const dealCategoryList = ref([]) const dealTypeList = ref([]) const data = reactive({ - form: {}, + form: { + id: null, + name: null, + type: null, + accountId: null, + amount: 0, + dealType: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + delFlag: null, + remark: null, + currentBalance: null, + dealCategory: null + }, queryAccountParams: { pageNum: 1, state: '1', @@ -97,11 +112,11 @@ const data = reactive({ pageSize: 1000 }, rules: { - type: [{ required: true, message: '记账类型不能为空', trigger:['change', 'blur'] }], - accountId: [{ required: true, message: '记账账户不能为空', trigger: ['change', 'blur'] }], + typeName: [{ required: true, message: '记账类型不能为空', trigger:['change', 'blur'] }], + accountName: [{ required: true, message: '记账账户不能为空', trigger: ['change', 'blur'] }], amount: [{type: 'string', required: true, message: '交易金额不能为空', trigger: ['change', 'blur'] }], - dealType: [{ required: true, message: '交易类型不能为空', trigger:['change', 'blur'] }], - dealCategory: [{ 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'] }] } }) @@ -115,12 +130,14 @@ onLoad((option) => { }else{ title.value="账户交易记录-新增" } - getDict() + }) onReady(() => { - // proxy.$refs['uForm'].setRules(rules.value) + form.value.createTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss") + getData() }) - function getDict() { + function getData() { + // 类型 getDicts('account_type').then(res => { accountTypeList.value =[res.data] diff --git a/src/pages/work/accounts/accountDealRecord/list.vue b/src/pages/work/accounts/accountDealRecord/list.vue index ac6f486..ccd36cf 100644 --- a/src/pages/work/accounts/accountDealRecord/list.vue +++ b/src/pages/work/accounts/accountDealRecord/list.vue @@ -151,8 +151,6 @@ const time =ref( Number(new Date())) const data = reactive({ filterPanel: false, queryParams: { - pageNum: 1, - pageSize: 10, name: null, type: null, time: '', @@ -190,7 +188,7 @@ function getList() { status.value = 'loading' listAccountDealRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => { listData.value = listData.value.concat(res.rows) - if (listData.length < res.total) { + if (listData.value.length < res.total) { status.value = 'loadmore' } else { status.value = 'nomore' diff --git a/src/pages/work/accounts/posTransferRecord/addEdit.vue b/src/pages/work/accounts/posTransferRecord/addEdit.vue new file mode 100644 index 0000000..9cac467 --- /dev/null +++ b/src/pages/work/accounts/posTransferRecord/addEdit.vue @@ -0,0 +1,226 @@ + + + + + \ No newline at end of file diff --git a/src/pages/work/accounts/posTransferRecord/details.vue b/src/pages/work/accounts/posTransferRecord/details.vue new file mode 100644 index 0000000..bfc3aa7 --- /dev/null +++ b/src/pages/work/accounts/posTransferRecord/details.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/src/pages/work/accounts/posTransferRecord/list.vue b/src/pages/work/accounts/posTransferRecord/list.vue new file mode 100644 index 0000000..7208f81 --- /dev/null +++ b/src/pages/work/accounts/posTransferRecord/list.vue @@ -0,0 +1,490 @@ + + + + + \ No newline at end of file diff --git a/src/pages/work/heartJourney/addEdit.vue b/src/pages/work/heartJourney/addEdit.vue index 52db3a5..62cf02d 100644 --- a/src/pages/work/heartJourney/addEdit.vue +++ b/src/pages/work/heartJourney/addEdit.vue @@ -65,7 +65,7 @@ const data = reactive({ rules: { name: [{ type: 'string', required: true, message: '标题不能为空', trigger: ['change', 'blur'] }], createTime: [{ type: 'string', required: true, message: '记录时间不能为空', trigger: ['change', 'blur'] }], - type: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }], + typeName: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }], remark: [{ type: 'string', required: true, message: '内容不能为空', trigger: ['change', 'blur'] }], } }) @@ -81,7 +81,7 @@ onLoad((option) => { getDict() }) onReady(() => { - proxy.$refs['uForm'].setRules(rules.value) + form.value.createTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss") }) function getDict() { // 类型 diff --git a/src/pages/work/heartJourney/list.vue b/src/pages/work/heartJourney/list.vue index 09acfbf..33ffeb0 100644 --- a/src/pages/work/heartJourney/list.vue +++ b/src/pages/work/heartJourney/list.vue @@ -110,7 +110,7 @@ function getList() { status.value = 'loading' listHeartJourney({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => { listData.value = listData.value.concat(res.rows) - if (listData.length < res.total) { + if (listData.value.length < res.total) { status.value = 'loadmore' } else { status.value = 'nomore' diff --git a/src/pages/work/index.vue b/src/pages/work/index.vue index 43c1c10..019b520 100644 --- a/src/pages/work/index.vue +++ b/src/pages/work/index.vue @@ -75,7 +75,7 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作 const commonGridList=ref([ { path: '/pages/work/heartJourney/list', text: '心路历程', icon: 'heart', permission: 'invest:heartJourney:list' }, { path: '/pages/work/accounts/accountDealRecord/list', text: '账户交易记录', icon: 'paperclip', permission: 'invest:accountDealRecord:list' }, - { path: '/pages/page1/page1', text: 'POS机刷卡记账', icon: 'reload', permission: 'invest:accountsTransferRecord:list' }, + { path: '/pages/work/accounts/posTransferRecord/list', text: 'POS机刷卡记账', icon: 'reload', permission: 'invest:accountsTransferRecord:list' }, { path: '/pages/page1/page1', text: '信用卡还款', icon: 'arrow-left', permission: 'invest:accountsTransferRecord:list' }, { path: '/pages/page1/page1', text: '储蓄账户记账', icon: 'tune', permission: 'invest:accountsTransferRecord:list' }, { path: '/pages/work/accounts/accounts/index', text: '记账账户', icon: 'staff', permission: 'invest:accounts:list' }, @@ -102,7 +102,7 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作 ]) const accountGridList=ref([ { path: '/pages/work/accounts/accounts/index', text: '记账账户', icon: 'staff', permission: 'invest:accounts:list' }, - { path: '/pages/page1/page1', text: 'POS机刷卡记账', icon: 'reload', permission: 'invest:accountsTransferRecord:list' }, + { path: '/pages/work/accounts/posTransferRecord/list', text: 'POS机刷卡记账', icon: 'reload', permission: 'invest:accountsTransferRecord:list' }, { path: '/pages/page1/page1', text: '信用卡还款', icon: 'arrow-left', permission: 'invest:accountsTransferRecord:list' }, { path: '/pages/page1/page1', text: '投资账户记账', icon: 'auth-filled', permission: 'invest:accountsTransferRecord:list' }, { path: '/pages/page1/page1', text: '投资交易记录', icon: 'chatboxes', permission: 'invest:accountDealRecord:list' },