diff --git a/src/api/lb-payee-account.js b/src/api/lb-payee-account.js
new file mode 100644
index 0000000..dccdc94
--- /dev/null
+++ b/src/api/lb-payee-account.js
@@ -0,0 +1,48 @@
+import request from '@/utils/request'
+
+export function getLbPayeeAccountList(params) {
+ return request({
+ url: '/lbPayeeAccount/list',
+ method: 'get',
+ params
+ })
+}
+
+export function addLbPayeeAccount(data) {
+ return request({
+ url: '/lbPayeeAccount/add',
+ method: 'post',
+ data
+ })
+}
+
+export function updateLbPayeeAccount(data) {
+ return request({
+ url: '/lbPayeeAccount/update',
+ method: 'put',
+ data
+ })
+}
+
+export function deleteLbPayeeAccount(id) {
+ return request({
+ url: `/lbPayeeAccount/delete/${id}`,
+ method: 'delete'
+ })
+}
+
+export function fetchAndSavePayeeAccount(params) {
+ return request({
+ url: '/lbPayeeAccount/fetchAndSave',
+ method: 'post',
+ params
+ })
+}
+
+export function fetchAllAndSavePayeeAccount(params) {
+ return request({
+ url: '/lbPayeeAccount/fetchAllAndSave',
+ method: 'post',
+ params
+ })
+}
diff --git a/src/api/lb-user.js b/src/api/lb-user.js
index a09634a..bdc59b0 100644
--- a/src/api/lb-user.js
+++ b/src/api/lb-user.js
@@ -45,3 +45,11 @@ export function syncLbUserFromHxr(params) {
params
})
}
+
+export function updateLbUserCoupon(params) {
+ return request({
+ url: '/lbUserCoupon/updateCoupon',
+ method: 'post',
+ params
+ })
+}
diff --git a/src/router/index.js b/src/router/index.js
index 1d60dfa..1db174a 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -192,6 +192,12 @@ export const constantRoutes = [
name: 'LbCouponManage',
component: () => import('@/views/lb-business/coupon-manage/index'),
meta: { title: '优惠券管理', icon: 'el-icon-discount' }
+ },
+ {
+ path: 'payee-account',
+ name: 'LbPayeeAccount',
+ component: () => import('@/views/lb-business/payee-account/index'),
+ meta: { title: '收款账号', icon: 'el-icon-wallet' }
}
]
}
diff --git a/src/views/lb-business/department-user/index.vue b/src/views/lb-business/department-user/index.vue
index 99371c1..fa53946 100644
--- a/src/views/lb-business/department-user/index.vue
+++ b/src/views/lb-business/department-user/index.vue
@@ -68,6 +68,11 @@
{{ scope.row.orgChain || '-' }}
+
+
+ {{ scope.row.todayBuyCount != null ? scope.row.todayBuyCount : '-' }}
+
+
{{ formatDateTime(scope.row.updateTime) }}
@@ -177,7 +182,7 @@
@@ -207,6 +212,8 @@
电话:{{ data.phone || '-' }}
加入日期:{{ data.joinDate || '-' }}
最后成交日期:{{ data.lastTradeDate || '-' }}
+ 最大订单:{{ data.maxOrder != null ? data.maxOrder : '-' }}
+ 当天购买单数:{{ data.todayBuyCount != null ? data.todayBuyCount : '-' }}
@@ -298,7 +305,7 @@
@@ -321,6 +328,7 @@
电话:{{ data.phone || '-' }}
累计交易金额:¥ {{ formatMoney(data.tradeMoneySum) }}
自身交易金额:¥ {{ formatMoney(data.selfTradeMoney) }}
+ 当天购买单数:{{ data.todayBuyCount != null ? data.todayBuyCount : '-' }}
@@ -758,7 +766,7 @@ export default {
if (!value) return true
const keyword = String(value).trim().toLowerCase()
if (!keyword) return true
- const fields = [data.name, data.userId, data.phone, data.joinDate, data.lastTradeDate]
+ const fields = [data.name, data.userId, data.phone, data.joinDate, data.lastTradeDate, data.maxOrder]
return fields.some((field) => field != null && String(field).toLowerCase().includes(keyword))
},
isUrgeTreeLeafNode(data) {
@@ -944,7 +952,7 @@ export default {
if (!value) return true
const keyword = String(value).trim().toLowerCase()
if (!keyword) return true
- const fields = [data.name, data.userId, data.phone, data.tradeMoneySum, data.selfTradeMoney]
+ const fields = [data.name, data.userId, data.phone, data.tradeMoneySum, data.selfTradeMoney, data.todayBuyCount]
return fields.some((field) => field != null && String(field).toLowerCase().includes(keyword))
},
formatMoney(amount) {
diff --git a/src/views/lb-business/payee-account/index.vue b/src/views/lb-business/payee-account/index.vue
new file mode 100644
index 0000000..9571000
--- /dev/null
+++ b/src/views/lb-business/payee-account/index.vue
@@ -0,0 +1,473 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 清空
+
+
+
+
+
+ 新增
+ 获取支付信息
+ 获取全部收付款账号
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ {{ formatDateTime(scope.row.createdAt) }}
+
+
+
+
+ {{ formatDateTime(scope.row.updatedAt) }}
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/lb-business/user-manage/index.vue b/src/views/lb-business/user-manage/index.vue
index 0a2254a..ca68a53 100644
--- a/src/views/lb-business/user-manage/index.vue
+++ b/src/views/lb-business/user-manage/index.vue
@@ -77,6 +77,15 @@
>
同步用户
+
+ 清理优惠卷
+
@@ -102,6 +111,11 @@
+
+
+ {{ formatDateTime(scope.row.joinTime) }}
+
+
{{ formatStatusLabel(scope.row.status) }}
@@ -374,6 +388,32 @@
确定
+
+
+
+
+
+
+
+
+
+
+
@@ -383,8 +423,10 @@ import {
deleteLbUser,
getLbUserList,
syncLbUserFromHxr,
- updateLbUser
+ updateLbUser,
+ updateLbUserCoupon
} from '@/api/lb-user'
+import { getAllTenantList } from '@/api/tenant'
import { getBusinessHeaders } from '@/utils/business-headers'
function emptyForm() {
@@ -483,10 +525,21 @@ export default {
form: emptyForm(),
formRules: {
id: [{ validator: requireId, trigger: 'blur' }]
- }
+ },
+ couponDialogVisible: false,
+ couponLoading: false,
+ couponForm: {
+ tenantId: ''
+ },
+ couponFormRules: {
+ tenantId: [{ required: true, message: '请选择租户', trigger: 'change' }]
+ },
+ tenantLoading: false,
+ tenantOptions: []
}
},
created() {
+ this.getTenantOptions()
this.fetchList()
},
methods: {
@@ -620,6 +673,66 @@ export default {
const value = headers && headers['X-Tenant-Id']
return value ? String(value).trim() : ''
},
+ getTenantOptions() {
+ this.tenantLoading = true
+ getAllTenantList()
+ .then((response) => {
+ if (response && (response.code === 20000 || response.code === 200)) {
+ const tenantList = Array.isArray(response.data) ? response.data : (response.data && response.data.data ? response.data.data : [])
+ this.tenantOptions = tenantList.map((item) => ({
+ value: item.id,
+ label: item.tenantName ? `${item.tenantName} (${item.tenantCode || '-'})` : (item.tenantCode || item.id)
+ }))
+ } else {
+ this.tenantOptions = []
+ }
+ })
+ .catch(() => {
+ this.tenantOptions = []
+ })
+ .finally(() => {
+ this.tenantLoading = false
+ })
+ },
+ openCouponDialog() {
+ const defaultTenantId = this.getTenantIdFromBusinessHeaders()
+ this.couponForm = {
+ tenantId: defaultTenantId || ''
+ }
+ this.couponDialogVisible = true
+ this.$nextTick(() => {
+ this.$refs.couponFormRef && this.$refs.couponFormRef.clearValidate()
+ })
+ },
+ resetCouponForm() {
+ this.couponForm = { tenantId: '' }
+ this.$refs.couponFormRef && this.$refs.couponFormRef.resetFields()
+ },
+ submitUpdateCoupon() {
+ this.$refs.couponFormRef.validate((valid) => {
+ if (!valid) return
+ const tenantId = (this.couponForm.tenantId || '').trim()
+ if (!tenantId) {
+ this.$message.error('请选择租户')
+ return
+ }
+ this.couponLoading = true
+ updateLbUserCoupon({ tenantId })
+ .then((res) => {
+ const isSuccess = res && (res.success === true || res.code === 200 || res.code === 20000)
+ if (!isSuccess) {
+ this.$message.error((res && res.message) || '清理优惠卷失败')
+ return
+ }
+ this.$message.success((res && res.message) || '清理优惠卷成功')
+ this.couponDialogVisible = false
+ this.fetchList()
+ })
+ .finally(() => {
+ this.couponLoading = false
+ })
+ })
+ },
handleSyncFromHxr() {
const tenantId = this.getTenantIdFromBusinessHeaders()
if (!tenantId) {