12 Commits

Author SHA1 Message Date
lzqadmin
485fe7bab0 后台商家和旅游团地址选择后回显 2026-03-29 15:26:32 +08:00
lzqadmin
dd528d7416 update 2026-03-29 13:35:59 +08:00
lzqadmin
83d1ef8de0 动态升级相关页面 2026-03-27 15:07:39 +08:00
lzqadmin
b000926e14 支付宝插件 , 更换地图 , 支付订单入账佣金账号 2026-03-25 15:30:04 +08:00
lzqadmin
ad212a4777 文旅景点,资讯, 商家店铺,旅游团 2026-03-22 12:00:09 +08:00
1d4df7ce92 feat:
1. add express fill
2026-03-16 16:24:26 +08:00
9b7e54c520 feat:
1. add express fill
2026-03-14 20:44:49 +08:00
33eb88c644 feat:
1. add express fill
2026-03-14 13:20:35 +08:00
5b0152b83c feat:
1. add express fill
2026-03-14 13:19:37 +08:00
lzqadmin
bd9fa0f0f3 2026-03-03后台功能需求
1,积分流水以及订单新增导出,新增时间搜索
2,优化后台划拨福利包
2026-03-09 17:38:32 +08:00
lzqadmin
b6fcebabde 佣金账户, 后台界面显示优化 2026-03-01 16:09:32 +08:00
lzqadmin
b19d99d201 优化后台界面显示 2026-03-01 13:39:37 +08:00
108 changed files with 13585 additions and 2477 deletions

View File

@@ -1,5 +1,8 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/common/order/page',
@@ -12,6 +15,32 @@ export const getList = (current, size, params) => {
})
}
export const getEcoOrderList = (current, size, params) => {
return request({
url: '/common/order/eco-page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getTourOrderList = (current, size, params) => {
return request({
url: '/common/order/tour-order-page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/common/order/detail',
@@ -62,4 +91,31 @@ export const fillExpress = (id, expressNo) => {
method: 'post',
data: {id, expressNo}
});
};
};
export const confirmGuideInfo = (row) => {
return request({
url: '/common/tour-order-detail/confirm-guide-info',
method: 'post',
data: row
});
};
export const fillContractUrl = (id, contractUrl) => {
return request({
url: '/common/tour-order-detail/fill-contractUrl',
method: 'post',
data: {id, contractUrl}
});
};
export function confirmItinerary(id) {
return request({
url: '/common/order/confirm-itinerary',
method: 'post',
data: {id}
});
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/common/tourism-spot/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/common/tourism-spot/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/common/tourism-spot/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/common/tourism-spot/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/common/tourism-spot/submit',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/common/merchant-store/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/common/merchant-store/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/common/merchant-store/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/common/merchant-store/save',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/common/merchant-store/update',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/common/news-category/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/common/news-category/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/common/news-category/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/common/news-category/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/common/news-category/submit',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/common/news-content/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/common/news-content/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/common/news-content/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/common/news-content/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/common/news-content/submit',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/common/tour-product/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/common/tour-product/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/common/tour-product/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/common/tour-product/save',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/common/tour-product/update',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/mall/directMall/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/mall/directMall/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/mall/directMall/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/mall/directMall/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/mall/directMall/update',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/mall/ecosystemProduct/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/mall/ecosystemProduct/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/mall/ecosystemProduct/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/mall/ecosystemProduct/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/mall/ecosystemProduct/update',
method: 'post',
data: row
})
}

View File

@@ -48,3 +48,16 @@ export const update = (row) => {
})
}
export const revokeBenefitPackInfo = (id) => {
return request({
url: '/market/benefit-package/revokeBenefitPackInfo',
method: 'post',
params: {
id,
}
})
}

View File

@@ -2,7 +2,7 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market/benefit-package-log/list',
url: '/market/benefit-package-log/page',
method: 'get',
params: {
...params,

View File

@@ -48,3 +48,5 @@ export const update = (row) => {
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market/cash-performance-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/market/cash-performance-log/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/market/cash-performance-log/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/market/cash-performance-log/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/market/cash-performance-log/submit',
method: 'post',
data: row
})
}

View File

@@ -2,7 +2,7 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market-commission/advertising-log/list',
url: '/market-commission/advertising-log/page',
method: 'get',
params: {
...params,

View File

@@ -2,14 +2,14 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market-commission/agency-log/list',
url: '/market-commission/agency-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
},
});
}
export const getDetail = (id) => {

View File

@@ -2,14 +2,14 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market-commission/cocreator-log/list',
url: '/market-commission/cocreator-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
},
});
}
export const getDetail = (id) => {

View File

@@ -2,14 +2,14 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market-commission/direct-push-log/list',
url: '/market-commission/direct-push-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
},
});
}
export const getDetail = (id) => {

View File

@@ -2,14 +2,14 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market-commission/goods-cost-log/list',
url: '/market-commission/goods-cost-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
},
});
}
export const getDetail = (id) => {

View File

@@ -2,14 +2,14 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market-commission/operation-log/list',
url: '/market-commission/operation-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
},
});
}
export const getDetail = (id) => {

View File

@@ -2,14 +2,14 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market-commission/service-provider-log/list',
url: '/market-commission/service-provider-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
},
});
}
export const getDetail = (id) => {

View File

@@ -2,14 +2,14 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market-commission/user-point-log/list',
url: '/market-commission/user-point-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
},
});
}
export const getDetail = (id) => {

View File

@@ -1,5 +1,7 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market-info/page',
@@ -58,3 +60,50 @@ export const resetPassword = userIds => {
});
};
export const benefitPackCountByUser = (userId) => {
return request({
url: '/market-info/benefitPackCountByUser',
method: 'get',
params: {
userId
}
})
}
export const getUserPointInfo = (userId) => {
return request({
url: '/market-info/getUserPointInfo',
method: 'get',
params: {
userId
}
})
}
export function getUserMallSpend(userId) {
return request({
url: '/market-info/getUserMallSpend',
method: 'get',
params: {
userId
}
})
}
export function getUserPerformance(userId) {
return request({
url: '/market-info/getUserPerformance',
method: 'get',
params: {
userId
}
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market/upgrade-cash-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/market/upgrade-cash-log/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/market/upgrade-cash-log/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/market/upgrade-cash-log/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/market/upgrade-cash-log/submit',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market/upgrade-config/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/market/upgrade-config/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/market/upgrade-config/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/market/upgrade-config/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/market/upgrade-config/submit',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market/upgrade-welfare-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/market/upgrade-welfare-log/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/market/upgrade-welfare-log/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/market/upgrade-welfare-log/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/market/upgrade-welfare-log/submit',
method: 'post',
data: row
})
}

View File

@@ -2,14 +2,14 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market/benefit-commission/list',
url: '/market/benefit-commission/page',
method: 'get',
params: {
...params,
current,
size,
}
})
},
});
}
export const getDetail = (id) => {

View File

@@ -2,14 +2,14 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market/benefit-commission-log/list',
url: '/market/benefit-commission-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
},
});
}
export const getDetail = (id) => {

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/market/welfare-performance-log/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/market/welfare-performance-log/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/market/welfare-performance-log/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/market/welfare-performance-log/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/market/welfare-performance-log/submit',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/blade-pay/alipay/config/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/blade-pay/alipay/config/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/blade-pay/alipay/config/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/blade-pay/alipay/config/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/blade-pay/alipay/config/submit',
method: 'post',
data: row
})
}

130
src/api/plugin/pay/demo.js Normal file
View File

@@ -0,0 +1,130 @@
import request from '@/axios';
export const wxNativePay = (row) => {
return request({
url: '/api/blade-pay/wxpay/nativePay',
method: 'post',
data: row
})
}
export const wxJsPay = (row) => {
return request({
url: '/api/blade-pay/wxpay/jsPay',
method: 'post',
data: row
})
}
export const wxMinAppPay = (row) => {
return request({
url: '/api/blade-pay/wxpay/wxAppPay',
method: 'post',
data: row
})
}
export const wxH5Pay = (row) => {
return request({
url: '/api/blade-pay/wxpay/h5Pay',
method: 'post',
data: row
})
}
export const wxAppPay = (row) => {
return request({
url: '/api/blade-pay/wxpay/appPay',
method: 'post',
data: row
})
}
export const aliNativePay = (row) => {
return request({
url: '/api/blade-pay/alipay/nativePay',
method: 'post',
data: row
})
}
export const aliJsPay = (row) => {
return request({
url: '/api/blade-pay/alipay/jsPay',
method: 'post',
data: row
})
}
export const aliPcPay = (row) => {
return request({
url: '/api/blade-pay/alipay/pcPay',
method: 'post',
data: row
})
}
export const aliH5Pay = (row) => {
return request({
url: '/api/blade-pay/alipay/h5Pay',
method: 'post',
data: row
})
}
export const aliAppPay = (row) => {
return request({
url: '/blade-pay/alipay/appPay',
method: 'post',
data: row
})
}
export const mergeNativePay = (row) => {
return request({
url: '/api/blade-pay/merge/nativePay',
method: 'post',
data: row
})
}
export const mergeMobilePay = (row) => {
return request({
url: '/api/blade-pay/merge/mobilePay',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/blade-pay/merge/config/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/blade-pay/merge/config/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/blade-pay/merge/config/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/blade-pay/merge/config/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/blade-pay/merge/config/submit',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,60 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/blade-pay/order/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/blade-pay/order/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/blade-pay/order/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/blade-pay/order/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/blade-pay/order/submit',
method: 'post',
data: row
})
}
export const checkOrderStatus = (params) => {
return request({
url: '/api/blade-pay/order/checkOrderStatus',
method: 'get',
params: params
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/blade-pay/refund/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/blade-pay/refund/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/blade-pay/refund/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/blade-pay/refund/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/blade-pay/refund/submit',
method: 'post',
data: row
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/blade-pay/wxconfig/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/blade-pay/wxconfig/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/blade-pay/wxconfig/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/blade-pay/wxconfig/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/blade-pay/wxconfig/submit',
method: 'post',
data: row
})
}

View File

@@ -100,10 +100,41 @@ axios.interceptors.request.use(
//http response拦截
axios.interceptors.response.use(
res => {
async res => {
NProgress.done();
//获取配置信息
const config = res.config;
const isExportRequest = config.meta?.isExport || config.url.includes('/export');
// 如果是导出请求,且返回的数据是 Blob 类型
// 处理导出excel时 , 后端参数报错能正确显示
if (isExportRequest && res.data instanceof Blob) {
// 检查 Blob 的类型,如果是 JSON,说明是后端报错了
if (res.data.type && res.data.type.toLowerCase().indexOf('application/json') !== -1) {
// 必须使用 FileReader 读取 Blob 内容
const text = await res.data.text(); // 读取为文本
let errorData;
try {
errorData = JSON.parse(text); // 尝试解析 JSON
} catch (e) {
// 如果解析失败(比如服务器500直接报错,不是标准JSON),直接抛出文本
ElMessage.error('导出错误: ' + text);
return Promise.reject(new Error('Export Error: ' + text));
}
// 此时拿到了后端真正的错误信息
const message = errorData.msg || errorData.error_description || '导出失败';
// 这里直接提示错误,阻止后续逻辑
ElMessage.error(message);
// 返回一个 reject,这样你的 .then 会走到 .catch
return Promise.reject(new Error(message));
}
// 如果不是 JSON Blob,说明是正常的文件流,直接返回 res,交给后续下载逻辑
}
const cryptoData = config.cryptoData === true;
//解析加密报文
if (cryptoData) {

View File

@@ -42,6 +42,7 @@ export default {
label: "订单类型",
prop: "orderType",
type: "input",
hide: true,
},
{
label: "商品编号",
@@ -67,6 +68,37 @@ export default {
url: 'link'
}
},
{
label: "规格",
prop: "specs",
type: "dynamic",
span: 24,
children:{
rowAdd: (done)=>{
done();
},
rowDel: (row, done) => {
done();
},
column: [
{
label: "名称",
prop: "attr",
},
{
label: "值",
prop: "value",
}
],
},
formatter: (row, value, cellValue) => {
if (!Array.isArray(value)) return '';
return value.map(s => `${s.attr} : ${s.value}`).join('; ');
},
overHidden: true,
},
{
label: "数量",
prop: "quantity",
@@ -156,6 +188,22 @@ export default {
type: "input",
overHidden: true,
},
{
label: "下单时间",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
search: true,
searchRange: true,
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "修改人",
prop: "updateUser",

View File

@@ -23,7 +23,7 @@ export default {
hide: true,
},
{
label: '用户账户',
label: '用户账号',
prop: 'account',
type: 'input',
search: true,

View File

@@ -30,7 +30,7 @@ export default {
},
{
label: '用户账户',
label: '用户账号',
prop: 'account',
type: 'input',
search: true,
@@ -80,6 +80,22 @@ export default {
type: 'input',
overHidden: true,
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
search: true,
searchRange: true,
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '备注',
prop: 'remark',

View File

@@ -0,0 +1,268 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
addBtn: false,
editBtn: false,
delBtn: false,
viewBtn: false,
selection: true,
dialogClickModal: false,
column: [
{
label: "订单号",
prop: "id",
type: "input",
search: true,
overHidden: true,
},
{
label: "下单账号",
prop: "account",
type: "input",
search: true,
overHidden: true,
},
{
label: "电话",
prop: "consigneePhone",
type: "input",
overHidden: true,
},
{
label: "收件人",
prop: "consignee",
type: "input",
},
{
label: "订单类型",
prop: "orderType",
type: "input",
hide: true,
},
{
label: "商品编号",
prop: "itemCode",
type: "input",
hide: true,
},
{
label: "商品名称",
prop: "itemName",
type: "input",
overHidden: true,
},
{
label: "图片",
prop: "imageUrl",
type: "upload",
listType: 'picture-img',
dataType: 'string',
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "数量",
prop: "quantity",
type: "input",
},
{
label: "订单号",
prop: "orderDetailId",
type: "input",
overHidden: true,
hide: true,
},
{
label: "出行人详情",
prop: "travelerDetail",
type: "input",
overHidden: true,
width: "120",
hide: true,
},
{
label: "商品详情",
prop: "productSnapshot",
type: "input",
overHidden: true,
width: "120",
hide: true,
},
{
label: "电子合同",
prop: "contractUrl",
type: "input",
overHidden: true,
width: "120",
},
{
label: "是否签合同",
prop: "contractStatus",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
width: "120",
},
{
label: "导游名",
prop: "guideName",
type: "input",
overHidden: true,
width: "120",
},
{
label: "导游电话",
prop: "guidePhone",
type: "input",
overHidden: true,
width: "120",
},
{
label: "出行开始时间",
prop: "tourStartDate",
type: "input",
overHidden: true,
width: "120",
},
{
label: "出行结束时间",
prop: "tourEndDate",
type: "input",
overHidden: true,
width: "120",
},
{
label: "备注",
prop: "remark",
type: "input",
},
{
label: "订单状态",
prop: "orderStatus",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_order_status',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
search: true,
},
{
label: "订单金额",
prop: "totalAmount",
type: "input",
},
{
label: "实际支付",
prop: "actualAmount",
type: "input",
},
{
label: "支付方式",
prop: "paymentType",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_pay_type',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
search: true,
},
{
label: "支付时间",
prop: "paymentTime",
type: "input",
overHidden: true,
},
{
label: "支付状态",
prop: "paymentStatus",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_pay_status',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
search: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "下单时间",
prop: "createTime",
type: "input",
overHidden: true,
},
{
label: "下单时间",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
search: true,
searchRange: true,
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
}
]
}

View File

@@ -0,0 +1,187 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
addBtn: true,
editBtn: true,
selection: false,
dialogClickModal: false,
column: [
{
label: "主键ID,自增bigint",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "景点名称",
prop: "spotName",
type: "input",
overHidden: true,
},
{
label: "评分",
prop: "rating",
type: "number",
value: 5.0,
},
{
label: "出行人数",
prop: "visitCount",
type: "number",
},
{
label: "缩略图",
prop: "thumbnailUrl",
type: "upload",
listType: 'picture-card',
dataType: 'string',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "主图",
prop: "mainImageUrl",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "详情图",
prop: "detailImages",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "宣传视频",
prop: "videoUrl",
type: "upload",
dataType: 'string',
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "是否推荐",
prop: "isRecommended",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
props: {
label: 'dictValue',
value: 'dictKey',
},
dataType: 'number',
value : 0,
},
{
label: "简短摘要",
prop: "summary",
type: "input",
overHidden: true,
},
{
label: "详细介绍",
prop: "description",
type: "textarea",
overHidden: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -0,0 +1,241 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
selection: false,
dialogClickModal: false,
column: [
{
label: "主键 ID",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "店铺名字",
prop: "storeName",
type: "input",
overHidden: true,
},
{
label: "联系电话",
prop: "contactPhone",
type: "input",
overHidden: true,
},
{
label: "缩略图",
prop: "thumbnailUrl",
type: "upload",
dataType: 'string',
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "主图",
prop: "mainImageUrl",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "详情图",
prop: "detailImages",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "营业时间",
prop: "businessHours",
type: "input",
overHidden: true,
},
{
label: "商家详细",
prop: "storeDescription",
type: "textarea",
overHidden: true,
},
{
label: '省份',
prop: 'provinceId',
type: 'select',
hide: true,
props: {
label: 'name',
value: 'code'
},
cascader: ['cityId'],
dicUrl: `/common/region/selectProvinceAndCity/1`,
rules: [
{
required: true,
message: '请选择省份',
trigger: 'blur'
}
]
},
{
label: '城市',
prop: 'cityId',
type: 'select',
hide: true,
cascader:['regionsId'],
props: {
label: 'name',
value: 'code'
},
dicUrl: `/common/region/selectProvinceAndCity/{{provinceId}}`,
rules: [
{
required: true,
message: '请选择城市',
trigger: 'blur'
}
]
},
{
label: '地区',
prop: 'regionsId',
type: 'select',
hide: true,
props: {
label: 'name',
value: 'code'
},
dicUrl: `/common/region/selectProvinceAndCity/{{cityId}}`,
rules: [
{
required: true,
message: '请选择地区',
trigger: 'blur'
}
],
},
{
label: "详细地址",
prop: "fullAddress",
type: "input",
overHidden: true,
hide: true,
addDisplay: true,
editDisplay: true,
},
{
label: "详细地址",
prop: "addressDetail",
type: "input",
overHidden: true,
rules: [
{
required: true,
message: '请填写详细地址',
trigger: 'blur'
}
],
addDisplay: false,
editDisplay: false,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -0,0 +1,111 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
addBtn: true,
editBtn: true,
selection: false,
dialogClickModal: false,
column: [
{
label: "主键ID",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "分类名称",
prop: "categoryName",
type: "input",
overHidden: true,
},
{
label: "排序",
prop: "sortOrder",
type: "input",
},
{
label: "是否置顶",
prop: "isTop",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
props: {
label: 'dictValue',
value: 'dictKey',
},
dataType: 'number',
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -0,0 +1,221 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
addBtn: true,
editBtn: true,
selection: false,
dialogClickModal: false,
column: [
{
label: "主键ID",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "资讯标题",
prop: "title",
type: "input",
overHidden: true,
},
{
label: "简短摘要",
prop: "summary",
type: "input",
overHidden: true,
},
{
label: "内容类型",
prop: "contentType",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_news_type',
props: {
label: 'dictValue',
value: 'dictKey',
},
dataType: 'number',
value : 0,
},
{
label: "所属分类",
prop: "categoryId",
type: 'select',
dicUrl: '/common/news-category/dictionary',
props: {
label: 'categoryName',
value: 'id'
},
dataType: 'string',
search: true,
overHidden: true,
},
{
label: "视频",
prop: "videoUrl",
type: "upload",
listType: 'picture-card',
dataType: 'string',
multiple: false,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "视频播放次数",
prop: "playCount",
type: "input",
},
{
label: "缩略图",
prop: "thumbnailUrl",
type: "upload",
listType: 'picture-card',
dataType: 'string',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "主图",
prop: "mainImageUrl",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
},
overHidden: true,
},
{
label: "详情图",
prop: "detailImages",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
},
overHidden: true,
},
{
label: "正文内容",
prop: "articleContent",
type: "textarea",
overHidden: true,
},
{
label: "评论数量",
prop: "commentCount",
type: "input",
},
{
label: "是否置顶",
prop: "isFeatured",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
props: {
label: 'dictValue',
value: 'dictKey',
},
dataType: 'number',
value : 0,
},
{
label: "排序",
prop: "sortOrder",
type: "input",
},
{
label: "浏览次数",
prop: "viewCount",
type: "input",
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态 0=下架,1=上架",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -0,0 +1,319 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
addBtn: true,
editBtn: true,
selection: false,
dialogClickModal: false,
column: [
{
label: "主键ID",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "产品名称",
prop: "productName",
type: "input",
overHidden: true,
},
{
label: "副标题/亮点",
prop: "subTitle",
type: "input",
width : 120,
overHidden: true,
},
{
label: "缩略图",
prop: "thumbnailUrl",
type: "upload",
dataType: 'string',
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "主图",
prop: "mainImageUrl",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "详情图",
prop: "detailImages",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "目的地",
prop: "cityName",
type: "input",
overHidden: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "行程天数",
prop: "durationDays",
type: "number",
value: 1,
},
{
label: "住宿晚数",
prop: "durationNights",
type: "number",
value: 1,
},
{
label: "起售价",
prop: "basePrice",
type: "input",
},
{
label: "成人单价",
prop: "adultPrice",
type: "input",
},
{
label: "儿童单价",
prop: "childPrice",
type: "input",
},
{
label: "老年人单价",
prop: "elderlyPrice",
type: "input",
width: 120,
},
{
label: "最小成团人数",
prop: "minPeople",
type: "number",
width: 120,
value: 1,
},
{
label: "最大接待人数",
prop: "maxPeople",
type: "number",
width: 120,
value: 1,
},
{
label: "是否推荐",
prop: "isRecommended",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
props: {
label: 'dictValue',
value: 'dictKey',
},
dataType: 'number',
value : 0,
},
{
label: "是否填身份证",
prop: "requireIdCard",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
props: {
label: 'dictValue',
value: 'dictKey',
},
dataType: 'number',
value : 1,
width: 160,
},
{
label: "是否填护照",
prop: "requirePassport",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
props: {
label: 'dictValue',
value: 'dictKey',
},
dataType: 'number',
value : 0,
width: 160,
},
{
label: "是否填港澳通行证",
prop: "requireHkMacauPass",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
props: {
label: 'dictValue',
value: 'dictKey',
},
dataType: 'number',
value : 0,
width: 160,
},
{
label: "产品详情",
prop: "description",
type: "textarea",
overHidden: true,
},
{
label: "销量",
prop: "visitCount",
type: "input",
},
{
label: "评分",
prop: "rating",
type: "number",
value: 5.0,
},
{
label: '省份',
prop: 'provinceId',
type: 'select',
hide: true,
props: {
label: 'name',
value: 'code'
},
cascader: ['cityId'],
dicUrl: `/common/region/selectProvinceAndCity/1`,
rules: [
{
required: true,
message: '请选择省份',
trigger: 'blur'
}
]
},
{
label: '城市',
prop: 'cityId',
type: 'select',
hide: true,
props: {
label: 'name',
value: 'code'
},
dicUrl: `/common/region/selectProvinceAndCity/{{provinceId}}`,
rules: [
{
required: true,
message: '请选择城市',
trigger: 'blur'
}
]
},
{
label: "目的地城市",
prop: "cityName",
type: "input",
width: 140,
overHidden: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "创建人ID",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门ID",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人ID",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态:0=下架,1=上架",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除:0=未删除,1=已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -0,0 +1,220 @@
export default {
height: 'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
selection: true,
dialogClickModal: false,
column: [
{
label: "主键",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
hide: true,
},
{
label: "编码",
prop: "serialNumber",
type: "input",
addDisplay: false,
editDisplay: false,
hide: true,
},
{
label: "名称",
prop: "productName",
type: "input",
},
{
label: "缩略图",
prop: "thumbImageUrl",
type: "upload",
listType: 'picture-img',
dataType: 'string',
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "主图",
prop: "mainImageUrls",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "详情图",
prop: "detailImageUrls",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "规格",
prop: "specs",
type: "dynamic",
span: 24,
children:{
rowAdd: (done)=>{
done();
},
rowDel: (row, done) => {
done();
},
column: [
{
label: "名称",
prop: "attr",
},
{
label: "值",
prop: "value",
}
],
},
formatter: (row, value, cellValue) => {
if (!Array.isArray(value)) return '';
return value.map(s => `${s.attr} : ${s.value}`).join('; ');
},
overHidden: true,
},
{
label: "单位",
prop: "unit",
type: "input",
},
{
label: "分类",
prop: "categoryId",
type: 'select',
dicUrl: '/mall/category/dictionary',
props: {
label: 'categoryName',
value: 'id'
},
dataType: 'number',
addDisplay: false,
editDisplay: false,
hide: true,
},
{
label: "分类路径",
prop: "categoryPath",
type: "input",
hide: true,
addDisplay: false,
editDisplay: false,
},
{
label: "原价",
prop: "originalPrice",
type: "input",
},
{
label: "销售价",
prop: "retailPrice",
type: "input",
},
{
label: "销量",
prop: "sales",
type: "input",
},
{
label: "库存",
prop: "stock",
type: "input",
},
{
label: "标签",
prop: "tags",
type: "tag",
formatter: (row, value, cellValue) => {
if (!Array.isArray(value)) return '';
return value.map(s => `${s}`).join('; ');
}
},
{
label: "状态(0=下架,1=上架,3=删除)",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -0,0 +1,219 @@
export default {
height: 'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
selection: true,
dialogClickModal: false,
column: [
{
label: "主键",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
hide: true,
},
{
label: "编码",
prop: "serialNumber",
type: "input",
addDisplay: false,
editDisplay: false,
hide: true,
},
{
label: "名称",
prop: "productName",
type: "input",
},
{
label: "缩略图",
prop: "thumbImageUrl",
type: "upload",
listType: 'picture-img',
dataType: 'string',
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "主图",
prop: "mainImageUrls",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "详情图",
prop: "detailImageUrls",
type: "upload",
listType: 'picture-card',
multiple: true,
action: '/blade-resource/oss/endpoint/put-file',
propsHttp: {
res: 'data',
url: 'link'
}
},
{
label: "规格",
prop: "specs",
type: "dynamic",
span: 24,
children:{
rowAdd: (done)=>{
done();
},
rowDel: (row, done) => {
done();
},
column: [
{
label: "名称",
prop: "attr",
},
{
label: "值",
prop: "value",
}
],
},
formatter: (row, value, cellValue) => {
if (!Array.isArray(value)) return '';
return value.map(s => `${s.attr} : ${s.value}`).join('; ');
},
overHidden: true,
},
{
label: "单位",
prop: "unit",
type: "input",
},
{
label: "分类",
prop: "categoryId",
type: 'select',
dicUrl: '/mall/category/dictionary',
props: {
label: 'categoryName',
value: 'id'
},
dataType: 'number',
addDisplay: false,
editDisplay: false,
},
{
label: "分类路径",
prop: "categoryPath",
type: "input",
hide: true,
addDisplay: false,
editDisplay: false,
},
{
label: "原价",
prop: "originalPrice",
type: "input",
},
{
label: "销售价",
prop: "retailPrice",
type: "input",
},
{
label: "销量",
prop: "sales",
type: "input",
},
{
label: "库存",
prop: "stock",
type: "input",
},
{
label: "标签",
prop: "tags",
type: "tag",
formatter: (row, value, cellValue) => {
if (!Array.isArray(value)) return '';
return value.map(s => `${s}`).join('; ');
}
},
{
label: "状态(0=下架,1=上架,3=删除)",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -8,6 +8,7 @@ export default {
index: true,
viewBtn: true,
selection: false,
delBtn: false,
dialogClickModal: false,
column: [
{

View File

@@ -1,5 +1,5 @@
export default {
height:'auto',
height: 'auto',
calcHeight: 30,
tip: false,
searchShow: true,
@@ -14,216 +14,216 @@ export default {
dialogClickModal: false,
column: [
{
label: "主键",
prop: "id",
type: "input",
label: '主键',
prop: 'id',
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "统计日期",
prop: "statisticalDate",
type: "input",
width : 140,
label: '统计日期',
prop: 'statisticalDate',
type: 'input',
width: 140,
overHidden: true,
},
{
label: "用户id",
prop: "userId",
type: "input",search : true,
label: '用户id',
prop: 'userId',
type: 'input',
hide: true,
overHidden: true,
},
{
label: "用户手机号",
prop: "phone",
type: "input",
width : 140,
search : true,
label: '用户账号',
prop: 'phone',
type: 'input',
width: 140,
search: true,
overHidden: true,
},
{
label: "用户名",
prop: "userName",
type: "input",
label: '用户名',
prop: 'userName',
type: 'input',
overHidden: true,
},
{
label: "积分包id",
prop: "packageId",
type: "input",
label: '积分包id',
prop: 'packageId',
type: 'input',
hide: true,
overHidden: true,
},
{
label: "积分包名称",
prop: "packageName",
type: "input",
width : 150,
label: '积分包名称',
prop: 'packageName',
type: 'input',
width: 150,
overHidden: true,
},
{
label: "来源",
prop: "type",
type: "select",
dicUrl: "/api/blade-system/dict/dictionary?code=app_package_type",
dataType: "number",
label: '来源',
prop: 'type',
type: 'select',
dicUrl: '/api/blade-system/dict/dictionary?code=app_package_type',
dataType: 'number',
props: {
label: "dictValue",
value: "dictKey"
label: 'dictValue',
value: 'dictKey',
},
width : 140,
width: 140,
},
{
label: "兑换包需要的福利积分",
prop: "userBenefit",
type: "input",
width : 180,
label: '兑换包需要的福利积分',
prop: 'userBenefit',
type: 'input',
width: 180,
overHidden: true,
},
{
label: "兑换包需要的现金券",
prop: "userCash",
type: "input",width : 180,
overHidden: true,
},
{
label: "购买赠与福利值",
prop: "giveAmount",
type: "input",
width : 180,
label: '兑换包需要的现金券',
prop: 'userCash',
type: 'input',
width: 180,
overHidden: true,
},
{
label: "产出总天数",
prop: "dayTotal",
type: "input",
width : 180,
label: '购买赠与福利值',
prop: 'giveAmount',
type: 'input',
width: 180,
overHidden: true,
},
{
label: "总产出福利积分",
prop: "amountTotal",
type: "input",
width : 180,
label: '产出总天数',
prop: 'dayTotal',
type: 'input',
width: 180,
overHidden: true,
},
{
label: "每日产出福利积分",
prop: "amountDay",
type: "input",
width : 180,
label: '总产出福利积分',
prop: 'amountTotal',
type: 'input',
width: 180,
overHidden: true,
},
{
label: "已产出福利积分",
prop: "amountOut",
type: "input",
width : 180,
label: '每日产出福利积分',
prop: 'amountDay',
type: 'input',
width: 180,
overHidden: true,
},
{
label: "已产出天数",
prop: "outDay",
type: "input",
width : 180,
label: '已产出福利积分',
prop: 'amountOut',
type: 'input',
width: 180,
overHidden: true,
},
{
label: '已产出天数',
prop: 'outDay',
type: 'input',
width: 180,
overHidden: true,
},
{
label: "过期时间",
prop: "expiredDate",
type: "input",
width : 180,
overHidden: true,
},
{
label: "激活时间",
prop: "activeTime",
type: "input",
width : 180,
label: '过期时间',
prop: 'expiredDate',
type: 'input',
width: 180,
overHidden: true,
},
{
label: "备注",
prop: "remark",
type: "input",
width : 180,
label: '激活时间',
prop: 'activeTime',
type: 'input',
width: 180,
overHidden: true,
},
{
label: '备注',
prop: 'remark',
type: 'input',
width: 180,
overHidden: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
label: '创建人',
prop: 'createUser',
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
label: '创建部门',
prop: 'createDept',
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
label: '创建时间',
prop: 'createTime',
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
label: '修改人',
prop: 'updateUser',
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
label: '修改时间',
prop: 'updateTime',
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
label: '状态',
prop: 'status',
type: 'input',
addDisplay: false,
editDisplay: false,
hide: false,
dicUrl: "/api/blade-system/dict/dictionary?code=app_package_status",
dataType: "number",
dicUrl: '/api/blade-system/dict/dictionary?code=app_package_status',
dataType: 'number',
props: {
label: "dictValue",
value: "dictKey"
label: 'dictValue',
value: 'dictKey',
},
width : 140,
width: 140,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
label: '是否已删除',
prop: 'isDeleted',
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}
],
};

View File

@@ -31,12 +31,12 @@ export default {
{
label: '用户id',
prop: 'userId',
search: true,
type: 'input',
hide: true,
overHidden: true,
},
{
label: '用户手机号',
label: '用户账号',
prop: 'phone',
type: 'input',
search: true,
@@ -62,6 +62,7 @@ export default {
label: '积分包id',
prop: 'userPackageId',
type: 'input',
hide: true,
overHidden: true,
},
{
@@ -86,6 +87,22 @@ export default {
type: 'input',
overHidden: true,
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
search: true,
searchRange: true,
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '创建人',
prop: 'createUser',

View File

@@ -26,46 +26,65 @@ export default {
label: "积分包名称",
prop: "packageName",
type: "input",
labelWidth: 160,
},
{
label: "最大购买数量",
prop: "userLimit",
type: "input",
type: "number",
labelWidth: 160,
},
{
label: "全网最大兑换数量",
prop: "maxLimit",
type: "input",
type: "number",
labelWidth: 160,
},
{
label: "产出总天数",
prop: "dayLimit",
type: "input",
type: "number",
labelWidth: 120,
},
{
label: "总产出福利积分",
prop: "benefitPointAmount",
type: "input",
type: "number",
labelWidth: 160,
addDisplay: false,
editDisplay: false,
},
{
label: "购买赠与福利值",
prop: "benefitValueAmount",
type: "input",
type: "number",
labelWidth: 160,
addDisplay: false,
editDisplay: false,
},
{
label: "兑换包需要的福利积分",
prop: "benefitPointPrice",
type: "input",
type: "number",
labelWidth: 170,
width : 170,
addDisplay: false,
editDisplay: false,
},
{
label: "兑换包需要的现金券",
prop: "cashCouponPrice",
type: "input",
type: "number",
labelWidth: 160,
addDisplay: false,
editDisplay: false,
},
{
label: "已兑换数量",
prop: "exchangedQuantity",
type: "input",
addDisplay: false,
editDisplay: false,
},
{
label: "创建人",

View File

@@ -23,7 +23,7 @@ export default {
hide: true,
},
{
label: '用户账户',
label: '用户账号',
prop: 'account',
type: 'input',
search: true,

View File

@@ -30,7 +30,7 @@ export default {
},
{
label: '用户账户',
label: '用户账号',
prop: 'account',
type: 'input',
search: true,
@@ -84,9 +84,27 @@ export default {
{
label: '统计时间',
prop: 'statisticalDate',
type: 'input',
type: 'date',
overHidden: true,
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
search: true,
searchRange: true,
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '备注',
prop: 'remark',

View File

@@ -23,7 +23,7 @@ export default {
hide: true,
},
{
label: '用户账户',
label: '用户账号',
prop: 'account',
type: 'input',
search: true,

View File

@@ -30,7 +30,7 @@ export default {
},
{
label: '用户账户',
label: '用户账号',
prop: 'account',
type: 'input',
search: true,
@@ -81,6 +81,22 @@ export default {
type: 'input',
overHidden: true,
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
search: true,
searchRange: true,
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '备注',
prop: 'remark',

View File

@@ -0,0 +1,131 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtn: false,
selection: false,
menu : false,
dialogClickModal: false,
column: [
{
label: "",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "用户ID",
prop: "userId",
type: "input",
hide: true,
},
{
label: '用户账号',
prop: 'account',
type: 'input',
search: true,
overHidden: true,
},
{
label: "统计时间",
prop: "statDate",
type: "input",
},
{
label: "当前业绩",
prop: "performance",
type: "input",
},
{
label: "来源ID",
prop: "sourceId",
type: "input",
hide: true,
},
{
label: "来源详情",
prop: "sourceDetail",
type: "input",
overHidden: true,
},
{
label: "备注",
prop: "remarks",
type: "input",
overHidden: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -27,7 +27,15 @@ export default {
prop: 'accountId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '佣金账户',
prop: 'commissionAccount',
type: 'input',
overHidden: true,
},
{
label: '变动金额',
prop: 'amount',
@@ -48,6 +56,7 @@ export default {
prop: 'sourceId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '来源详情',

View File

@@ -27,12 +27,29 @@ export default {
prop: 'accountId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '佣金账户',
prop: 'commissionAccount',
type: 'input',
overHidden: true,
},
{
label: '用户id',
prop: 'userId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '用户账号',
prop: 'userAccount',
type: 'input',
overHidden: true,
search: true,
},
{
label: '变动金额',
@@ -54,6 +71,7 @@ export default {
prop: 'sourceId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '来源详情',

View File

@@ -27,7 +27,15 @@ export default {
prop: 'accountId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '佣金账户',
prop: 'commissionAccount',
type: 'input',
overHidden: true,
},
{
label: '变动金额',
prop: 'amount',
@@ -48,6 +56,7 @@ export default {
prop: 'sourceId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '来源详情',

View File

@@ -27,12 +27,29 @@ export default {
prop: 'accountId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '佣金账户',
prop: 'commissionAccount',
type: 'input',
overHidden: true,
},
{
label: '用户id',
prop: 'userId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '用户账号',
prop: 'userAccount',
type: 'input',
overHidden: true,
search: true,
},
{
label: '变动金额',
@@ -54,6 +71,7 @@ export default {
prop: 'sourceId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '来源详情',

View File

@@ -26,14 +26,17 @@ export default {
label: '账户id',
prop: 'accountId',
type: 'input',
hide: true,
overHidden: true,
},
{
label: '用户id',
prop: 'userId',
label: '佣金账户',
prop: 'commissionAccount',
type: 'input',
overHidden: true,
},
{
label: '金额',
prop: 'amount',
@@ -50,10 +53,11 @@ export default {
type: 'input',
},
{
label: '来源id',
label: '订单号',
prop: 'sourceId',
type: 'input',
overHidden: true,
search: true,
},
{
label: '来源详情',

View File

@@ -27,7 +27,15 @@ export default {
prop: 'accountId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '佣金账户',
prop: 'commissionAccount',
type: 'input',
overHidden: true,
},
{
label: '变动金额',
prop: 'amount',
@@ -61,6 +69,7 @@ export default {
prop: 'sourceId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '来源详情',

View File

@@ -28,13 +28,31 @@ export default {
type: 'input',
width: 120,
overHidden: true,
hide: true,
},
{
label: '佣金账户',
prop: 'commissionAccount',
type: 'input',
overHidden: true,
width: 120,
},
{
label: '用户id',
prop: 'userId',
type: 'input',
width: 120,
overHidden: true,
hide: true,
},
{
label: '用户账号',
prop: 'userAccount',
type: 'input',
overHidden: true,
width: 120,
search: true,
},
{
label: '变动金额',
@@ -52,6 +70,7 @@ export default {
label: '业务类型',
prop: 'sourceType',
type: 'input',
width: 120,
},
{
label: '来源id',
@@ -59,6 +78,7 @@ export default {
type: 'input',
width: 120,
overHidden: true,
hide: true,
},
{
label: '来源详情',

View File

@@ -27,12 +27,29 @@ export default {
prop: 'accountId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '佣金账户',
prop: 'commissionAccount',
type: 'input',
overHidden: true,
},
{
label: '用户id',
prop: 'userId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '用户账号',
prop: 'userAccount',
type: 'input',
overHidden: true,
search: true,
},
{
label: '变动金额',
@@ -54,6 +71,7 @@ export default {
prop: 'sourceId',
type: 'input',
overHidden: true,
hide: true,
},
{
label: '来源详情',

View File

@@ -0,0 +1,131 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtn: false,
selection: false,
menu : false,
dialogClickModal: false,
column: [
{
label: "",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "用户ID",
prop: "userId",
type: "input",
hide: true,
},
{
label: "升级前等级",
prop: "lastLevel",
type: "input",
hide: true,
},
{
label: '用户账号',
prop: 'account',
type: 'input',
search: true,
overHidden: true,
},
{
label: "当前等级ID",
prop: "currentLevelId",
type: "input",
hide: true,
},
{
label: "等级名称",
prop: "currentLevelName",
type: "input",
},
{
label: "升级日期",
prop: "upgradeDate",
type: "input",
},
{
label: "升级详情备注",
prop: "remarks",
type: "input",
overHidden: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -0,0 +1,156 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtn: true,
selection: false,
dialogClickModal: false,
column: [
{
label: "",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "等级类型",
prop: "type",
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=market_upgrade_type',
props: {
label: 'dictValue',
value: 'dictKey',
},
dataType: 'number',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "等级名称",
prop: "levelName",
type: "input",
},
{
label: "直推人数要求",
prop: "directRecommend",
type: "input",
},
{
label: "业绩/福利值要求",
prop: "requirementValue",
type: "input",
},
{
label: "加速或分红比例",
prop: "rewardRate",
type: "input",
},
{
label: "等级详细说明",
prop: "description",
type: "input",
overHidden: true,
},
{
label: "",
prop: "sortOrder",
type: "input",
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "下一个等级的ID",
prop: "nextLevelId",
type: "input",
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "是否拥有下一级",
prop: "hasNextLevel",
type: "input",
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -0,0 +1,131 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtn: false,
selection: false,
menu : false,
dialogClickModal: false,
column: [
{
label: "",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "用户ID",
prop: "userId",
type: "input",
hide: true,
},
{
label: "升级前等级",
prop: "lastLevel",
type: "input",
hide: true,
},
{
label: '用户账号',
prop: 'account',
type: 'input',
search: true,
overHidden: true,
},
{
label: "当前等级ID",
prop: "currentLevelId",
type: "input",
hide: true,
},
{
label: "等级名称",
prop: "currentLevelName",
type: "input",
},
{
label: "升级日期",
prop: "upgradeDate",
type: "input",
},
{
label: "升级详情备注",
prop: "remarks",
type: "input",
overHidden: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -20,8 +20,16 @@ export default {
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: '用户账号',
prop: 'account',
type: 'input',
search: true,
},
{
label: '佣金金额',
prop: 'amount',

View File

@@ -26,7 +26,17 @@ export default {
label: '用户id',
prop: 'userId',
type: 'input',
hide: true,
},
{
label: '用户账号',
prop: 'account',
type: 'input',
search: true,
overHidden: true,
},
{
label: '金额',
prop: 'amount',
@@ -37,6 +47,11 @@ export default {
prop: 'lastAmount',
type: 'input',
},
{
label: '手续费',
prop: 'fee',
type: 'input',
},
{
label: '业务类型',
prop: 'sourceType',
@@ -72,6 +87,22 @@ export default {
type: 'input',
overHidden: true,
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
search: true,
searchRange: true,
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '备注',
prop: 'remark',

View File

@@ -0,0 +1,131 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtn: false,
selection: false,
menu : false,
dialogClickModal: false,
column: [
{
label: "",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "用户ID",
prop: "userId",
type: "input",
hide: true,
},
{
label: '用户账号',
prop: 'account',
type: 'input',
search: true,
overHidden: true,
},
{
label: "统计时间",
prop: "statDate",
type: "input",
},
{
label: "当前业绩",
prop: "performance",
type: "input",
},
{
label: "来源ID",
prop: "sourceId",
type: "input",
hide: true,
},
{
label: "来源详情",
prop: "sourceDetail",
type: "input",
overHidden: true,
},
{
label: "备注",
prop: "remarks",
type: "input",
overHidden: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "修改时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
]
}

View File

@@ -0,0 +1,414 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.order_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<el-button type="warning"
plain
icon="el-icon-download"
@click="openExportBox">导 出 订 单
</el-button>
<!-- <el-button type="success"-->
<!-- plain-->
<!-- icon="el-icon-upload"-->
<!-- @click="openImportOrderBox">批 量 导 入 补 单-->
<!-- </el-button>-->
</template>
<template #menu="{ row }">
<el-button type="text"
icon="el-icon-circle-check"
v-if="row.paymentType === 99 && row.orderStatus === 0"
@click.stop="handleConfirm(row)">确认收款
</el-button>
<el-button type="text"
icon="el-icon-takeaway-box"
v-if="row.orderStatus === 1"
@click.stop="handleExpressTrack(row)">填写物流
</el-button>
</template>
</avue-crud>
<el-dialog :title="`导出用户订单`" append-to-body v-model="exportOrderBox" width="1000px">
<avue-form
:option="exportOrderOption"
:data="exportOrderData"
v-model="exportOrderFrom"
@submit="exportOrderSubmit"
ref="stateCrud"
/>
</el-dialog>
<el-dialog title="批量导入补单" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="excelUploadAfter">
<template #excelTemplate>
<el-button type="primary" @click="handleTemplate">
点击下载<i class="el-icon-download el-icon--right"></i>
</el-button>
</template>
</avue-form>
</el-dialog>
</basic-container>
</template>
<script>
import {getEcoOrderList, getDetail, add, update, remove, confirmPayment, fillExpress} from "@/api/common/commonUserOrder";
import option from "@/option/common/commonUserOrder";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: [],
exportOrderBox: false,
exportOrderOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '用户账号',
prop: 'account',
type: 'input',
},
{
label: "订单状态",
prop: "orderStatus",
type: 'select',
dicUrl: '/blade-system/dict/dictionary?code=app_order_status',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
searchRange: true,
rules: [
{ required: true, message: "时间范围不能为空", trigger: "blur" }
],
},
],
},
exportOrderData: '',
exportOrderFrom: {},
excelBox: false,
excelForm: {},
excelOption: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: '上传补单',
labelWidth: 200,
prop: 'excelFile',
type: 'upload',
drag: true,
loadText: '模板上传中,请稍等',
span: 24,
propsHttp: {
res: 'data',
},
tip: '请上传 .xls,.xlsx 标准格式文件',
action: '/common/order/import-user-back-order',
},
],
},
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.order_add, false),
viewBtn: this.validData(this.permission.order_view, false),
delBtn: this.validData(this.permission.order_delete, false),
editBtn: this.validData(this.permission.order_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/user-order/order/export-order?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `用户订单${dateNow()}.xlsx`);
NProgress.done();
})
});
},
handleConfirm(row) {
this.$confirm('确认已经收到货款吗?', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
return confirmPayment(row);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!'
});
});
},
handleExpressTrack(row) {
this.$prompt('请输入快递单号', '快递信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPlaceholder: '例如:EE123456789CN',
// inputPattern: /^[a-zA-Z0-9]{8,20}$/, // 可选:正则校验
// inputErrorMessage: '快递单号格式不正确'
}).then(({ value }) => {
fillExpress(row.id, value)
// 用户点击“确定”
console.log('用户输入:', value);
// 在这里处理你的逻辑,比如调用 API
}).catch(() => {
// 用户点击“取消”或关闭弹窗
this.$message.info('已取消输入');
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
getEcoOrderList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
openExportBox(){
this.exportOrderBox = true;
},
exportOrderSubmit(form, done){
NProgress.start();
exportBlob(
`/common/order/export-eco-order-excel?${
this.website.tokenHeader
}=${getToken()}&orderStatus=${form.orderStatus != null ? form.orderStatus : ''}&searchDateRange=${form.searchDateRange}&account=${form.account != null ? form.account : ''}`
).then(res => {
console.log("打印:" , res)
downloadXls(res.data, `生态产品订单${this.$dayjs().format('YYYY-MM-DD')}.xlsx`);
NProgress.done();
});
done();
this.exportOrderBox = false;
},
openImportOrderBox(){
this.excelBox = true;
},
excelUploadAfter(res, done, loading, column) {
window.console.log(column);
if (res.length) {
const errMsg = res
.map(
(item, idx) =>
`${idx + 1}. ${item.errorMsg} 订单号: ${item.orderNo} 金额: ${item.amount}`
)
.join('<br><br>');
this.$alert(errMsg, '导入失败', {
confirmButtonText: '我知道了',
type: 'error',
dangerouslyUseHTMLString: true, //
customClass: 'alert-error-list', //
});
}
this.excelBox = false;
done();
},
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,678 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.order_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<el-button type="warning"
plain
icon="el-icon-download"
@click="openExportBox">导 出 订 单
</el-button>
</template>
<template #menu="{ row }">
<el-button type="text"
icon="el-icon-takeaway-box"
v-if="row.orderStatus === 1"
@click.stop="confirmItineraryBtn(row)">确认行程
</el-button>
<el-button type="text"
icon="el-icon-circle-check"
v-if="row.paymentStatus === 1 && row.guidePhone === '' && row.guideName === ''"
@click.stop="openGuideInfo(row)">添加导游
</el-button>
<el-button type="text"
icon="el-icon-circle-check"
v-if="row.paymentStatus === 1 && row.contractStatus === 0 "
@click.stop="handleContractUrl(row)">添加合同
</el-button>
<el-button type="text"
icon="el-icon-circle-check"
@click.stop="openUserTourInfo(row)">出行人详情
</el-button>
<el-button type="text"
icon="el-icon-circle-check"
@click.stop="openTourProductInfo(row)">产品详情
</el-button>
</template>
</avue-crud>
<el-dialog :title="`导出用户订单`" append-to-body v-model="exportOrderBox" width="1000px">
<avue-form
:option="exportOrderOption"
:data="exportOrderData"
v-model="exportOrderFrom"
@submit="exportOrderSubmit"
ref="stateCrud"
/>
</el-dialog>
<el-dialog title="批量导入补单" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="excelUploadAfter">
<template #excelTemplate>
<el-button type="primary" @click="handleTemplate">
点击下载<i class="el-icon-download el-icon--right"></i>
</el-button>
</template>
</avue-form>
</el-dialog>
<el-dialog :title="`添加导游信息`" append-to-body v-model="guideInfoBox" width="1000px">
<avue-form
:option="guideInfoOption"
:data="guideInfoData"
v-model="guideInfoFrom"
@submit="guideInfoSubmit"
ref="stateCrud"
/>
</el-dialog>
<el-drawer :title="`账户 [${userAccount}] 出行信息`" v-model="userTourInfoBox" :direction="direction" append-to-body
size="850px">
<basic-container>
<avue-crud :option="userTourInfoOption"
:data="userTourInfoData"
ref="crudSub"
>
</avue-crud>
</basic-container>
</el-drawer>
<el-drawer :title="`账户 [${userAccount}] 旅游团信息`" v-model="tourProductInfoBox" :direction="direction" append-to-body
size="850px">
<basic-container>
<avue-crud :option="tourProductInfoOption"
:data="tourProductInfoData"
ref="crudSub"
>
</avue-crud>
</basic-container>
</el-drawer>
</basic-container>
</template>
<script>
import {
getTourOrderList,
getDetail,
add,
update,
remove,
confirmGuideInfo,
fillExpress,
fillContractUrl,
confirmItinerary
} from '@/api/common/commonUserOrder';
import option from "@/option/common/commonUserTourOrder";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: [],
exportOrderBox: false,
exportOrderOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '用户账号',
prop: 'account',
type: 'input',
},
{
label: "订单状态",
prop: "orderStatus",
type: 'select',
dicUrl: '/blade-system/dict/dictionary?code=app_order_status',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
searchRange: true,
rules: [
{ required: true, message: "时间范围不能为空", trigger: "blur" }
],
},
],
},
exportOrderData: '',
exportOrderFrom: {},
excelBox: false,
excelForm: {},
excelOption: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: '上传补单',
labelWidth: 200,
prop: 'excelFile',
type: 'upload',
drag: true,
loadText: '模板上传中,请稍等',
span: 24,
propsHttp: {
res: 'data',
},
tip: '请上传 .xls,.xlsx 标准格式文件',
action: '/common/order/import-user-back-order',
},
],
},
guideInfoBox: false,
guideInfoOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '导游名字',
prop: 'guideName',
type: 'input',
rules: [
{ required: true, message: "导游名字不能为空", trigger: "blur" }
],
},
{
label: '导游手机号',
prop: 'guidePhone',
type: 'input',
rules: [
{ required: true, message: "导游手机号不能为空", trigger: "blur" }
],
},
],
},
guideInfoData: '',
guideInfoFrom: {
orderDetailId: '',
},
userAccount : "",
direction : "rtl",
userTourInfoBox: false,
userTourInfoOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '姓名',
prop: 'userName',
type: 'input',
overHidden: true,
},
{
label: '手机号',
prop: 'contactPhone',
type: 'input',
overHidden: true,
},
{
label: '身份证',
prop: 'idCardNo',
type: 'input',
width : 140,
overHidden: true,
},
{
label: '护照',
prop: 'passportNo',
type: 'input',
width : 140,
},
{
label: '港澳通行证号码',
prop: 'hkMacauPassNo',
type: 'input',
width : 140,
},
{
label: '备注偏好',
prop: 'remark',
type: 'input',
width : 140,
overHidden: true,
},
],
},
userTourInfoData : [],
tourProductInfoBox: false,
tourProductInfoOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '产品名',
prop: 'productName',
type: 'input',
overHidden: true,
},
{
label: '标题',
prop: 'subTitle',
type: 'input',
overHidden: true,
},
{
label: '略缩图',
prop: 'thumbnailUrl',
type: 'input',
width : 140,
overHidden: true,
},
{
label: '基础价',
prop: 'basePrice',
type: 'input',
width : 140,
},
{
label: '成人价',
prop: 'adultPrice',
type: 'input',
width : 140,
},
{
label: '儿童价',
prop: 'childPrice',
type: 'input',
width : 140,
},
{
label: '老年价',
prop: 'elderlyPrice',
type: 'input',
width : 140,
},
],
},
tourProductInfoData : [],
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.order_add, false),
viewBtn: this.validData(this.permission.order_view, false),
delBtn: this.validData(this.permission.order_delete, false),
editBtn: this.validData(this.permission.order_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/user-order/order/export-order?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `用户订单${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
getTourOrderList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
openExportBox(){
this.exportOrderBox = true;
},
exportOrderSubmit(form, done){
NProgress.start();
exportBlob(
`/common/order/export-tour-order-to-excel?${
this.website.tokenHeader
}=${getToken()}&orderStatus=${form.orderStatus != null ? form.orderStatus : ''}&searchDateRange=${form.searchDateRange}&account=${form.account != null ? form.account : ''}`
).then(res => {
console.log("打印:" , res)
downloadXls(res.data, `用户订单表${this.$dayjs().format('YYYY-MM-DD')}.xlsx`);
NProgress.done();
});
done();
this.exportOrderBox = false;
},
openImportOrderBox(){
this.excelBox = true;
},
excelUploadAfter(res, done, loading, column) {
window.console.log(column);
if (res.length) {
const errMsg = res
.map(
(item, idx) =>
`${idx + 1}. ${item.errorMsg} 订单号: ${item.orderNo} 金额: ${item.amount}`
)
.join('<br><br>');
this.$alert(errMsg, '导入失败', {
confirmButtonText: '我知道了',
type: 'error',
dangerouslyUseHTMLString: true, //
customClass: 'alert-error-list', //
});
}
this.excelBox = false;
done();
},
openGuideInfo(row){
this.guideInfoBox = true;
this.guideInfoFrom.orderDetailId = row.orderDetailId;
},
guideInfoSubmit(form, done){
const data = {
id: form.orderDetailId,
guideName: form.guideName,
guidePhone: form.guidePhone,
};
confirmGuideInfo(data).then(
() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
done();
this.guideInfoBox = false;
this.guideInfoFrom = {
orderDetailId: '',
guideName: '',
guidePhone: '',
};
},
error => {
done();
this.guideInfoBox = false;
console.log(error);
}
);
},
handleContractUrl(row) {
this.$prompt('请输入合同连接', '合同信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPlaceholder: '例如:https://qian.tencent.com',
// inputPattern: /^[a-zA-Z0-9]{8,20}$/, // 可选:正则校验
// inputErrorMessage: '快递单号格式不正确'
}).then(({ value }) => {
fillContractUrl(row.orderDetailId, value)
// 用户点击“确定”
console.log('用户输入:', value);
// 在这里处理你的逻辑,比如调用 API
}).catch(() => {
// 用户点击“取消”或关闭弹窗
this.$message.info('已取消输入');
});
},
openUserTourInfo(row){
this.userTourInfoBox = true;
this.userAccount = row.account;
this.userTourInfoData = row.travelerDetail;
},
openTourProductInfo(row){
this.tourProductInfoBox = true;
this.userAccount = row.account;
this.tourProductInfoData = row.productSnapshot;
},
confirmItineraryBtn(row){
this.$confirm("是否确认行程?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return confirmItinerary(row.orderId);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
}
};
</script>
<style>
</style>

View File

@@ -19,7 +19,7 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<!-- <template #menu-left>-->
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
@@ -31,7 +31,18 @@
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- </template>-->
<el-button type="warning"
plain
icon="el-icon-download"
@click="openExportBox">导 出 订 单
</el-button>
<el-button type="success"
plain
icon="el-icon-upload"
@click="openImportOrderBox">批 量 导 入 补 单
</el-button>
</template>
<template #menu="{ row }">
<el-button type="text"
icon="el-icon-circle-check"
@@ -45,6 +56,27 @@
</el-button>
</template>
</avue-crud>
<el-dialog :title="`导出用户订单`" append-to-body v-model="exportOrderBox" width="1000px">
<avue-form
:option="exportOrderOption"
:data="exportOrderData"
v-model="exportOrderFrom"
@submit="exportOrderSubmit"
ref="stateCrud"
/>
</el-dialog>
<el-dialog title="批量导入补单" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="excelUploadAfter">
<template #excelTemplate>
<el-button type="primary" @click="handleTemplate">
点击下载<i class="el-icon-download el-icon--right"></i>
</el-button>
</template>
</avue-form>
</el-dialog>
</basic-container>
</template>
@@ -73,7 +105,75 @@ import {getList, getDetail, add, update, remove, confirmPayment, fillExpress} fr
},
selectionList: [],
option: option,
data: []
data: [],
exportOrderBox: false,
exportOrderOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '用户账号',
prop: 'account',
type: 'input',
},
{
label: "订单状态",
prop: "orderStatus",
type: 'select',
dicUrl: '/blade-system/dict/dictionary?code=app_order_status',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
searchRange: true,
rules: [
{ required: true, message: "时间范围不能为空", trigger: "blur" }
],
},
],
},
exportOrderData: '',
exportOrderFrom: {},
excelBox: false,
excelForm: {},
excelOption: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: '上传补单',
labelWidth: 200,
prop: 'excelFile',
type: 'upload',
drag: true,
loadText: '模板上传中,请稍等',
span: 24,
propsHttp: {
res: 'data',
},
tip: '请上传 .xls,.xlsx 标准格式文件',
action: '/common/order/import-user-back-order',
},
],
},
};
},
computed: {
@@ -199,9 +299,9 @@ import {getList, getDetail, add, update, remove, confirmPayment, fillExpress} fr
this.$prompt('请输入快递单号', '快递信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPlaceholder: '例如:SF123456789CN',
inputPattern: /SF\d{10,}/, // 可选:正则校验
inputErrorMessage: '快递单号格式不正确'
inputPlaceholder: '例如:EE123456789CN',
// inputPattern: /^[a-zA-Z0-9]{8,20}$/, // 可选:正则校验
// inputErrorMessage: '快递单号格式不正确'
}).then(({ value }) => {
fillExpress(row.id, value)
// 用户点击“确定”
@@ -256,7 +356,56 @@ import {getList, getDetail, add, update, remove, confirmPayment, fillExpress} fr
this.loading = false;
this.selectionClear();
});
}
},
openExportBox(){
this.exportOrderBox = true;
},
exportOrderSubmit(form, done){
NProgress.start();
exportBlob(
`/common/order/export-order-to-excel?${
this.website.tokenHeader
}=${getToken()}&orderStatus=${form.orderStatus != null ? form.orderStatus : ''}&searchDateRange=${form.searchDateRange}&account=${form.account != null ? form.account : ''}`
).then(res => {
console.log("打印:" , res)
downloadXls(res.data, `用户订单表${this.$dayjs().format('YYYY-MM-DD')}.xlsx`);
NProgress.done();
});
done();
this.exportOrderBox = false;
},
openImportOrderBox(){
this.excelBox = true;
},
excelUploadAfter(res, done, loading, column) {
window.console.log(column);
if (res.length) {
const errMsg = res
.map(
(item, idx) =>
`${idx + 1}. ${item.errorMsg} 订单号: ${item.orderNo} 金额: ${item.amount}`
)
.join('<br><br>');
this.$alert(errMsg, '导入失败', {
confirmButtonText: '我知道了',
type: 'error',
dangerouslyUseHTMLString: true, //
customClass: 'alert-error-list', //
});
}
this.excelBox = false;
done();
},
}
};
</script>

View File

@@ -33,8 +33,26 @@
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<el-button type="warning"
plain
icon="el-icon-download"
@click="openExportBox">导 出 流 水
</el-button>
</template>
</avue-crud>
<el-dialog :title="`导出用户积分流水`" append-to-body v-model="exportFlowBox" width="1000px">
<avue-form
:option="exportFlowOption"
:data="exportFlowData"
v-model="exportFlowFrom"
@submit="exportFlowSubmit"
ref="stateCrud"
/>
</el-dialog>
</basic-container>
</template>
@@ -64,6 +82,40 @@ export default {
selectionList: [],
option: option,
data: [],
exportFlowBox: false,
exportFlowOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '账号',
prop: 'account',
type: 'input',
rules: [
{ required: true, message: "账号不能为空", trigger: "blur" }
],
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
searchRange: true,
rules: [
{ required: true, message: "时间范围不能为空", trigger: "blur" }
],
},
],
},
exportFlowData: '',
exportFlowFrom: {},
};
},
computed: {
@@ -225,6 +277,25 @@ export default {
this.selectionClear();
});
},
openExportBox(){
this.exportFlowBox = true;
},
exportFlowSubmit(form, done){
NProgress.start();
exportBlob(
`/common/user-point-log/exportFlowToExcel?${
this.website.tokenHeader
}=${getToken()}&account=${form.account}&searchDateRange=${form.searchDateRange}`
).then(res => {
downloadXls(res.data, `用户积分流水表${this.$dayjs().format('YYYY-MM-DD')}.xlsx`);
NProgress.done();
});
this.exportFlowBox = false;
done();
},
},
};
</script>

View File

@@ -0,0 +1,225 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.culturalTourismSpot_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/common/culturalTourismSpot";
import option from "@/option/common/culturalTourismSpot";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.culturalTourismSpot_add, false),
viewBtn: this.validData(this.permission.culturalTourismSpot_view, false),
delBtn: this.validData(this.permission.culturalTourismSpot_delete, false),
editBtn: this.validData(this.permission.culturalTourismSpot_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/common/tourism-spot/culturalTourismSpot/export-culturalTourismSpot?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `文旅景点信息${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,235 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.merchantFlagshipStore_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/common/merchantFlagshipStore";
import option from "@/option/common/merchantFlagshipStore";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.merchantFlagshipStore_add, false),
viewBtn: this.validData(this.permission.merchantFlagshipStore_view, false),
delBtn: this.validData(this.permission.merchantFlagshipStore_delete, false),
editBtn: this.validData(this.permission.merchantFlagshipStore_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/common/merchant-store/merchantFlagshipStore/export-merchantFlagshipStore?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `商家旗舰店信息${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
this.form.provinceId = res.data.data.provinceId + "";
this.form.cityId = res.data.data.cityId + "";
this.form.regionsId = res.data.data.regionsId + "";
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.data.forEach(storeRes => {
storeRes.addressDetail = storeRes.regionName + storeRes.fullAddress
})
this.loading = false;
this.selectionClear();
});
},
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,225 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.newsCategory_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/common/newsCategory";
import option from "@/option/common/newsCategory";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.newsCategory_add, false),
viewBtn: this.validData(this.permission.newsCategory_view, false),
delBtn: this.validData(this.permission.newsCategory_delete, false),
editBtn: this.validData(this.permission.newsCategory_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/common/news-category/newsCategory/export-newsCategory?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `资讯分类${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,263 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.newsContent_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/common/newsContent";
import option from "@/option/common/newsContent";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
watch: {
'form.contentType'(val) {
let videoUrl = this.findObject(this.option.column, "videoUrl");
let playCount = this.findObject(this.option.column, "playCount");
let thumbnailUrl = this.findObject(this.option.column, "thumbnailUrl");
let mainImageUrl = this.findObject(this.option.column, "mainImageUrl");
let detailImages = this.findObject(this.option.column, "detailImages");
let articleContent = this.findObject(this.option.column, "articleContent");
let viewCount = this.findObject(this.option.column, "viewCount");
if (val === 0) {
videoUrl.display = false;
this.form.videoUrl = ""
playCount.display = false;
thumbnailUrl.display = true;
mainImageUrl.display = true;
detailImages.display = true;
articleContent.display = true;
viewCount.display = true;
}
if (val === 1) {
videoUrl.display = true;
this.form.videoUrl = ""
playCount.display = true;
thumbnailUrl.display = false;
mainImageUrl.display = false;
detailImages.display = false;
articleContent.display = false;
viewCount.display = false;
}
}
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.newsContent_add, false),
viewBtn: this.validData(this.permission.newsContent_view, false),
delBtn: this.validData(this.permission.newsContent_delete, false),
editBtn: this.validData(this.permission.newsContent_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/common/news-content/newsContent/export-newsContent?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `资讯内容${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,228 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.tourProduct_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/common/tourProduct";
import option from "@/option/common/tourProduct";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.tourProduct_add, false),
viewBtn: this.validData(this.permission.tourProduct_view, false),
delBtn: this.validData(this.permission.tourProduct_delete, false),
editBtn: this.validData(this.permission.tourProduct_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/common/tour-product/tourProduct/export-tourProduct?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `旅游产品${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
this.form.provinceId = res.data.data.provinceId + "";
this.form.cityId = res.data.data.cityId + "";
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,225 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.mallProduct_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/mall/directMall";
import option from "@/option/mall/directMall";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.mallProduct_add, false),
viewBtn: this.validData(this.permission.mallProduct_view, false),
delBtn: this.validData(this.permission.mallProduct_delete, false),
editBtn: this.validData(this.permission.mallProduct_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/blade-mallproduct/mallProduct/export-mallProduct?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `商城商品${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,225 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.mallProduct_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/mall/ecosystemProduct";
import option from "@/option/mall/ecosystemProduct";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.mallProduct_add, false),
viewBtn: this.validData(this.permission.mallProduct_view, false),
delBtn: this.validData(this.permission.mallProduct_delete, false),
editBtn: this.validData(this.permission.mallProduct_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/blade-mallproduct/mallProduct/export-mallProduct?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `商城商品${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -37,8 +37,8 @@
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/mall/mallProduct";
import option from "@/option/mall/mallProduct";
import {getList, getDetail, add, update, remove} from "@/api/mall/directMall";
import option from "@/option/mall/directMall";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';

View File

@@ -1,225 +1,464 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.userMarketBenefitPackage_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.userMarketBenefitPackage_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<el-button type="success" plain icon="el-icon-upload" @click="importBenefitPackage">
批量导入福利包
</el-button>
<el-button type="success" plain icon="el-icon-upload" @click="openGivePack">
划拨福利包
</el-button>
</template>
<template #menu="{ row }">
<el-button
type="text"
icon="el-icon-document"
size="small"
v-if="row.type === 2 && row.status === 2 && row.outDay === 0"
@click="revokeBenefitPackage(row)">
撤销福利包
</el-button>
</template>
</avue-crud>
<el-dialog :title="`划拨积分包`" append-to-body v-model="givePackBox" width="1000px">
<avue-form
:option="givePackOption"
:data="givePackData"
v-model="givePackFrom"
@submit="allocatePackageSubmit"
ref="stateCrud"
/>
</el-dialog>
<el-dialog title="用户福利包导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="excelUploadAfter">
<template #excelTemplate>
<el-button type="primary" @click="handleTemplate">
点击下载<i class="el-icon-download el-icon--right"></i>
</el-button>
</template>
</avue-form>
</el-dialog>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketBenefitPackage";
import option from "@/option/market/marketBenefitPackage";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove , revokeBenefitPackInfo} from '@/api/market/marketBenefitPackage';
import option from '@/option/market/marketBenefitPackage';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { allocatePackage } from '@/api/market/marketBenefitPackageTemplate';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
givePackBox: false,
givePackOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '福利包',
prop: 'packId',
type: 'select',
props: {
label: 'name',
value: 'code'
},
dicUrl: `/api/market/benefit-package-template/list`,
dicFormatter: (res) => {
console.log("打印原始数据:",res);
const list = res.data.records || res || [];
// 2. 使用 map 遍历数组,将 packageName -> name, id -> code
return list.map(item => {
return {
name: item.packageName, // 把后端的 packageName 赋值给 name
code: item.id // 把后端的 id 赋值给 code
};
});
},
rules: [
{
required: true,
message: '请选择福利包',
trigger: 'blur'
}
]
},
{
label: '账号',
prop: 'userPhone',
type: 'input',
rules: [
{ required: true, message: "账号不能为空", trigger: "blur" }
],
},
{
label: '划拨数量',
prop: 'giveNumber',
type: 'number',
value : 1,
rules: [
{ required: true, message: "划拨数量不能为空", trigger: "blur" }
],
},
{
label: '备注',
prop: 'remark',
type: 'input',
rules: [
{ required: true, message: "备注不能为空", trigger: "blur" }
],
},
],
},
givePackData: '',
givePackFrom: {
id: '',
},
excelBox: false,
excelForm: {},
excelOption: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: '上传用户福利包',
labelWidth: 200,
prop: 'excelFile',
type: 'upload',
drag: true,
loadText: '模板上传中,请稍等',
span: 24,
propsHttp: {
res: 'data',
},
tip: '请上传 .xls,.xlsx 标准格式文件',
action: '/market/benefit-package-template/import-benefit-package',
},
],
},
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.userMarketBenefitPackage_add, false),
viewBtn: this.validData(this.permission.userMarketBenefitPackage_view, false),
delBtn: this.validData(this.permission.userMarketBenefitPackage_delete, false),
editBtn: this.validData(this.permission.userMarketBenefitPackage_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.userMarketBenefitPackage_add, false),
viewBtn: this.validData(this.permission.userMarketBenefitPackage_view, false),
delBtn: this.validData(this.permission.userMarketBenefitPackage_delete, false),
editBtn: this.validData(this.permission.userMarketBenefitPackage_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `/blade-usermarketbenefitpackage/userMarketBenefitPackage/export-userMarketBenefitPackage?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `用户积分包信息表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/blade-usermarketbenefitpackage/userMarketBenefitPackage/export-userMarketBenefitPackage?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `用户积分包信息表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
phone : params.phone,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
openGivePack() {
this.givePackBox = true;
},
allocatePackageSubmit(form, done) {
console.log("备注长度:",form.remark.length);
if (form.remark.length < 5){
this.$message({
type: 'warning',
message: '备注不少于5个字',
});
return
}
const data = {
packId: form.packId,
phone: form.userPhone,
giveNumber: form.giveNumber,
remark: form.remark,
};
allocatePackage(data).then(
() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
done();
this.givePackBox = false;
this.givePackFrom = {
id: '',
userPhone: '',
giveNumber: '',
remark: '',
};
},
error => {
done();
this.givePackBox = false;
console.log(error);
}
);
},
importBenefitPackage() {
this.excelBox = true;
},
excelUploadAfter(res, done, loading, column) {
window.console.log(column);
if (res.length) {
const errMsg = res
.map(
(item, idx) =>
`${idx + 1}. ${item.errorMsg} 账户: ${item.account} 福利包: ${item.benefitPackage}`
)
.join('<br><br>');
this.$alert(errMsg, '导入失败', {
confirmButtonText: '我知道了',
type: 'error',
dangerouslyUseHTMLString: true, //
customClass: 'alert-error-list', //
});
}
this.excelBox = false;
done();
},
revokeBenefitPackage(row){
this.$confirm('确定将划拨的福利包撤回吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return revokeBenefitPackInfo(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
});
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,225 +1,304 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.userMarketBenefitPackageLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.userMarketBenefitPackageLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<el-button type="warning"
plain
icon="el-icon-download"
@click="openExportBox">导 出 划 拨 记 录
</el-button>
</template>
</avue-crud>
<el-dialog :title="`导出福利积分流水`" append-to-body v-model="exportFlowBox" width="1000px">
<avue-form
:option="exportFlowOption"
:data="exportFlowData"
v-model="exportFlowFrom"
@submit="exportFlowSubmit"
ref="stateCrud"
/>
</el-dialog>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketBenefitPackageLog";
import option from "@/option/market/marketBenefitPackageLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove } from '@/api/market/marketBenefitPackageLog';
import option from '@/option/market/marketBenefitPackageLog';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
exportFlowBox: false,
exportFlowOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '账号',
prop: 'account',
type: 'input',
rules: [
{ required: true, message: "账号不能为空", trigger: "blur" }
],
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
searchRange: true,
rules: [
{ required: true, message: "时间范围不能为空", trigger: "blur" }
],
},
],
},
exportFlowData: '',
exportFlowFrom: {},
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.userMarketBenefitPackageLog_add, false),
viewBtn: this.validData(this.permission.userMarketBenefitPackageLog_view, false),
delBtn: this.validData(this.permission.userMarketBenefitPackageLog_delete, false),
editBtn: this.validData(this.permission.userMarketBenefitPackageLog_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.userMarketBenefitPackageLog_add, false),
viewBtn: this.validData(this.permission.userMarketBenefitPackageLog_view, false),
delBtn: this.validData(this.permission.userMarketBenefitPackageLog_delete, false),
editBtn: this.validData(this.permission.userMarketBenefitPackageLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `/blade-usermarketbenefitpackagelog/userMarketBenefitPackageLog/export-userMarketBenefitPackageLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `划拨积分记录${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/blade-usermarketbenefitpackagelog/userMarketBenefitPackageLog/export-userMarketBenefitPackageLog?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `划拨积分记录${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
phone: params.phone,
searchDateRange : params.searchDateRange,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
openExportBox(){
this.exportFlowBox = true;
},
exportFlowSubmit(form, done){
NProgress.start();
exportBlob(
`/market/benefit-package-log/exportFlowToExcel?${
this.website.tokenHeader
}=${getToken()}&account=${form.account}&searchDateRange=${form.searchDateRange}`
).then(res => {
downloadXls(res.data, `划拨福利包记录表${this.$dayjs().format('YYYY-MM-DD')}.xlsx`);
NProgress.done();
});
this.exportFlowBox = false;
done();
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -34,15 +34,15 @@
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<el-button type="success" plain icon="el-icon-upload" @click="importBenefitPackage"
>批量导入福利包
</el-button>
<!-- <el-button type="success" plain icon="el-icon-upload" @click="importBenefitPackage"-->
<!-- >批量导入福利包-->
<!-- </el-button>-->
</template>
<template #menu="{ row }">
<el-button type="text" icon="el-icon-document" size="small" @click="openGivePack(row)"
>划拨福利包
</el-button>
<!-- <el-button type="text" icon="el-icon-document" size="small" @click="openGivePack(row)"-->
<!-- >划拨福利包-->
<!-- </el-button>-->
</template>
</avue-crud>
@@ -111,20 +111,29 @@ export default {
labelWidth: 200,
column: [
{
label: '账户',
label: '账号',
prop: 'userPhone',
type: 'input',
rules: [
{ required: true, message: "账号不能为空", trigger: "blur" }
],
},
{
label: '划拨数量',
prop: 'giveNumber',
type: 'input',
type: 'number',
rules: [
{ required: true, message: "划拨数量不能为空", trigger: "blur" }
],
},
{
label: '备注',
prop: 'remark',
type: 'input',
rules: [
{ required: true, message: "备注不能为空", trigger: "blur" }
],
},
],
},

View File

@@ -73,7 +73,6 @@ import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { doGivePack } from '@/api/market/marketBenefitPackageTemplate';
export default {
data() {

View File

@@ -33,8 +33,26 @@
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<el-button type="warning"
plain
icon="el-icon-download"
@click="openExportBox">导 出 流 水
</el-button>
</template>
</avue-crud>
<el-dialog :title="`导出福利积分流水`" append-to-body v-model="exportFlowBox" width="1000px">
<avue-form
:option="exportFlowOption"
:data="exportFlowData"
v-model="exportFlowFrom"
@submit="exportFlowSubmit"
ref="stateCrud"
/>
</el-dialog>
</basic-container>
</template>
@@ -64,6 +82,40 @@ export default {
selectionList: [],
option: option,
data: [],
exportFlowBox: false,
exportFlowOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '账号',
prop: 'account',
type: 'input',
rules: [
{ required: true, message: "账号不能为空", trigger: "blur" }
],
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
searchRange: true,
rules: [
{ required: true, message: "时间范围不能为空", trigger: "blur" }
],
},
],
},
exportFlowData: '',
exportFlowFrom: {},
};
},
computed: {
@@ -212,9 +264,9 @@ export default {
this.loading = true;
const {} = this.query;
let values = {
account: params.account,
searchDateRange : params.searchDateRange,
};
getList(page.currentPage, page.pageSize, values).then(res => {
@@ -225,6 +277,25 @@ export default {
this.selectionClear();
});
},
openExportBox(){
this.exportFlowBox = true;
},
exportFlowSubmit(form, done){
NProgress.start();
exportBlob(
`/market/benefit-point-log/exportFlowToExcel?${
this.website.tokenHeader
}=${getToken()}&account=${form.account}&searchDateRange=${form.searchDateRange}`
).then(res => {
downloadXls(res.data, `用户福利值流水表${this.$dayjs().format('YYYY-MM-DD')}.xlsx`);
NProgress.done();
});
this.exportFlowBox = false;
done();
},
},
};
</script>

View File

@@ -33,8 +33,25 @@
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<el-button type="warning"
plain
icon="el-icon-download"
@click="openExportBox">导 出 流 水
</el-button>
</template>
</avue-crud>
<el-dialog :title="`导出现金券流水`" append-to-body v-model="exportFlowBox" width="1000px">
<avue-form
:option="exportFlowOption"
:data="exportFlowData"
v-model="exportFlowFrom"
@submit="exportFlowSubmit"
ref="stateCrud"
/>
</el-dialog>
</basic-container>
</template>
@@ -64,6 +81,40 @@ export default {
selectionList: [],
option: option,
data: [],
exportFlowBox: false,
exportFlowOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '账户',
prop: 'account',
type: 'input',
rules: [
{ required: true, message: "账号不能为空", trigger: "blur" }
],
},
{
label: "时间范围",
prop: "searchDateRange", // 关键点:这个prop将绑定一个数组
type: 'datetimerange',
format: 'YYYY-MM-DD hh:mm:ss',
valueFormat: 'YYYY-MM-DD hh:mm:ss',
searchRange: true,
rules: [
{ required: true, message: "时间范围不能为空", trigger: "blur" }
],
},
],
},
exportFlowData: '',
exportFlowFrom: {},
};
},
computed: {
@@ -225,6 +276,26 @@ export default {
this.selectionClear();
});
},
openExportBox(){
this.exportFlowBox = true;
},
exportFlowSubmit(form, done){
NProgress.start();
exportBlob(
`/market/cash-coupon-log/exportFlowToExcel?${
this.website.tokenHeader
}=${getToken()}&account=${form.account}&searchDateRange=${form.searchDateRange}`
).then(res => {
downloadXls(res.data, `用户现金券流水表${this.$dayjs().format('YYYY-MM-DD')}.xlsx`);
NProgress.done();
});
this.exportFlowBox = false;
done();
},
},
};
</script>

View File

@@ -0,0 +1,215 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketCashPerformanceLog";
import option from "@/option/market/marketCashPerformanceLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketCashPerformanceLog_add, false),
viewBtn: this.validData(this.permission.marketCashPerformanceLog_view, false),
delBtn: this.validData(this.permission.marketCashPerformanceLog_delete, false),
editBtn: this.validData(this.permission.marketCashPerformanceLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/market/cash-performance-log/marketCashPerformanceLog/export-marketCashPerformanceLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `现金业绩日志${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -1,225 +1,238 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionAdvertisingLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionAdvertisingLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketCommissionAdvertisingLog";
import option from "@/option/market/marketCommissionAdvertisingLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import {
getList,
getDetail,
add,
update,
remove,
} from '@/api/market/marketCommissionAdvertisingLog';
import option from '@/option/market/marketCommissionAdvertisingLog';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.marketCommissionAdvertisingLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionAdvertisingLog_view, false),
delBtn: this.validData(this.permission.marketCommissionAdvertisingLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionAdvertisingLog_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketCommissionAdvertisingLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionAdvertisingLog_view, false),
delBtn: this.validData(this.permission.marketCommissionAdvertisingLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionAdvertisingLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `//market-commission/advertising-log/marketCommissionAdvertisingLog/export-marketCommissionAdvertisingLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `5%广告补贴佣金流水表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `//market-commission/advertising-log/marketCommissionAdvertisingLog/export-marketCommissionAdvertisingLog?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `5%广告补贴佣金流水表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,225 +1,233 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionAgencyLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionAgencyLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketCommissionAgencyLog";
import option from "@/option/market/marketCommissionAgencyLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove } from '@/api/market/marketCommissionAgencyLog';
import option from '@/option/market/marketCommissionAgencyLog';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.marketCommissionAgencyLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionAgencyLog_view, false),
delBtn: this.validData(this.permission.marketCommissionAgencyLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionAgencyLog_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketCommissionAgencyLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionAgencyLog_view, false),
delBtn: this.validData(this.permission.marketCommissionAgencyLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionAgencyLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `//market-commission/agencyl-og/marketCommissionAgencyLog/export-marketCommissionAgencyLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `15%极差代理佣金流水表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `//market-commission/agencyl-og/marketCommissionAgencyLog/export-marketCommissionAgencyLog?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `15%极差代理佣金流水表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
userAccount : params.userAccount,
statisticalDate: params.statisticalDate,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,225 +1,232 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionCoCreatorLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionCoCreatorLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketCommissionCoCreatorLog";
import option from "@/option/market/marketCommissionCoCreatorLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove } from '@/api/market/marketCommissionCoCreatorLog';
import option from '@/option/market/marketCommissionCoCreatorLog';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.marketCommissionCoCreatorLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionCoCreatorLog_view, false),
delBtn: this.validData(this.permission.marketCommissionCoCreatorLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionCoCreatorLog_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketCommissionCoCreatorLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionCoCreatorLog_view, false),
delBtn: this.validData(this.permission.marketCommissionCoCreatorLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionCoCreatorLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `//market-commission/cocreator-log/marketCommissionCoCreatorLog/export-marketCommissionCoCreatorLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `5%联创佣金流水表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `//market-commission/cocreator-log/marketCommissionCoCreatorLog/export-marketCommissionCoCreatorLog?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `5%联创佣金流水表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
statisticalDate: params.statisticalDate,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,225 +1,239 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionDirectPushLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionDirectPushLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketCommissionDirectPushLog";
import option from "@/option/market/marketCommissionDirectPushLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import {
getList,
getDetail,
add,
update,
remove,
} from '@/api/market/marketCommissionDirectPushLog';
import option from '@/option/market/marketCommissionDirectPushLog';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.marketCommissionDirectPushLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionDirectPushLog_view, false),
delBtn: this.validData(this.permission.marketCommissionDirectPushLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionDirectPushLog_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketCommissionDirectPushLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionDirectPushLog_view, false),
delBtn: this.validData(this.permission.marketCommissionDirectPushLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionDirectPushLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `//market-commission/direct-push-log/marketCommissionDirectPushLog/export-marketCommissionDirectPushLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `10%直推人佣金流水表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `//market-commission/direct-push-log/marketCommissionDirectPushLog/export-marketCommissionDirectPushLog?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `10%直推人佣金流水表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
userAccount: params.userAccount,
statisticalDate: params.statisticalDate,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,225 +1,233 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionGoodsCostLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionGoodsCostLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketCommissionGoodsCostLog";
import option from "@/option/market/marketCommissionGoodsCostLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove } from '@/api/market/marketCommissionGoodsCostLog';
import option from '@/option/market/marketCommissionGoodsCostLog';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.marketCommissionGoodsCostLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionGoodsCostLog_view, false),
delBtn: this.validData(this.permission.marketCommissionGoodsCostLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionGoodsCostLog_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketCommissionGoodsCostLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionGoodsCostLog_view, false),
delBtn: this.validData(this.permission.marketCommissionGoodsCostLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionGoodsCostLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `//market-commission/goods-cost-log/marketCommissionGoodsCostLog/export-marketCommissionGoodsCostLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `25%商品成本佣金流水表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `//market-commission/goods-cost-log/marketCommissionGoodsCostLog/export-marketCommissionGoodsCostLog?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `25%商品成本佣金流水表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
sourceId: params.sourceId,
statisticalDate: params.statisticalDate,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,225 +1,232 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionOperationLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionOperationLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketCommissionOperationLog";
import option from "@/option/market/marketCommissionOperationLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove } from '@/api/market/marketCommissionOperationLog';
import option from '@/option/market/marketCommissionOperationLog';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.marketCommissionOperationLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionOperationLog_view, false),
delBtn: this.validData(this.permission.marketCommissionOperationLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionOperationLog_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketCommissionOperationLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionOperationLog_view, false),
delBtn: this.validData(this.permission.marketCommissionOperationLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionOperationLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `//market-commission/operation-log/marketCommissionOperationLog/export-marketCommissionOperationLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `5%运营佣金流水表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `//market-commission/operation-log/marketCommissionOperationLog/export-marketCommissionOperationLog?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `5%运营佣金流水表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
statisticalDate: params.statisticalDate,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,225 +1,239 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionServiceProviderLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionServiceProviderLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketCommissionServiceProviderLog";
import option from "@/option/market/marketCommissionServiceProviderLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import {
getList,
getDetail,
add,
update,
remove,
} from '@/api/market/marketCommissionServiceProviderLog';
import option from '@/option/market/marketCommissionServiceProviderLog';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.marketCommissionServiceProviderLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionServiceProviderLog_view, false),
delBtn: this.validData(this.permission.marketCommissionServiceProviderLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionServiceProviderLog_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketCommissionServiceProviderLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionServiceProviderLog_view, false),
delBtn: this.validData(this.permission.marketCommissionServiceProviderLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionServiceProviderLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `//market-commission/service-provider-log/marketCommissionServiceProviderLog/export-marketCommissionServiceProviderLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `5%服务商佣金流水表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `//market-commission/service-provider-log/marketCommissionServiceProviderLog/export-marketCommissionServiceProviderLog?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `5%服务商佣金流水表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
userAccount: params.userAccount,
statisticalDate: params.statisticalDate,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,225 +1,233 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionUserPointLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.marketCommissionUserPointLog_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketCommissionUserPointLog";
import option from "@/option/market/marketCommissionUserPointLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove } from '@/api/market/marketCommissionUserPointLog';
import option from '@/option/market/marketCommissionUserPointLog';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.marketCommissionUserPointLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionUserPointLog_view, false),
delBtn: this.validData(this.permission.marketCommissionUserPointLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionUserPointLog_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketCommissionUserPointLog_add, false),
viewBtn: this.validData(this.permission.marketCommissionUserPointLog_view, false),
delBtn: this.validData(this.permission.marketCommissionUserPointLog_delete, false),
editBtn: this.validData(this.permission.marketCommissionUserPointLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `//market-commission/user-point-log/marketCommissionUserPointLog/export-marketCommissionUserPointLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `30%购买人获取用户积分佣金流水表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `//market-commission/user-point-log/marketCommissionUserPointLog/export-marketCommissionUserPointLog?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `30%购买人获取用户积分佣金流水表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
userAccount: params.userAccount,
statisticalDate: params.statisticalDate,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -20,11 +20,11 @@
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<el-button type="warning"
plain
icon="el-icon-download"
@click="handleExport">导 出
</el-button>
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<el-button
type="info"
plain
@@ -35,12 +35,77 @@
</template>
<template #menu="{ row }">
<el-button type="text"
icon="el-icon-circle-check"
v-if="row.paymentType === 99 && row.orderStatus === 0"
@click.stop="handleConfirm(row)">团队详情
icon="el-icon-document"
@click.stop="benefitPackInfoOpen(row)">福利包信息
</el-button>
<el-button type="text"
icon="el-icon-document"
@click.stop="userPointInfoOpen(row)">查询积分
</el-button>
<el-button type="text"
icon="el-icon-document"
@click.stop="userMallSpendOpen(row)">累计消费
</el-button>
<el-button type="text"
icon="el-icon-document"
@click.stop="userPerformanceOpen(row)">查询业绩
</el-button>
</template>
</avue-crud>
<el-drawer :title="`账户 [${userAccount}] 福利包明细`" v-model="benefitPackBox" :direction="direction" append-to-body
size="800px" @close="benefitPackClose">
<basic-container>
<avue-crud :option="benefitPackOption"
:data="benefitPackData"
ref="crudSub"
>
</avue-crud>
</basic-container>
</el-drawer>
<el-drawer :title="`账户 [${userAccount}] 积分信息`" v-model="userPointInfoBox" :direction="direction" append-to-body
size="800px" @close="userPointInfoClose">
<basic-container>
<avue-crud :option="userPointInfoOption"
:data="userPointInfoData"
ref="crudSub"
>
</avue-crud>
</basic-container>
</el-drawer>
<el-drawer :title="`账户 [${userAccount}] 累计消费`" v-model="userMallSpendBox" :direction="direction" append-to-body
size="800px" @close="userMallSpendClose">
<basic-container>
<avue-crud :option="userMallSpendOption"
:data="userMallSpendData"
ref="crudSub"
>
</avue-crud>
</basic-container>
</el-drawer>
<el-drawer :title="`账户 [${userAccount}] 业绩查询`" v-model="userPerformanceBox" :direction="direction" append-to-body
size="800px" @close="userPerformanceClose">
<basic-container>
<avue-crud :option="userPerformanceOption"
:data="userPerformanceData"
ref="crudSub"
>
</avue-crud>
</basic-container>
</el-drawer>
<!-- <el-drawer :title="`${username} ${serialNumber} `" v-model="subVisible" :direction="direction"-->
<!-- append-to-body-->
<!-- :before-close="handleSubClose" size="90%">-->
@@ -87,7 +152,7 @@
</template>
<script>
import {getList, getDetail, add, update, remove, resetPassword} from "@/api/market/marketInfo";
import {getList, getDetail, add, update, remove, resetPassword , benefitPackCountByUser , getUserPointInfo , getUserMallSpend , getUserPerformance} from "@/api/market/marketInfo";
import option from "@/option/market/marketInfo";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
@@ -112,7 +177,114 @@
selectionList: [],
option: option,
data: [],
username: "用户账号"
username: "用户账号",
userAccount : "",
direction : "rtl",
benefitPackBox: false,
benefitPackOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '福利包',
prop: 'packName',
type: 'input',
},
{
label: '数量',
prop: 'count',
type: 'number',
},
],
},
benefitPackData : [],
userPointInfoBox: false,
userPointInfoOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '用户积分',
prop: 'userPoint',
type: 'input',
},
{
label: '福利积分',
prop: 'benefitPoint',
type: 'input',
},
{
label: '现金券',
prop: 'cashCoupon',
type: 'input',
},
{
label: '佣金',
prop: 'userCommission',
type: 'input',
},
],
},
userPointInfoData : [],
userMallSpendBox: false,
userMallSpendOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '商城消费(元)',
prop: 'amount',
type: 'input',
},
],
},
userMallSpendData : [],
userPerformanceBox: false,
userPerformanceOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '现金业绩',
prop: 'userCash',
type: 'input',
},
{
label: '福利包业绩',
prop: 'benefitWelfare',
type: 'input',
},
],
},
userPerformanceData : [],
};
},
computed: {
@@ -281,7 +453,64 @@
this.loading = false;
this.selectionClear();
});
}
},
benefitPackInfoOpen(row){
this.benefitPackBox = true;
this.userAccount = row.account;
benefitPackCountByUser(row.id)
.then(res => {
this.benefitPackData = res.data.data;
})
},
benefitPackClose(){
this.benefitPackData = [];
},
userPointInfoOpen(row){
this.userPointInfoBox = true;
this.userAccount = row.account;
getUserPointInfo(row.id)
.then(res => {
this.userPointInfoData.push(res.data.data);
})
},
userPointInfoClose(){
this.userPointInfoData = [];
},
userMallSpendOpen(row){
this.userMallSpendBox = true;
this.userAccount = row.account;
getUserMallSpend(row.id)
.then(res => {
this.userMallSpendData.push(res.data.data);
})
},
userMallSpendClose(){
this.userMallSpendData = [];
},
userPerformanceOpen(row){
this.userPerformanceBox = true;
this.userAccount = row.account;
getUserPerformance(row.id)
.then(res => {
this.userPerformanceData.push(res.data.data);
})
},
userPerformanceClose(){
this.userPerformanceData = [];
},
}
};
</script>

View File

@@ -0,0 +1,215 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketUpgradeCashLog";
import option from "@/option/market/marketUpgradeCashLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketUpgradeCashLog_add, false),
viewBtn: this.validData(this.permission.marketUpgradeCashLog_view, false),
delBtn: this.validData(this.permission.marketUpgradeCashLog_delete, false),
editBtn: this.validData(this.permission.marketUpgradeCashLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/market/upgrade-cash-log/marketUpgradeCashLog/export-marketUpgradeCashLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `用户现金升级日志${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,215 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketUpgradeConfig";
import option from "@/option/market/marketUpgradeConfig";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketUpgradeConfig_add, false),
viewBtn: this.validData(this.permission.marketUpgradeConfig_view, false),
delBtn: this.validData(this.permission.marketUpgradeConfig_delete, false),
editBtn: this.validData(this.permission.marketUpgradeConfig_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/market/upgrade-config/marketUpgradeConfig/export-marketUpgradeConfig?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `用户升级配置${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,215 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketUpgradeWelfareLog";
import option from "@/option/market/marketUpgradeWelfareLog";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.marketUpgradeWelfareLog_add, false),
viewBtn: this.validData(this.permission.marketUpgradeWelfareLog_view, false),
delBtn: this.validData(this.permission.marketUpgradeWelfareLog_delete, false),
editBtn: this.validData(this.permission.marketUpgradeWelfareLog_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/market/upgrade-welfare-log/marketUpgradeWelfareLog/export-marketUpgradeWelfareLog?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `用户福利包升级日志${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@@ -1,225 +1,232 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<avue-crud
:option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.userCommission_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.userCommission_delete"-->
<!-- @click="handleDelete">删 除-->
<!-- </el-button>-->
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出-->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/market/marketUserCommission";
import option from "@/option/market/marketUserCommission";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove } from '@/api/market/marketUserCommission';
import option from '@/option/market/marketUserCommission';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: option,
data: [],
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.userCommission_add, false),
viewBtn: this.validData(this.permission.userCommission_view, false),
delBtn: this.validData(this.permission.userCommission_delete, false),
editBtn: this.validData(this.permission.userCommission_edit, false),
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.userCommission_add, false),
viewBtn: this.validData(this.permission.userCommission_view, false),
delBtn: this.validData(this.permission.userCommission_delete, false),
editBtn: this.validData(this.permission.userCommission_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
},
methods: {
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
type: 'success',
message: '操作成功!',
});
done();
}, error => {
},
error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(row.id);
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
},
handleExport() {
let downloadUrl = `/blade-usercommission/userCommission/export-userCommission?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `用户佣金表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/blade-usercommission/userCommission/export-userCommission?${
this.website.tokenHeader
}=${getToken()}`;
const {} = this.query;
let values = {};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `用户佣金表${dateNow()}.xlsx`);
NProgress.done();
});
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
}
};
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {} = this.query;
let values = {
account: params.account,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
},
};
</script>
<style>
</style>
<style></style>

Some files were not shown because too many files have changed in this diff Show More