OA号:
@@ -770,9 +889,15 @@ onMounted(async function () {
所属地区:
-
-
-
+
+
职位名称:
@@ -880,10 +1005,19 @@ onMounted(async function () {
-
-
-
+
@@ -930,11 +1064,19 @@ onMounted(async function () {
-
-
-
+
diff --git a/src/views/recharge/gold/coinRechargeDetail.vue b/src/views/recharge/gold/coinRechargeDetail.vue
index 7b23827..cf40e56 100644
--- a/src/views/recharge/gold/coinRechargeDetail.vue
+++ b/src/views/recharge/gold/coinRechargeDetail.vue
@@ -1,9 +1,6 @@
@@ -545,27 +579,16 @@ const props = {multiple: true}
-
所属地区:
@@ -584,7 +607,8 @@ const props = {multiple: true}
充值时间:
+ end-placeholder="结束时间" style="width: 400px" @change="handleDatePickerChange"
+ :default-time="defaultTime"/>
今
@@ -658,7 +682,7 @@ const props = {multiple: true}
-
+
diff --git a/src/views/refund/gold/coinRefundDetail.vue b/src/views/refund/gold/coinRefundDetail.vue
index 4bfe4b6..82873e7 100644
--- a/src/views/refund/gold/coinRefundDetail.vue
+++ b/src/views/refund/gold/coinRefundDetail.vue
@@ -51,7 +51,7 @@ const tableData = ref([])
// 搜索======================================
// 搜索detail
const refundUser = ref({
- markets:[]
+ market:""
})
// 搜索对象
const getObj = ref({
@@ -64,7 +64,7 @@ const total = ref(100)
const getTime = ref([])
// 搜索地区列表
-const markets = ref([])
+const market = ref([])
// 定义响应式变量存储金币合计数
const permanentGolds = ref(0)
@@ -188,7 +188,7 @@ const search = function () {
}
// 重置
const reset = function () {
- refundUser.value = {markets: []}
+ refundUser.value = {market: ""}
sortField.value = ''
sortOrder.value = ''
getTime.value = {}
@@ -365,7 +365,7 @@ const exportExcel = async function () {
refundUser: {
jwcode: refundUser.value.jwcode || '',
refundModel: refundUser.value.refundModel || '',
- markets: refundUser.value.markets || [],
+ market: refundUser.value.market || "",
startTime: refundUser.value.startTime || '',
endTime: refundUser.value.endTime || '',
goodsName: refundUser.value.goodsName || '',
@@ -463,63 +463,15 @@ const getTagText = (state) => {
// 存储地区选择变化
-const selectedMarketPath = ref([])
-//处理地区选择变化
+const selectedMarketPath = ref("")
const handleMarketChange = (value) => {
- if (Array.isArray(value) && value.length > 0) {
- const ids = new Set();
-
- value.forEach(path => {
- const lastName = path[path.length - 1];
- const id = reverseMarketMapping[lastName];
- if (id) ids.add(Number(id));
- });
-
- // 添加额外处理:如果一个父节点下所有子节点都被选中,则把父节点也加入
- const getAllLeafNames = (nodes) => {
- const leafNames = [];
-
- const traverse = (node, parentName = null) => {
- if (!node.children || node.children.length === 0) {
- leafNames.push({name: node.label, parent: parentName});
- } else {
- node.children.forEach(child => traverse(child, node.label));
- }
- };
-
- nodes.forEach(node => traverse(node));
- return leafNames;
- };
-
- const leafNameMap = getAllLeafNames(markets.value); // 所有叶子节点和对应父级名称
-
- // 列表构建
- const parentToChildren = {};
- leafNameMap.forEach(({name, parent}) => {
- if (!parentToChildren[parent]) parentToChildren[parent] = [];
- parentToChildren[parent].push(name);
- });
-
- // 构建当前被选中的叶子节点
- const selectedLeafNames = value.map(path => path[path.length - 1]);
-
- // 如果 parent 下所有子节点都选中了,就把 parent 加进来
- Object.entries(parentToChildren).forEach(([parent, children]) => {
- const allChildrenSelected = children.every(child => selectedLeafNames.includes(child));
- if (allChildrenSelected && reverseMarketMapping[parent]) {
- ids.add(Number(reverseMarketMapping[parent]));
- }
- });
-
- refundUser.value.markets = Array.from(ids);
+ if (value && value.length > 0) {
+ const lastValue = value[value.length - 1]
+ refundUser.value.market = reverseMarketMapping[lastValue]
} else {
- refundUser.value.markets = [];
+ refundUser.value.market = ''
}
-
- console.log('最终映射后的 markets IDs:', refundUser.value.markets);
-};
-
-const props = {multiple: true}
+}
// 获取地区,修改为级联下拉框
const getMarket = async function () {
try {
@@ -549,8 +501,8 @@ const getMarket = async function () {
});
};
// 存储地区信息
- markets.value = transformTree(result.data)
- console.log('转换后的地区树==============', markets.value)
+ market.value = transformTree(result.data)
+ console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
@@ -598,14 +550,11 @@ const getMarket = async function () {
所属地区:
diff --git a/src/views/usergold/gold/clientCountBalance.vue b/src/views/usergold/gold/clientCountBalance.vue
index fc99d19..1785dcd 100644
--- a/src/views/usergold/gold/clientCountBalance.vue
+++ b/src/views/usergold/gold/clientCountBalance.vue
@@ -26,7 +26,7 @@ const getAdminData = async function () {
// 定义加载状态,获取地区数据
const isLoadingmarket = ref(false);
-const markets = ref([])
+const market = ref("")
// 充值明细表格
@@ -55,7 +55,7 @@ const total = ref(100)
const getTime = ref([])
// 搜索User
const user = ref({
- markets: [],
+ market: "",
})
// 不分页的搜索对象
const getAllObj = ref({})
@@ -105,7 +105,7 @@ const get = async function (val) {
url: '/goldDetail/goldTotal',
data: {
jwcode: user.value.jwcode,
- markets: user.value.markets
+ market: user.value.market
}
})
// 判断精网号是否存在,假设精网号不存在时 result.data.list 为空数组
@@ -167,7 +167,7 @@ const search = function () {
}
// 重置
const reset = function () {
- user.value = { markets: [] }
+ user.value = { market: "" }
sortField.value = ''
sortOrder.value = ''
get()
@@ -217,7 +217,7 @@ const exportExcel = async function () {
const params = {
user: {
jwcode: user.value.jwcode || '',
- markets: user.value.markets || []
+ market: user.value.market || ""
}
}
const res = await API({ url: '/goldDetail/exportGold', data: params })
@@ -300,63 +300,15 @@ const getTagText = (state) => {
}
}
// 存储地区选择变化
-const selectedMarketPath = ref([])
-//处理地区选择变化
+const selectedMarketPath = ref("")
const handleMarketChange = (value) => {
- if (Array.isArray(value) && value.length > 0) {
- const ids = new Set();
-
- value.forEach(path => {
- const lastName = path[path.length - 1];
- const id = reverseMarketMapping[lastName];
- if (id) ids.add(Number(id));
- });
-
- // 添加额外处理:如果一个父节点下所有子节点都被选中,则把父节点也加入
- const getAllLeafNames = (nodes) => {
- const leafNames = [];
-
- const traverse = (node, parentName = null) => {
- if (!node.children || node.children.length === 0) {
- leafNames.push({ name: node.label, parent: parentName });
- } else {
- node.children.forEach(child => traverse(child, node.label));
- }
- };
-
- nodes.forEach(node => traverse(node));
- return leafNames;
- };
-
- const leafNameMap = getAllLeafNames(markets.value); // 所有叶子节点和对应父级名称
-
- // 列表构建
- const parentToChildren = {};
- leafNameMap.forEach(({ name, parent }) => {
- if (!parentToChildren[parent]) parentToChildren[parent] = [];
- parentToChildren[parent].push(name);
- });
-
- // 构建当前被选中的叶子节点
- const selectedLeafNames = value.map(path => path[path.length - 1]);
-
- // 如果 parent 下所有子节点都选中了,就把 parent 加进来
- Object.entries(parentToChildren).forEach(([parent, children]) => {
- const allChildrenSelected = children.every(child => selectedLeafNames.includes(child));
- if (allChildrenSelected && reverseMarketMapping[parent]) {
- ids.add(Number(reverseMarketMapping[parent]));
- }
- });
-
- user.value.markets = Array.from(ids);
+ if (value && value.length > 0) {
+ const lastValue = value[value.length - 1]
+ user.value.market = reverseMarketMapping[lastValue]
} else {
- user.value.markets = [];
+ user.value.market = ''
}
-
- console.log('最终映射后的 market IDs:', user.value.markets);
-};
-
-const props = { multiple: true }
+}
// 获取地区,修改为级联下拉框
const getMarket = async function () {
try {
@@ -386,8 +338,8 @@ const getMarket = async function () {
});
};
// 存储地区信息
- markets.value = transformTree(result.data)
- console.log('转换后的地区树==============', markets.value)
+ market.value = transformTree(result.data)
+ console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
@@ -406,8 +358,14 @@ const getMarket = async function () {
所属地区:
-
+
查询
重置
diff --git a/src/views/usergold/gold/clientCountDetail.vue b/src/views/usergold/gold/clientCountDetail.vue
index b4c1778..b4344c0 100644
--- a/src/views/usergold/gold/clientCountDetail.vue
+++ b/src/views/usergold/gold/clientCountDetail.vue
@@ -95,7 +95,7 @@ const type = [
// 定义加载状态,获取地区数据
// 定义加载状态,获取地区数据
const isLoadingmarket = ref(false);
-const markets = ref([])
+const market = ref("")
@@ -113,7 +113,7 @@ const total = ref(100)
const getTime = ref([])
// 搜索goldDetail
const goldDetail = ref({
- markets: [],
+ market: "",
})
// 搜索对象
const getObj = ref({
@@ -208,7 +208,7 @@ const reset = function () {
delete goldDetail.value.startTime
delete goldDetail.value.endTime
// delete goldDetail.value.markets
- goldDetail.value.markets = []
+ goldDetail.value.market = ""
delete sortField.value
delete sortOrder.value
getTime.value = []
@@ -308,7 +308,7 @@ const exportExcel = async function () {
jwcode: goldDetail.value.jwcode || '',
payPlatform: goldDetail.value.payPlatform || '',
type: goldDetail.value.type || '',
- markets: goldDetail.value.markets || [],
+ market: goldDetail.value.market ||"",
startTime: goldDetail.value.startTime || '',
endTime: goldDetail.value.endTime || '',
sortField: goldDetail.value.sortField || '',
@@ -419,63 +419,15 @@ const getTagText = (state) => {
// 存储地区选择变化
-const selectedMarketPath = ref([])
-//处理地区选择变化
+const selectedMarketPath = ref("")
const handleMarketChange = (value) => {
- if (Array.isArray(value) && value.length > 0) {
- const ids = new Set();
-
- value.forEach(path => {
- const lastName = path[path.length - 1];
- const id = reverseMarketMapping[lastName];
- if (id) ids.add(Number(id));
- });
-
- // 添加额外处理:如果一个父节点下所有子节点都被选中,则把父节点也加入
- const getAllLeafNames = (nodes) => {
- const leafNames = [];
-
- const traverse = (node, parentName = null) => {
- if (!node.children || node.children.length === 0) {
- leafNames.push({name: node.label, parent: parentName});
- } else {
- node.children.forEach(child => traverse(child, node.label));
- }
- };
-
- nodes.forEach(node => traverse(node));
- return leafNames;
- };
-
- const leafNameMap = getAllLeafNames(markets.value); // 所有叶子节点和对应父级名称
-
- // 列表构建
- const parentToChildren = {};
- leafNameMap.forEach(({name, parent}) => {
- if (!parentToChildren[parent]) parentToChildren[parent] = [];
- parentToChildren[parent].push(name);
- });
-
- // 构建当前被选中的叶子节点
- const selectedLeafNames = value.map(path => path[path.length - 1]);
-
- // 如果 parent 下所有子节点都选中了,就把 parent 加进来
- Object.entries(parentToChildren).forEach(([parent, children]) => {
- const allChildrenSelected = children.every(child => selectedLeafNames.includes(child));
- if (allChildrenSelected && reverseMarketMapping[parent]) {
- ids.add(Number(reverseMarketMapping[parent]));
- }
- });
-
- goldDetail.value.markets = Array.from(ids);
+ if (value && value.length > 0) {
+ const lastValue = value[value.length - 1]
+ goldDetail.value.market = reverseMarketMapping[lastValue]
} else {
- goldDetail.value.markets = [];
+ goldDetail.value.market = ''
}
-
- console.log('最终映射后的 market IDs:', goldDetail.value.markets);
-};
-
-const props = {multiple: true}
+}
// 获取地区,修改为级联下拉框
const getMarket = async function () {
try {
@@ -505,8 +457,8 @@ const getMarket = async function () {
});
};
// 存储地区信息
- markets.value = transformTree(result.data)
- console.log('转换后的地区树==============', markets.value)
+ market.value = transformTree(result.data)
+ console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
@@ -548,14 +500,11 @@ const getMarket = async function () {
所属地区: