动态升级相关页面
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import request from '@/axios';
|
||||
|
||||
|
||||
|
||||
|
||||
export const getList = (current, size, params) => {
|
||||
return request({
|
||||
url: '/common/order/page',
|
||||
@@ -12,6 +15,19 @@ 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',
|
||||
@@ -93,4 +109,13 @@ export const fillContractUrl = (id, contractUrl) => {
|
||||
method: 'post',
|
||||
data: {id, contractUrl}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
export function confirmItinerary(id) {
|
||||
return request({
|
||||
url: '/common/order/confirm-itinerary',
|
||||
method: 'post',
|
||||
data: {id}
|
||||
});
|
||||
}
|
||||
50
src/api/market/marketCashPerformanceLog.js
Normal file
50
src/api/market/marketCashPerformanceLog.js
Normal 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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -94,4 +94,16 @@ export function getUserMallSpend(userId) {
|
||||
}
|
||||
|
||||
|
||||
export function getUserPerformance(userId) {
|
||||
return request({
|
||||
url: '/market-info/getUserPerformance',
|
||||
method: 'get',
|
||||
params: {
|
||||
userId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
50
src/api/market/marketUpgradeCashLog.js
Normal file
50
src/api/market/marketUpgradeCashLog.js
Normal 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
|
||||
})
|
||||
}
|
||||
|
||||
50
src/api/market/marketUpgradeConfig.js
Normal file
50
src/api/market/marketUpgradeConfig.js
Normal 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
|
||||
})
|
||||
}
|
||||
|
||||
50
src/api/market/marketUpgradeWelfareLog.js
Normal file
50
src/api/market/marketUpgradeWelfareLog.js
Normal 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
|
||||
})
|
||||
}
|
||||
|
||||
50
src/api/market/marketWelfarePerformanceLog.js
Normal file
50
src/api/market/marketWelfarePerformanceLog.js
Normal 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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ export default {
|
||||
dataType: 'number',
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "分类路径",
|
||||
|
||||
131
src/option/market/marketCashPerformanceLog.js
Normal file
131
src/option/market/marketCashPerformanceLog.js
Normal 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,
|
||||
},
|
||||
]
|
||||
}
|
||||
131
src/option/market/marketUpgradeCashLog.js
Normal file
131
src/option/market/marketUpgradeCashLog.js
Normal 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,
|
||||
},
|
||||
]
|
||||
}
|
||||
156
src/option/market/marketUpgradeConfig.js
Normal file
156
src/option/market/marketUpgradeConfig.js
Normal 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,
|
||||
},
|
||||
]
|
||||
}
|
||||
131
src/option/market/marketUpgradeWelfareLog.js
Normal file
131
src/option/market/marketUpgradeWelfareLog.js
Normal 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,
|
||||
},
|
||||
]
|
||||
}
|
||||
131
src/option/market/marketWelfarePerformanceLog.js
Normal file
131
src/option/market/marketWelfarePerformanceLog.js
Normal 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,
|
||||
},
|
||||
]
|
||||
}
|
||||
414
src/views/common/commonEcoOrder.vue
Normal file
414
src/views/common/commonEcoOrder.vue
Normal 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>
|
||||
@@ -40,6 +40,13 @@
|
||||
|
||||
</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 === ''"
|
||||
@@ -129,7 +136,8 @@ import {
|
||||
remove,
|
||||
confirmGuideInfo,
|
||||
fillExpress,
|
||||
fillContractUrl
|
||||
fillContractUrl,
|
||||
confirmItinerary
|
||||
} from '@/api/common/commonUserOrder';
|
||||
import option from "@/option/common/commonUserTourOrder";
|
||||
import {mapGetters} from "vuex";
|
||||
@@ -643,6 +651,25 @@ export default {
|
||||
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>
|
||||
|
||||
@@ -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';
|
||||
|
||||
215
src/views/market/marketCashPerformanceLog.vue
Normal file
215
src/views/market/marketCashPerformanceLog.vue
Normal 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>
|
||||
@@ -49,12 +49,17 @@
|
||||
@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">
|
||||
size="800px" @close="benefitPackClose">
|
||||
<basic-container>
|
||||
<avue-crud :option="benefitPackOption"
|
||||
:data="benefitPackData"
|
||||
@@ -65,7 +70,7 @@
|
||||
</el-drawer>
|
||||
|
||||
<el-drawer :title="`账户 [${userAccount}] 积分信息`" v-model="userPointInfoBox" :direction="direction" append-to-body
|
||||
size="800px">
|
||||
size="800px" @close="userPointInfoClose">
|
||||
<basic-container>
|
||||
<avue-crud :option="userPointInfoOption"
|
||||
:data="userPointInfoData"
|
||||
@@ -77,7 +82,7 @@
|
||||
|
||||
|
||||
<el-drawer :title="`账户 [${userAccount}] 累计消费`" v-model="userMallSpendBox" :direction="direction" append-to-body
|
||||
size="800px">
|
||||
size="800px" @close="userMallSpendClose">
|
||||
<basic-container>
|
||||
<avue-crud :option="userMallSpendOption"
|
||||
:data="userMallSpendData"
|
||||
@@ -87,6 +92,17 @@
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -136,7 +152,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getList, getDetail, add, update, remove, resetPassword , benefitPackCountByUser , getUserPointInfo , getUserMallSpend} 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";
|
||||
@@ -244,6 +260,31 @@
|
||||
},
|
||||
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: {
|
||||
@@ -424,6 +465,10 @@
|
||||
|
||||
},
|
||||
|
||||
benefitPackClose(){
|
||||
this.benefitPackData = [];
|
||||
},
|
||||
|
||||
userPointInfoOpen(row){
|
||||
this.userPointInfoBox = true;
|
||||
this.userAccount = row.account;
|
||||
@@ -433,6 +478,10 @@
|
||||
})
|
||||
},
|
||||
|
||||
userPointInfoClose(){
|
||||
this.userPointInfoData = [];
|
||||
},
|
||||
|
||||
userMallSpendOpen(row){
|
||||
this.userMallSpendBox = true;
|
||||
this.userAccount = row.account;
|
||||
@@ -444,6 +493,24 @@
|
||||
|
||||
},
|
||||
|
||||
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>
|
||||
|
||||
215
src/views/market/marketUpgradeCashLog.vue
Normal file
215
src/views/market/marketUpgradeCashLog.vue
Normal 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>
|
||||
215
src/views/market/marketUpgradeConfig.vue
Normal file
215
src/views/market/marketUpgradeConfig.vue
Normal 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>
|
||||
215
src/views/market/marketUpgradeWelfareLog.vue
Normal file
215
src/views/market/marketUpgradeWelfareLog.vue
Normal 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>
|
||||
215
src/views/market/marketWelfarePerformanceLog.vue
Normal file
215
src/views/market/marketWelfarePerformanceLog.vue
Normal 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/marketWelfarePerformanceLog";
|
||||
import option from "@/option/market/marketWelfarePerformanceLog";
|
||||
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.marketWelfarePerformanceLog_add, false),
|
||||
viewBtn: this.validData(this.permission.marketWelfarePerformanceLog_view, false),
|
||||
delBtn: this.validData(this.permission.marketWelfarePerformanceLog_delete, false),
|
||||
editBtn: this.validData(this.permission.marketWelfarePerformanceLog_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/welfare-performance-log/marketWelfarePerformanceLog/export-marketWelfarePerformanceLog?${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>
|
||||
Reference in New Issue
Block a user