Commit c842ad9a7f0df833c684f4d1d6a9c478e7c8eade

Authored by “wangming”
1 parent b3ad3078

Remove analyze_excel.py and analyze_formulas.py scripts; refactor Form.vue and i…

…ndex.vue for improved layout and consistency; update LqKhxx DTOs and services for better structure and clarity.
analyze_excel.py deleted
1   -#!/usr/bin/env python3
2   -# -*- coding: utf-8 -*-
3   -"""
4   -Excel工资核算文件分析工具
5   -分析工资核算相关的Excel文件,提取字段信息和引用关系
6   -"""
7   -
8   -import pandas as pd
9   -import os
10   -import re
11   -from pathlib import Path
12   -
13   -def analyze_excel_file(file_path, sheet_name=None):
14   - """分析单个Excel文件"""
15   - try:
16   - # 获取所有工作表名称
17   - excel_file = pd.ExcelFile(file_path)
18   - sheets = excel_file.sheet_names
19   -
20   - print(f"\n=== 分析文件: {os.path.basename(file_path)} ===")
21   - print(f"工作表数量: {len(sheets)}")
22   - print(f"工作表名称: {sheets}")
23   -
24   - analysis_result = {
25   - 'file_name': os.path.basename(file_path),
26   - 'sheets': {},
27   - 'all_columns': set(),
28   - 'formulas': [],
29   - 'references': []
30   - }
31   -
32   - # 分析每个工作表
33   - for sheet in sheets:
34   - if sheet_name and sheet != sheet_name:
35   - continue
36   -
37   - try:
38   - df = pd.read_excel(file_path, sheet_name=sheet, header=0)
39   - print(f"\n--- 工作表: {sheet} ---")
40   - print(f"行数: {len(df)}")
41   - print(f"列数: {len(df.columns)}")
42   - print(f"列名: {list(df.columns)}")
43   -
44   - # 收集列名
45   - analysis_result['all_columns'].update(df.columns)
46   - analysis_result['sheets'][sheet] = {
47   - 'rows': len(df),
48   - 'columns': len(df.columns),
49   - 'column_names': list(df.columns),
50   - 'sample_data': df.head(3).to_dict('records') if len(df) > 0 else []
51   - }
52   -
53   - # 查找公式和引用
54   - for col in df.columns:
55   - for idx, value in df[col].items():
56   - if pd.notna(value) and isinstance(value, str):
57   - # 查找Excel公式模式
58   - formula_patterns = [
59   - r'=([A-Z]+[0-9]+)', # 单元格引用
60   - r'=([A-Z]+[0-9]+:[A-Z]+[0-9]+)', # 范围引用
61   - r'=([A-Z]+[0-9]+\[[^\]]+\])', # 数组引用
62   - r'=([A-Z]+[0-9]+\$[0-9]+)', # 绝对引用
63   - r'=([A-Z]+[0-9]+:[A-Z]+[0-9]+\$[0-9]+)', # 绝对范围引用
64   - ]
65   -
66   - for pattern in formula_patterns:
67   - matches = re.findall(pattern, str(value))
68   - if matches:
69   - analysis_result['formulas'].append({
70   - 'sheet': sheet,
71   - 'cell': f"{col}{idx+1}",
72   - 'formula': str(value),
73   - 'references': matches
74   - })
75   - analysis_result['references'].extend(matches)
76   -
77   - except Exception as e:
78   - print(f"分析工作表 {sheet} 时出错: {e}")
79   - analysis_result['sheets'][sheet] = {'error': str(e)}
80   -
81   - return analysis_result
82   -
83   - except Exception as e:
84   - print(f"分析文件 {file_path} 时出错: {e}")
85   - return None
86   -
87   -def main():
88   - """主函数"""
89   - base_path = "/Users/mr.wang/代码库/绿纤/lvqianmeiye_ERP/参考资料/工资核算 -7月"
90   -
91   - # 要分析的文件列表
92   - files_to_analyze = [
93   - "工资(全字段).xlsx",
94   - "①B-a-26考勤汇总表.xlsx",
95   - "②B-a-17每日早报.xlsx",
96   - "③B-a-③呈现-消耗明细表.xlsx",
97   - "④B-a-25社保统计表.xlsx",
98   - "⑤B-a-12奖励统计表.xlsx",
99   - "B-b-③健康师底薪.xlsx",
100   - "B-b-④健康师提成-金三角顾问.xlsx",
101   - "B-b-⑤其他岗位工资.xlsx",
102   - "B-b-⑤当月数据及门店毛利.xlsx"
103   - ]
104   -
105   - all_results = {}
106   -
107   - print("开始分析工资核算Excel文件...")
108   - print("=" * 60)
109   -
110   - for filename in files_to_analyze:
111   - file_path = os.path.join(base_path, filename)
112   - if os.path.exists(file_path):
113   - result = analyze_excel_file(file_path)
114   - if result:
115   - all_results[filename] = result
116   - else:
117   - print(f"文件不存在: {filename}")
118   -
119   - # 生成分析报告
120   - generate_report(all_results)
121   -
122   -def generate_report(all_results):
123   - """生成分析报告"""
124   - report_path = "/Users/mr.wang/代码库/绿纤/lvqianmeiye_ERP/工资核算Excel分析报告.md"
125   -
126   - with open(report_path, 'w', encoding='utf-8') as f:
127   - f.write("# 工资核算Excel文件分析报告\n\n")
128   - f.write("## 概述\n\n")
129   - f.write("本报告分析了工资核算相关的Excel文件,提取了字段信息、公式引用关系等关键数据。\n\n")
130   -
131   - # 文件概览
132   - f.write("## 文件概览\n\n")
133   - f.write("| 文件名 | 工作表数量 | 总列数 | 状态 |\n")
134   - f.write("|--------|------------|--------|------|\n")
135   -
136   - for filename, result in all_results.items():
137   - if result:
138   - sheet_count = len(result['sheets'])
139   - total_columns = len(result['all_columns'])
140   - f.write(f"| {filename} | {sheet_count} | {total_columns} | ✅ |\n")
141   - else:
142   - f.write(f"| {filename} | - | - | ❌ |\n")
143   -
144   - # 详细分析
145   - f.write("\n## 详细分析\n\n")
146   -
147   - for filename, result in all_results.items():
148   - if not result:
149   - continue
150   -
151   - f.write(f"### {filename}\n\n")
152   -
153   - # 工作表信息
154   - f.write("#### 工作表信息\n\n")
155   - for sheet_name, sheet_info in result['sheets'].items():
156   - if 'error' in sheet_info:
157   - f.write(f"- **{sheet_name}**: 分析出错 - {sheet_info['error']}\n")
158   - else:
159   - f.write(f"- **{sheet_name}**: {sheet_info['rows']}行 x {sheet_info['columns']}列\n")
160   - f.write(f" - 列名: {', '.join([str(col) for col in sheet_info['column_names']])}\n")
161   -
162   - # 字段统计
163   - f.write(f"\n#### 字段统计\n\n")
164   - f.write(f"总字段数: {len(result['all_columns'])}\n\n")
165   - f.write("所有字段列表:\n")
166   - for col in sorted(result['all_columns'], key=str):
167   - f.write(f"- {col}\n")
168   -
169   - # 公式引用
170   - if result['formulas']:
171   - f.write(f"\n#### 公式引用\n\n")
172   - f.write(f"发现 {len(result['formulas'])} 个公式引用:\n\n")
173   - for formula in result['formulas'][:10]: # 只显示前10个
174   - f.write(f"- **{formula['cell']}** ({formula['sheet']}): {formula['formula']}\n")
175   - f.write(f" - 引用: {', '.join(formula['references'])}\n")
176   -
177   - if len(result['formulas']) > 10:
178   - f.write(f"\n... 还有 {len(result['formulas']) - 10} 个公式\n")
179   -
180   - f.write("\n---\n\n")
181   -
182   - # 字段汇总
183   - f.write("## 字段汇总\n\n")
184   - all_columns = set()
185   - for result in all_results.values():
186   - if result:
187   - all_columns.update(result['all_columns'])
188   -
189   - f.write(f"所有文件共发现 {len(all_columns)} 个唯一字段:\n\n")
190   - for col in sorted(all_columns, key=str):
191   - f.write(f"- {col}\n")
192   -
193   - # 引用关系汇总
194   - f.write("\n## 引用关系汇总\n\n")
195   - all_references = set()
196   - for result in all_results.values():
197   - if result:
198   - all_references.update(result['references'])
199   -
200   - f.write(f"发现 {len(all_references)} 个唯一引用:\n\n")
201   - for ref in sorted(all_references, key=str):
202   - f.write(f"- {ref}\n")
203   -
204   - print(f"\n分析报告已生成: {report_path}")
205   -
206   -if __name__ == "__main__":
207   - main()
analyze_formulas.py deleted
1   -#!/usr/bin/env python3
2   -# -*- coding: utf-8 -*-
3   -"""
4   -Excel公式分析工具
5   -分析工资核算Excel文件中的公式和引用关系
6   -"""
7   -
8   -import pandas as pd
9   -import openpyxl
10   -import os
11   -import re
12   -from pathlib import Path
13   -
14   -def extract_formulas_from_excel(file_path):
15   - """从Excel文件中提取所有公式"""
16   - try:
17   - # 使用openpyxl读取Excel文件以获取公式
18   - workbook = openpyxl.load_workbook(file_path, data_only=False)
19   -
20   - formulas = []
21   - references = []
22   -
23   - for sheet_name in workbook.sheetnames:
24   - worksheet = workbook[sheet_name]
25   -
26   - for row in worksheet.iter_rows():
27   - for cell in row:
28   - if cell.data_type == 'f': # 公式类型
29   - formula = str(cell.value)
30   - cell_ref = f"{sheet_name}!{cell.coordinate}"
31   -
32   - # 提取公式中的引用
33   - refs = extract_references_from_formula(formula)
34   -
35   - formulas.append({
36   - 'file': os.path.basename(file_path),
37   - 'sheet': sheet_name,
38   - 'cell': cell.coordinate,
39   - 'formula': formula,
40   - 'references': refs
41   - })
42   -
43   - references.extend(refs)
44   -
45   - return formulas, references
46   -
47   - except Exception as e:
48   - print(f"分析文件 {file_path} 时出错: {e}")
49   - return [], []
50   -
51   -def extract_references_from_formula(formula):
52   - """从公式中提取引用关系"""
53   - references = []
54   -
55   - # 匹配各种引用模式
56   - patterns = [
57   - # XLOOKUP引用模式
58   - r"XLOOKUP\([^,]+,\s*'([^']+)'!([^,]+),\s*'([^']+)'!([^,]+)",
59   - # VLOOKUP引用模式
60   - r"VLOOKUP\([^,]+,\s*'([^']+)'!([^,]+)",
61   - # 直接工作表引用
62   - r"'([^']+)'!([A-Z]+\d+)",
63   - # 工作表范围引用
64   - r"'([^']+)'!([A-Z]+\d+:[A-Z]+\d+)",
65   - # 简单单元格引用
66   - r"([A-Z]+\d+)",
67   - # 范围引用
68   - r"([A-Z]+\d+:[A-Z]+\d+)",
69   - ]
70   -
71   - for pattern in patterns:
72   - matches = re.findall(pattern, formula)
73   - for match in matches:
74   - if isinstance(match, tuple):
75   - if len(match) == 2:
76   - references.append({
77   - 'type': 'worksheet_reference',
78   - 'file': match[0] if match[0] else None,
79   - 'range': match[1]
80   - })
81   - elif len(match) == 4:
82   - references.append({
83   - 'type': 'xlookup_reference',
84   - 'file': match[0],
85   - 'lookup_range': match[1],
86   - 'file2': match[2],
87   - 'return_range': match[3]
88   - })
89   - else:
90   - references.append({
91   - 'type': 'cell_reference',
92   - 'range': match
93   - })
94   -
95   - return references
96   -
97   -def analyze_formula_dependencies(formulas):
98   - """分析公式依赖关系"""
99   - dependencies = {}
100   -
101   - for formula in formulas:
102   - cell_key = f"{formula['file']}!{formula['sheet']}!{formula['cell']}"
103   - dependencies[cell_key] = {
104   - 'formula': formula['formula'],
105   - 'dependencies': formula['references']
106   - }
107   -
108   - return dependencies
109   -
110   -def generate_formula_report(formulas, references, dependencies):
111   - """生成公式分析报告"""
112   - report_path = "/Users/mr.wang/代码库/绿纤/lvqianmeiye_ERP/Excel公式分析报告.md"
113   -
114   - with open(report_path, 'w', encoding='utf-8') as f:
115   - f.write("# Excel公式分析报告\n\n")
116   - f.write("## 概述\n\n")
117   - f.write("本报告分析了工资核算Excel文件中的公式和引用关系,帮助理解数据计算逻辑。\n\n")
118   -
119   - # 统计信息
120   - f.write("## 统计信息\n\n")
121   - f.write(f"- 总公式数量: {len(formulas)}\n")
122   - f.write(f"- 总引用数量: {len(references)}\n")
123   - f.write(f"- 涉及文件数量: {len(set(f['file'] for f in formulas))}\n\n")
124   -
125   - # 按文件分组分析
126   - files = {}
127   - for formula in formulas:
128   - file_name = formula['file']
129   - if file_name not in files:
130   - files[file_name] = []
131   - files[file_name].append(formula)
132   -
133   - f.write("## 文件公式分析\n\n")
134   -
135   - for file_name, file_formulas in files.items():
136   - f.write(f"### {file_name}\n\n")
137   - f.write(f"公式数量: {len(file_formulas)}\n\n")
138   -
139   - # 按工作表分组
140   - sheets = {}
141   - for formula in file_formulas:
142   - sheet_name = formula['sheet']
143   - if sheet_name not in sheets:
144   - sheets[sheet_name] = []
145   - sheets[sheet_name].append(formula)
146   -
147   - for sheet_name, sheet_formulas in sheets.items():
148   - f.write(f"#### 工作表: {sheet_name}\n\n")
149   - f.write(f"公式数量: {len(sheet_formulas)}\n\n")
150   -
151   - # 显示前10个公式
152   - for i, formula in enumerate(sheet_formulas[:10]):
153   - f.write(f"**{formula['cell']}**:\n")
154   - f.write(f"```\n{formula['formula']}\n```\n")
155   -
156   - if formula['references']:
157   - f.write("引用关系:\n")
158   - for ref in formula['references']:
159   - if ref['type'] == 'xlookup_reference':
160   - f.write(f"- XLOOKUP: {ref['file']}!{ref['lookup_range']} -> {ref['file2']}!{ref['return_range']}\n")
161   - elif ref['type'] == 'worksheet_reference':
162   - f.write(f"- 工作表引用: {ref['file']}!{ref['range']}\n")
163   - elif ref['type'] == 'cell_reference':
164   - f.write(f"- 单元格引用: {ref['range']}\n")
165   - f.write("\n")
166   - else:
167   - f.write("无外部引用\n\n")
168   -
169   - if len(sheet_formulas) > 10:
170   - f.write(f"... 还有 {len(sheet_formulas) - 10} 个公式\n\n")
171   -
172   - f.write("---\n\n")
173   -
174   - # 引用关系汇总
175   - f.write("## 引用关系汇总\n\n")
176   -
177   - # 统计引用类型
178   - ref_types = {}
179   - for ref in references:
180   - ref_type = ref['type']
181   - if ref_type not in ref_types:
182   - ref_types[ref_type] = 0
183   - ref_types[ref_type] += 1
184   -
185   - f.write("### 引用类型统计\n\n")
186   - for ref_type, count in ref_types.items():
187   - f.write(f"- {ref_type}: {count} 个\n")
188   - f.write("\n")
189   -
190   - # 外部文件引用
191   - external_refs = {}
192   - for ref in references:
193   - if ref['type'] == 'xlookup_reference' and ref['file']:
194   - file_name = ref['file']
195   - if file_name not in external_refs:
196   - external_refs[file_name] = []
197   - external_refs[file_name].append(ref)
198   -
199   - if external_refs:
200   - f.write("### 外部文件引用\n\n")
201   - for file_name, refs in external_refs.items():
202   - f.write(f"**{file_name}**: {len(refs)} 个引用\n")
203   - for ref in refs[:5]: # 只显示前5个
204   - f.write(f"- {ref['file']}!{ref['lookup_range']} -> {ref['file2']}!{ref['return_range']}\n")
205   - if len(refs) > 5:
206   - f.write(f"... 还有 {len(refs) - 5} 个引用\n")
207   - f.write("\n")
208   -
209   - # 公式依赖关系图
210   - f.write("## 公式依赖关系\n\n")
211   - f.write("### 关键公式分析\n\n")
212   -
213   - # 找出包含XLOOKUP的公式
214   - xlookup_formulas = [f for f in formulas if 'XLOOKUP' in f['formula']]
215   -
216   - if xlookup_formulas:
217   - f.write("#### XLOOKUP公式分析\n\n")
218   - for formula in xlookup_formulas[:10]:
219   - f.write(f"**{formula['file']}!{formula['sheet']}!{formula['cell']}**:\n")
220   - f.write(f"```\n{formula['formula']}\n```\n")
221   -
222   - # 解析XLOOKUP参数
223   - xlookup_match = re.search(r"XLOOKUP\(([^,]+),\s*'([^']+)'!([^,]+),\s*'([^']+)'!([^,]+)", formula['formula'])
224   - if xlookup_match:
225   - lookup_value = xlookup_match.group(1).strip()
226   - lookup_file = xlookup_match.group(2)
227   - lookup_range = xlookup_match.group(3)
228   - return_file = xlookup_match.group(4)
229   - return_range = xlookup_match.group(5)
230   -
231   - f.write("参数解析:\n")
232   - f.write(f"- 查找值: {lookup_value}\n")
233   - f.write(f"- 查找范围: {lookup_file}!{lookup_range}\n")
234   - f.write(f"- 返回范围: {return_file}!{return_range}\n")
235   - f.write("\n")
236   -
237   - # 数据流分析
238   - f.write("### 数据流向分析\n\n")
239   - f.write("基于公式分析,数据流向如下:\n\n")
240   -
241   - # 分析数据源文件
242   - data_sources = set()
243   - for ref in references:
244   - if ref['type'] == 'xlookup_reference' and ref['file']:
245   - data_sources.add(ref['file'])
246   -
247   - f.write("**数据源文件**:\n")
248   - for source in sorted(data_sources):
249   - f.write(f"- {source}\n")
250   - f.write("\n")
251   -
252   - f.write("**数据流向**:\n")
253   - f.write("1. 基础数据从各数据源文件获取\n")
254   - f.write("2. 通过XLOOKUP/VLOOKUP函数进行数据匹配\n")
255   - f.write("3. 在工资核算表中进行汇总计算\n")
256   - f.write("4. 生成最终的工资计算结果\n\n")
257   -
258   - return report_path
259   -
260   -def main():
261   - """主函数"""
262   - base_path = "/Users/mr.wang/代码库/绿纤/lvqianmeiye_ERP/参考资料/工资核算 -7月"
263   -
264   - # 要分析的文件列表
265   - files_to_analyze = [
266   - "工资(全字段).xlsx",
267   - "①B-a-26考勤汇总表.xlsx",
268   - "②B-a-17每日早报.xlsx",
269   - "③B-a-③呈现-消耗明细表.xlsx",
270   - "④B-a-25社保统计表.xlsx",
271   - "⑤B-a-12奖励统计表.xlsx",
272   - "B-b-③健康师底薪.xlsx",
273   - "B-b-④健康师提成-金三角顾问.xlsx",
274   - "B-b-⑤其他岗位工资.xlsx",
275   - "B-b-⑤当月数据及门店毛利.xlsx"
276   - ]
277   -
278   - all_formulas = []
279   - all_references = []
280   -
281   - print("开始分析Excel公式...")
282   - print("=" * 60)
283   -
284   - for filename in files_to_analyze:
285   - file_path = os.path.join(base_path, filename)
286   - if os.path.exists(file_path):
287   - print(f"正在分析: {filename}")
288   - formulas, references = extract_formulas_from_excel(file_path)
289   - all_formulas.extend(formulas)
290   - all_references.extend(references)
291   - print(f" 发现 {len(formulas)} 个公式")
292   - else:
293   - print(f"文件不存在: {filename}")
294   -
295   - # 分析依赖关系
296   - dependencies = analyze_formula_dependencies(all_formulas)
297   -
298   - # 生成报告
299   - report_path = generate_formula_report(all_formulas, all_references, dependencies)
300   -
301   - print(f"\n公式分析完成!")
302   - print(f"总公式数量: {len(all_formulas)}")
303   - print(f"总引用数量: {len(all_references)}")
304   - print(f"分析报告: {report_path}")
305   -
306   -if __name__ == "__main__":
307   - main()
antis-ncc-admin/src/views/lqKhxx/Form.vue
1 1 <template>
2   - <el-dialog :title="!dataForm.id ? '新建客户信息' : isDetail ? '客户信息详情' : '编辑客户信息'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="1200px">
  2 + <el-dialog :title="!dataForm.id ? '新建客户信息' : isDetail ? '客户信息详情' : '编辑客户信息'" :close-on-click-modal="false"
  3 + :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="1200px">
3 4 <el-row :gutter="10" class="compact-form">
4   - <el-form ref="elForm" :model="dataForm" size="mini" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules">
  5 + <el-form ref="elForm" :model="dataForm" size="mini" label-width="100px" label-position="right"
  6 + :disabled="!!isDetail" :rules="rules">
5 7 <!-- 基本信息 -->
6 8 <el-col :span="24">
7 9 <div class="form-section-title">
... ... @@ -11,57 +13,62 @@
11 13 </el-col>
12 14 <el-col :span="6" v-if="false">
13 15 <el-form-item label="客户编码" prop="id">
14   - <el-input v-model="dataForm.id" placeholder="系统自动生成" clearable readonly :style='{"width":"100%"}' >
  16 + <el-input v-model="dataForm.id" placeholder="系统自动生成" clearable readonly
  17 + :style='{ "width": "100%" }'>
15 18 </el-input>
16 19 </el-form-item>
17 20 </el-col>
18 21 <el-col :span="6">
19 22 <el-form-item label="客户名称" prop="khmc" required>
20   - <el-input v-model="dataForm.khmc" placeholder="请输入客户姓名" clearable :style='{"width":"100%"}' >
  23 + <el-input v-model="dataForm.khmc" placeholder="请输入客户姓名" clearable :style='{ "width": "100%" }'>
21 24 </el-input>
22 25 </el-form-item>
23 26 </el-col>
24 27 <el-col :span="6">
25 28 <el-form-item label="手机号" prop="sjh" required>
26   - <el-input v-model="dataForm.sjh" placeholder="请输入手机号" clearable :style='{"width":"100%"}' >
  29 + <el-input v-model="dataForm.sjh" placeholder="请输入手机号" clearable :style='{ "width": "100%" }'>
27 30 </el-input>
28 31 </el-form-item>
29 32 </el-col>
30 33 <el-col :span="6">
31 34 <el-form-item label="档案号" prop="dah">
32   - <el-input v-model="dataForm.dah" placeholder="请输入档案号" clearable :style='{"width":"100%"}' >
  35 + <el-input v-model="dataForm.dah" placeholder="请输入档案号" clearable :style='{ "width": "100%" }'>
33 36 </el-input>
34 37 </el-form-item>
35 38 </el-col>
36 39 <el-col :span="6">
37 40 <el-form-item label="性别" prop="xb">
38   - <el-select v-model="dataForm.xb" placeholder="请选择性别" clearable :style='{"width":"100%"}' >
39   - <el-option v-for="(item, index) in xbOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  41 + <el-select v-model="dataForm.xb" placeholder="请选择性别" clearable :style='{ "width": "100%" }'>
  42 + <el-option v-for="(item, index) in xbOptions" :key="index" :label="item.fullName"
  43 + :value="item.id"></el-option>
40 44 </el-select>
41 45 </el-form-item>
42 46 </el-col>
43 47 <el-col :span="6">
44 48 <el-form-item label="年龄" prop="ml">
45   - <el-input v-model="dataForm.ml" placeholder="请输入年龄" clearable :style='{"width":"100%"}' >
  49 + <el-input v-model="dataForm.ml" placeholder="请输入年龄" clearable :style='{ "width": "100%" }'>
46 50 <template slot="append">岁</template>
47 51 </el-input>
48 52 </el-form-item>
49 53 </el-col>
50 54 <el-col :span="6">
51 55 <el-form-item label="阳历生日" prop="yanglsr">
52   - <el-date-picker v-model="dataForm.yanglsr" placeholder="请选择阳历生日" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" >
  56 + <el-date-picker v-model="dataForm.yanglsr" placeholder="请选择阳历生日" clearable
  57 + :style='{ "width": "100%" }' type='date' format="yyyy-MM-dd" value-format="timestamp">
53 58 </el-date-picker>
54 59 </el-form-item>
55 60 </el-col>
56 61 <el-col :span="6">
57 62 <el-form-item label="阴历生日" prop="yinlsr">
58   - <el-date-picker v-model="dataForm.yinlsr" placeholder="请选择阴历生日" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" >
  63 + <el-date-picker v-model="dataForm.yinlsr" placeholder="请选择阴历生日" clearable
  64 + :style='{ "width": "100%" }' type='date' format="yyyy-MM-dd" value-format="timestamp">
59 65 </el-date-picker>
60 66 </el-form-item>
61 67 </el-col>
62 68 <el-col :span="12">
63 69 <el-form-item label="联系地址" prop="lxdz">
64   - <el-input v-model="dataForm.lxdz" placeholder="请输入详细联系地址" clearable :style='{"width":"100%"}' >
  70 + <el-input v-model="dataForm.lxdz" placeholder="请输入详细联系地址" clearable
  71 + :style='{ "width": "100%" }'>
65 72 </el-input>
66 73 </el-form-item>
67 74 </el-col>
... ... @@ -75,27 +82,32 @@
75 82 </el-col>
76 83 <el-col :span="6">
77 84 <el-form-item label="微信昵称" prop="wxnc">
78   - <el-input v-model="dataForm.wxnc" placeholder="请输入微信昵称" clearable :style='{"width":"100%"}' >
  85 + <el-input v-model="dataForm.wxnc" placeholder="请输入微信昵称" clearable :style='{ "width": "100%" }'>
79 86 </el-input>
80 87 </el-form-item>
81 88 </el-col>
82 89 <el-col :span="6">
83 90 <el-form-item label="公众号状态" prop="gzhzt">
84   - <el-select v-model="dataForm.gzhzt" placeholder="请选择公众号状态" clearable :style='{"width":"100%"}' >
85   - <el-option v-for="(item, index) in gzhztOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  91 + <el-select v-model="dataForm.gzhzt" placeholder="请选择公众号状态" clearable
  92 + :style='{ "width": "100%" }'>
  93 + <el-option v-for="(item, index) in gzhztOptions" :key="index" :label="item.fullName"
  94 + :value="item.id"></el-option>
86 95 </el-select>
87 96 </el-form-item>
88 97 </el-col>
89 98 <el-col :span="6">
90 99 <el-form-item label="小程序状态" prop="wxxcxzt">
91   - <el-select v-model="dataForm.wxxcxzt" placeholder="请选择小程序状态" clearable :style='{"width":"100%"}' >
92   - <el-option v-for="(item, index) in wxxcxztOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  100 + <el-select v-model="dataForm.wxxcxzt" placeholder="请选择小程序状态" clearable
  101 + :style='{ "width": "100%" }'>
  102 + <el-option v-for="(item, index) in wxxcxztOptions" :key="index" :label="item.fullName"
  103 + :value="item.id"></el-option>
93 104 </el-select>
94 105 </el-form-item>
95 106 </el-col>
96 107 <el-col :span="6">
97 108 <el-form-item label="最近登录时间" prop="zjdlsj">
98   - <el-date-picker v-model="dataForm.zjdlsj" placeholder="请选择登录时间" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" >
  109 + <el-date-picker v-model="dataForm.zjdlsj" placeholder="请选择登录时间" clearable
  110 + :style='{ "width": "100%" }' type='date' format="yyyy-MM-dd" value-format="timestamp">
99 111 </el-date-picker>
100 112 </el-form-item>
101 113 </el-col>
... ... @@ -109,48 +121,56 @@
109 121 </el-col>
110 122 <el-col :span="6">
111 123 <el-form-item label="客户目前归属" prop="khmqgs">
112   - <el-select v-model="dataForm.khmqgs" placeholder="请选择客户归属" clearable :style='{"width":"100%"}' >
113   - <el-option v-for="(item, index) in khmqgsOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  124 + <el-select v-model="dataForm.khmqgs" placeholder="请选择客户归属" clearable
  125 + :style='{ "width": "100%" }'>
  126 + <el-option v-for="(item, index) in khmqgsOptions" :key="index" :label="item.fullName"
  127 + :value="item.id"></el-option>
114 128 </el-select>
115 129 </el-form-item>
116 130 </el-col>
117 131 <el-col :span="6">
118 132 <el-form-item label="归属门店" prop="gsmd">
119   - <el-input v-model="dataForm.gsmd" placeholder="请输入归属门店" clearable :style='{"width":"100%"}' >
  133 + <el-input v-model="dataForm.gsmd" placeholder="请输入归属门店" clearable :style='{ "width": "100%" }'>
120 134 </el-input>
121 135 </el-form-item>
122 136 </el-col>
123 137 <el-col :span="6">
124 138 <el-form-item label="客户类型" prop="khlx">
125   - <el-select v-model="dataForm.khlx" placeholder="请选择客户类型" clearable :style='{"width":"100%"}' >
126   - <el-option v-for="(item, index) in khlxOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  139 + <el-select v-model="dataForm.khlx" placeholder="请选择客户类型" clearable :style='{ "width": "100%" }'>
  140 + <el-option v-for="(item, index) in khlxOptions" :key="index" :label="item.fullName"
  141 + :value="item.id"></el-option>
127 142 </el-select>
128 143 </el-form-item>
129 144 </el-col>
130 145 <el-col :span="6">
131 146 <el-form-item label="客户阶段" prop="khjd">
132   - <el-select v-model="dataForm.khjd" placeholder="请选择客户阶段" clearable :style='{"width":"100%"}' >
133   - <el-option v-for="(item, index) in khjdOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  147 + <el-select v-model="dataForm.khjd" placeholder="请选择客户阶段" clearable :style='{ "width": "100%" }'>
  148 + <el-option v-for="(item, index) in khjdOptions" :key="index" :label="item.fullName"
  149 + :value="item.id"></el-option>
134 150 </el-select>
135 151 </el-form-item>
136 152 </el-col>
137 153 <el-col :span="6">
138 154 <el-form-item label="客户消费" prop="khxf">
139   - <el-checkbox-group v-model="dataForm.khxf" :style='{}' >
140   - <el-checkbox v-for="(item, index) in khxfOptions" :key="index" :label="item.id" >{{item.fullName}}</el-checkbox>
  155 + <el-checkbox-group v-model="dataForm.khxf" :style='{}'>
  156 + <el-checkbox v-for="(item, index) in khxfOptions" :key="index" :label="item.id">{{
  157 + item.fullName
  158 + }}</el-checkbox>
141 159 </el-checkbox-group>
142 160 </el-form-item>
143 161 </el-col>
144 162 <el-col :span="6">
145 163 <el-form-item label="消费频次" prop="xfpc">
146   - <el-select v-model="dataForm.xfpc" placeholder="请选择消费频次" clearable :style='{"width":"100%"}' >
147   - <el-option v-for="(item, index) in xfpcOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  164 + <el-select v-model="dataForm.xfpc" placeholder="请选择消费频次" clearable :style='{ "width": "100%" }'>
  165 + <el-option v-for="(item, index) in xfpcOptions" :key="index" :label="item.fullName"
  166 + :value="item.id"></el-option>
148 167 </el-select>
149 168 </el-form-item>
150 169 </el-col>
151 170 <el-col :span="6">
152 171 <el-form-item label="注册时间" prop="zcsj">
153   - <el-date-picker v-model="dataForm.zcsj" placeholder="请选择注册时间" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" >
  172 + <el-date-picker v-model="dataForm.zcsj" placeholder="请选择注册时间" clearable
  173 + :style='{ "width": "100%" }' type='date' format="yyyy-MM-dd" value-format="timestamp">
154 174 </el-date-picker>
155 175 </el-form-item>
156 176 </el-col>
... ... @@ -164,31 +184,25 @@
164 184 </el-col>
165 185 <el-col :span="6">
166 186 <el-form-item label="推荐人" prop="tjr">
167   - <el-input v-model="dataForm.tjr" placeholder="请输入推荐人" clearable :style='{"width":"100%"}' >
  187 + <el-input v-model="dataForm.tjr" placeholder="请输入推荐人" clearable :style='{ "width": "100%" }'>
168 188 </el-input>
169 189 </el-form-item>
170 190 </el-col>
171 191 <el-col :span="6">
172 192 <el-form-item label="负责顾问" prop="fzgw">
173   - <el-input v-model="dataForm.fzgw" placeholder="请输入负责顾问" clearable :style='{"width":"100%"}' >
  193 + <el-input v-model="dataForm.fzgw" placeholder="请输入负责顾问" clearable :style='{ "width": "100%" }'>
174 194 </el-input>
175 195 </el-form-item>
176 196 </el-col>
177 197 <el-col :span="6">
178 198 <el-form-item label="美容师" prop="mrs">
179   - <el-input v-model="dataForm.mrs" placeholder="请输入美容师" clearable :style='{"width":"100%"}' >
  199 + <el-input v-model="dataForm.mrs" placeholder="请输入美容师" clearable :style='{ "width": "100%" }'>
180 200 </el-input>
181 201 </el-form-item>
182 202 </el-col>
183 203 <el-col :span="6">
184 204 <el-form-item label="进店渠道" prop="jdqd">
185   - <el-input v-model="dataForm.jdqd" placeholder="请输入进店渠道" clearable :style='{"width":"100%"}' >
186   - </el-input>
187   - </el-form-item>
188   - </el-col>
189   - <el-col :span="12">
190   - <el-form-item label="最近服务人员" prop="zjycfwry">
191   - <el-input v-model="dataForm.zjycfwry" placeholder="请输入最近服务人员" clearable :style='{"width":"100%"}' >
  205 + <el-input v-model="dataForm.jdqd" placeholder="请输入进店渠道" clearable :style='{ "width": "100%" }'>
192 206 </el-input>
193 207 </el-form-item>
194 208 </el-col>
... ... @@ -200,53 +214,6 @@
200 214 <span>到店记录</span>
201 215 </div>
202 216 </el-col>
203   - <el-col :span="6">
204   - <el-form-item label="首次到店" prop="scdd">
205   - <el-date-picker v-model="dataForm.scdd" placeholder="请选择首次到店时间" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" >
206   - </el-date-picker>
207   - </el-form-item>
208   - </el-col>
209   - <el-col :span="6">
210   - <el-form-item label="最近到店" prop="zjdd">
211   - <el-date-picker v-model="dataForm.zjdd" placeholder="请选择最近到店时间" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" >
212   - </el-date-picker>
213   - </el-form-item>
214   - </el-col>
215   - <el-col :span="6">
216   - <el-form-item label="未到店天数" prop="wddts">
217   - <el-input v-model="dataForm.wddts" placeholder="请输入未到店天数" clearable :style='{"width":"100%"}' >
218   - <template slot="append">天</template>
219   - </el-input>
220   - </el-form-item>
221   - </el-col>
222   - <el-col :span="6">
223   - <el-form-item label="期间到店频次" prop="qjddpc">
224   - <el-input v-model="dataForm.qjddpc" placeholder="请输入到店频次" clearable :style='{"width":"100%"}' >
225   - <template slot="append">次</template>
226   - </el-input>
227   - </el-form-item>
228   - </el-col>
229   - <el-col :span="6">
230   - <el-form-item label="期间服务单次" prop="qjfwdc">
231   - <el-input v-model="dataForm.qjfwdc" placeholder="请输入服务次数" clearable :style='{"width":"100%"}' >
232   - <template slot="append">次</template>
233   - </el-input>
234   - </el-form-item>
235   - </el-col>
236   - <el-col :span="6">
237   - <el-form-item label="累计消费次数" prop="ljxfcs">
238   - <el-input v-model="dataForm.ljxfcs" placeholder="请输入累计消费次数" clearable :style='{"width":"100%"}' >
239   - <template slot="append">次</template>
240   - </el-input>
241   - </el-form-item>
242   - </el-col>
243   - <el-col :span="6">
244   - <el-form-item label="累计服务次数" prop="ljfwcs">
245   - <el-input v-model="dataForm.ljfwcs" placeholder="请输入累计服务次数" clearable :style='{"width":"100%"}' >
246   - <template slot="append">次</template>
247   - </el-input>
248   - </el-form-item>
249   - </el-col>
250 217  
251 218 <!-- 消费信息 -->
252 219 <el-col :span="24">
... ... @@ -255,34 +222,6 @@
255 222 <span>消费信息</span>
256 223 </div>
257 224 </el-col>
258   - <el-col :span="6">
259   - <el-form-item label="期间现金消费" prop="qjxjxf">
260   - <el-input v-model="dataForm.qjxjxf" placeholder="请输入现金消费金额" clearable :style='{"width":"100%"}' @input="formatNumber('qjxjxf')">
261   - <template slot="append">元</template>
262   - </el-input>
263   - </el-form-item>
264   - </el-col>
265   - <el-col :span="6">
266   - <el-form-item label="期间项目耗卡" prop="qjxmhk">
267   - <el-input v-model="dataForm.qjxmhk" placeholder="请输入项目耗卡金额" clearable :style='{"width":"100%"}' @input="formatNumber('qjxmhk')">
268   - <template slot="append">元</template>
269   - </el-input>
270   - </el-form-item>
271   - </el-col>
272   - <el-col :span="6">
273   - <el-form-item label="期间储值消耗" prop="qjczxh">
274   - <el-input v-model="dataForm.qjczxh" placeholder="请输入储值消耗金额" clearable :style='{"width":"100%"}' @input="formatNumber('qjczxh')">
275   - <template slot="append">元</template>
276   - </el-input>
277   - </el-form-item>
278   - </el-col>
279   - <el-col :span="6">
280   - <el-form-item label="现金消费金额" prop="ljxjxfje">
281   - <el-input v-model="dataForm.ljxjxfje" placeholder="请输入现金消费总额" clearable :style='{"width":"100%"}' @input="formatNumber('ljxjxfje')">
282   - <template slot="append">元</template>
283   - </el-input>
284   - </el-form-item>
285   - </el-col>
286 225  
287 226 <!-- 余额信息 -->
288 227 <el-col :span="24">
... ... @@ -291,48 +230,6 @@
291 230 <span>余额信息</span>
292 231 </div>
293 232 </el-col>
294   - <el-col :span="6">
295   - <el-form-item label="剩余储值" prop="sycz">
296   - <el-input v-model="dataForm.sycz" placeholder="请输入剩余储值" clearable :style='{"width":"100%"}' @input="formatNumber('sycz')">
297   - <template slot="append">元</template>
298   - </el-input>
299   - </el-form-item>
300   - </el-col>
301   - <el-col :span="6">
302   - <el-form-item label="剩余积分" prop="syjf">
303   - <el-input v-model="dataForm.syjf" placeholder="请输入剩余积分" clearable :style='{"width":"100%"}' >
304   - <template slot="append">分</template>
305   - </el-input>
306   - </el-form-item>
307   - </el-col>
308   - <el-col :span="6">
309   - <el-form-item label="剩余品项金额" prop="sypxje">
310   - <el-input v-model="dataForm.sypxje" placeholder="请输入剩余品项金额" clearable :style='{"width":"100%"}' @input="formatNumber('sypxje')">
311   - <template slot="append">元</template>
312   - </el-input>
313   - </el-form-item>
314   - </el-col>
315   - <el-col :span="6">
316   - <el-form-item label="剩余套餐金额" prop="sytcje">
317   - <el-input v-model="dataForm.sytcje" placeholder="请输入剩余套餐金额" clearable :style='{"width":"100%"}' @input="formatNumber('sytcje')">
318   - <template slot="append">元</template>
319   - </el-input>
320   - </el-form-item>
321   - </el-col>
322   - <el-col :span="6">
323   - <el-form-item label="项目耗卡金额" prop="ljxmhkje">
324   - <el-input v-model="dataForm.ljxmhkje" placeholder="请输入项目耗卡金额" clearable :style='{"width":"100%"}' @input="formatNumber('ljxmhkje')">
325   - <template slot="append">元</template>
326   - </el-input>
327   - </el-form-item>
328   - </el-col>
329   - <el-col :span="6">
330   - <el-form-item label="累计储值消耗" prop="ljczxh">
331   - <el-input v-model="dataForm.ljczxh" placeholder="请输入累计储值消耗" clearable :style='{"width":"100%"}' @input="formatNumber('ljczxh')">
332   - <template slot="append">元</template>
333   - </el-input>
334   - </el-form-item>
335   - </el-col>
336 233  
337 234 <!-- 备注信息 -->
338 235 <el-col :span="24">
... ... @@ -343,12 +240,13 @@
343 240 </el-col>
344 241 <el-col :span="24">
345 242 <el-form-item label="备注" prop="bz">
346   - <el-input v-model="dataForm.bz" placeholder="请输入备注信息" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":3,"maxRows":6}' >
  243 + <el-input v-model="dataForm.bz" placeholder="请输入备注信息" show-word-limit
  244 + :style='{ "width": "100%" }' type='textarea' :autosize='{ "minRows": 3, "maxRows": 6 }'>
347 245 </el-input>
348 246 </el-form-item>
349 247 </el-col>
350 248  
351   - </el-form>
  249 + </el-form>
352 250 </el-row>
353 251 <span slot="footer" class="dialog-footer">
354 252 <el-button @click="visible = false">取 消</el-button>
... ... @@ -358,172 +256,154 @@
358 256 </el-dialog>
359 257 </template>
360 258 <script>
361   - import request from '@/utils/request'
362   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
363   - import { previewDataInterface } from '@/api/systemData/dataInterface'
364   - export default {
365   - components: {},
366   - props: [],
367   - data() {
368   - return {
369   - loading: false,
370   - visible: false,
371   - isDetail: false,
372   - dataForm: {
373   - id:'',
374   - id:undefined,
375   - khmc:undefined,
376   - sjh:undefined,
377   - dah:undefined,
378   - xb:undefined,
379   - gzhzt:undefined,
380   - wxnc:undefined,
381   - wxxcxzt:undefined,
382   - zjdlsj:undefined,
383   - khmqgs:undefined,
384   - gsmd:undefined,
385   - zcsj:undefined,
386   - khlx:undefined,
387   - khjd:undefined,
388   - khxf:[],
389   - xfpc:undefined,
390   - tjr:undefined,
391   - fzgw:undefined,
392   - mrs:undefined,
393   - jdqd:undefined,
394   - lxdz:undefined,
395   - bz:undefined,
396   - scdd:undefined,
397   - zjdd:undefined,
398   - wddts:undefined,
399   - yanglsr:undefined,
400   - yinlsr:undefined,
401   - ml:undefined,
402   - zjycfwry:undefined,
403   - qjddpc:undefined,
404   - qjfwdc:undefined,
405   - qjxjxf:undefined,
406   - qjxmhk:undefined,
407   - qjczxh:undefined,
408   - sycz:undefined,
409   - syjf:undefined,
410   - sypxje:undefined,
411   - sytcje:undefined,
412   - ljxmhkje:undefined,
413   - ljczxh:undefined,
414   - ljxfcs:undefined,
415   - ljfwcs:undefined,
416   - ljxjxfje:undefined,
417   - },
418   - rules: {
419   - khmc: [
420   - { required: true, message: '请输入客户名称', trigger: 'blur' }
421   - ],
422   - sjh: [
423   - { required: true, message: '请输入手机号', trigger: 'blur' },
424   - { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号格式', trigger: 'blur' }
425   - ]
426   - },
427   - xbOptions:[{"fullName":"男","id":"男"},{"fullName":"女","id":"女"}],
428   - gzhztOptions:[{"fullName":"已绑定","id":"已绑定"},{"fullName":"未绑定","id":"未绑定"}],
429   - wxxcxztOptions:[{"fullName":"已绑定","id":"已绑定"},{"fullName":"未绑定","id":"未绑定"}],
430   - khmqgsOptions:[{"fullName":"会员","id":"会员"},{"fullName":"线索池","id":"线索池"},{"fullName":"会员-归档","id":"会员-归档"}],
431   - khlxOptions:[{"fullName":"新客","id":"新客"},{"fullName":"老客","id":"老客"},{"fullName":"潜客","id":"潜客"},{"fullName":"线索","id":"线索"}],
432   - khjdOptions:[{"fullName":"体验","id":"体验"},{"fullName":"有效","id":"有效"},{"fullName":"沉睡","id":"沉睡"},{"fullName":"流失","id":"流失"}],
433   - khxfOptions:[{"fullName":"D客","id":"D客"},{"fullName":"有效","id":"有效"}],
434   - xfpcOptions:[{"fullName":"高频","id":"高频"},{"fullName":"低频","id":"低频"}],
435   - }
  259 +import request from '@/utils/request'
  260 +import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
  261 +import { previewDataInterface } from '@/api/systemData/dataInterface'
  262 +export default {
  263 + components: {},
  264 + props: [],
  265 + data() {
  266 + return {
  267 + loading: false,
  268 + visible: false,
  269 + isDetail: false,
  270 + dataForm: {
  271 + id: '',
  272 + id: undefined,
  273 + khmc: undefined,
  274 + sjh: undefined,
  275 + dah: undefined,
  276 + xb: undefined,
  277 + gzhzt: undefined,
  278 + wxnc: undefined,
  279 + wxxcxzt: undefined,
  280 + zjdlsj: undefined,
  281 + khmqgs: undefined,
  282 + gsmd: undefined,
  283 + zcsj: undefined,
  284 + khlx: undefined,
  285 + khjd: undefined,
  286 + khxf: [],
  287 + xfpc: undefined,
  288 + tjr: undefined,
  289 + fzgw: undefined,
  290 + mrs: undefined,
  291 + jdqd: undefined,
  292 + lxdz: undefined,
  293 + bz: undefined,
  294 + yanglsr: undefined,
  295 + yinlsr: undefined,
  296 + ml: undefined,
  297 + },
  298 + rules: {
  299 + khmc: [
  300 + { required: true, message: '请输入客户名称', trigger: 'blur' }
  301 + ],
  302 + sjh: [
  303 + { required: true, message: '请输入手机号', trigger: 'blur' },
  304 + { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号格式', trigger: 'blur' }
  305 + ]
  306 + },
  307 + xbOptions: [{ "fullName": "男", "id": "男" }, { "fullName": "女", "id": "女" }],
  308 + gzhztOptions: [{ "fullName": "已绑定", "id": "已绑定" }, { "fullName": "未绑定", "id": "未绑定" }],
  309 + wxxcxztOptions: [{ "fullName": "已绑定", "id": "已绑定" }, { "fullName": "未绑定", "id": "未绑定" }],
  310 + khmqgsOptions: [{ "fullName": "会员", "id": "会员" }, { "fullName": "线索池", "id": "线索池" }, { "fullName": "会员-归档", "id": "会员-归档" }],
  311 + khlxOptions: [{ "fullName": "新客", "id": "新客" }, { "fullName": "老客", "id": "老客" }, { "fullName": "潜客", "id": "潜客" }, { "fullName": "线索", "id": "线索" }],
  312 + khjdOptions: [{ "fullName": "体验", "id": "体验" }, { "fullName": "有效", "id": "有效" }, { "fullName": "沉睡", "id": "沉睡" }, { "fullName": "流失", "id": "流失" }],
  313 + khxfOptions: [{ "fullName": "D客", "id": "D客" }, { "fullName": "有效", "id": "有效" }],
  314 + xfpcOptions: [{ "fullName": "高频", "id": "高频" }, { "fullName": "低频", "id": "低频" }],
  315 + }
  316 + },
  317 + computed: {},
  318 + watch: {},
  319 + created() {
  320 + },
  321 + mounted() {
  322 + },
  323 + methods: {
  324 + goBack() {
  325 + this.$emit('refresh')
  326 + },
  327 + init(id, isDetail) {
  328 + this.dataForm.id = id || 0;
  329 + this.visible = true;
  330 + this.isDetail = isDetail || false;
  331 + this.$nextTick(() => {
  332 + this.$refs['elForm'].resetFields();
  333 + if (this.dataForm.id) {
  334 + request({
  335 + url: '/api/Extend/LqKhxx/' + this.dataForm.id,
  336 + method: 'get'
  337 + }).then(res => {
  338 + this.dataForm = res.data;
  339 + if (!this.dataForm.khxf) this.dataForm.khxf = [];
  340 + })
  341 + }
  342 + })
436 343 },
437   - computed: {},
438   - watch: {},
439   - created() {
  344 + resetForm() {
  345 + this.$confirm('确定要重置表单吗?', '提示', {
  346 + confirmButtonText: '确定',
  347 + cancelButtonText: '取消',
  348 + type: 'warning'
  349 + }).then(() => {
  350 + this.$refs['elForm'].resetFields();
  351 + this.$message.success('表单已重置');
  352 + }).catch(() => {
  353 + // 用户取消
  354 + });
440 355 },
441   - mounted() {
442   - },
443   - methods: {
444   - goBack() {
445   - this.$emit('refresh')
446   - },
447   - init(id, isDetail) {
448   - this.dataForm.id = id || 0;
449   - this.visible = true;
450   - this.isDetail = isDetail || false;
451   - this.$nextTick(() => {
452   - this.$refs['elForm'].resetFields();
453   - if (this.dataForm.id) {
  356 + formatNumber(field) {
  357 + // 移除千分位分隔符,只保留数字和小数点
  358 + let value = this.dataForm[field].toString().replace(/,/g, '');
  359 + // 确保是有效的数字格式
  360 + if (!/^\d*\.?\d*$/.test(value)) {
  361 + value = value.replace(/[^\d.]/g, '');
  362 + }
  363 + // 更新原始值
  364 + this.dataForm[field] = value;
  365 + },
  366 + dataFormSubmit() {
  367 + this.$refs['elForm'].validate((valid) => {
  368 + if (valid) {
  369 + if (!this.dataForm.id) {
  370 + request({
  371 + url: `/api/Extend/LqKhxx`,
  372 + method: 'post',
  373 + data: this.dataForm,
  374 + }).then((res) => {
  375 + this.$message({
  376 + message: res.msg,
  377 + type: 'success',
  378 + duration: 1000,
  379 + onClose: () => {
  380 + this.visible = false,
  381 + this.$emit('refresh', true)
  382 + }
  383 + })
  384 + })
  385 + } else {
454 386 request({
455 387 url: '/api/Extend/LqKhxx/' + this.dataForm.id,
456   - method: 'get'
457   - }).then(res =>{
458   - this.dataForm = res.data;
459   - if(!this.dataForm.khxf)this.dataForm.khxf=[];
  388 + method: 'PUT',
  389 + data: this.dataForm
  390 + }).then((res) => {
  391 + this.$message({
  392 + message: res.msg,
  393 + type: 'success',
  394 + duration: 1000,
  395 + onClose: () => {
  396 + this.visible = false
  397 + this.$emit('refresh', true)
  398 + }
  399 + })
460 400 })
461 401 }
462   - })
463   - },
464   - resetForm() {
465   - this.$confirm('确定要重置表单吗?', '提示', {
466   - confirmButtonText: '确定',
467   - cancelButtonText: '取消',
468   - type: 'warning'
469   - }).then(() => {
470   - this.$refs['elForm'].resetFields();
471   - this.$message.success('表单已重置');
472   - }).catch(() => {
473   - // 用户取消
474   - });
475   - },
476   - formatNumber(field) {
477   - // 移除千分位分隔符,只保留数字和小数点
478   - let value = this.dataForm[field].toString().replace(/,/g, '');
479   - // 确保是有效的数字格式
480   - if (!/^\d*\.?\d*$/.test(value)) {
481   - value = value.replace(/[^\d.]/g, '');
482 402 }
483   - // 更新原始值
484   - this.dataForm[field] = value;
485   - },
486   - dataFormSubmit() {
487   - this.$refs['elForm'].validate((valid) => {
488   - if (valid) {
489   - if (!this.dataForm.id) {
490   - request({
491   - url: `/api/Extend/LqKhxx`,
492   - method: 'post',
493   - data: this.dataForm,
494   - }).then((res) => {
495   - this.$message({
496   - message: res.msg,
497   - type: 'success',
498   - duration: 1000,
499   - onClose: () => {
500   - this.visible = false,
501   - this.$emit('refresh', true)
502   - }
503   - })
504   - })
505   - } else {
506   - request({
507   - url: '/api/Extend/LqKhxx/' + this.dataForm.id,
508   - method: 'PUT',
509   - data: this.dataForm
510   - }).then((res) => {
511   - this.$message({
512   - message: res.msg,
513   - type: 'success',
514   - duration: 1000,
515   - onClose: () => {
516   - this.visible = false
517   - this.$emit('refresh', true)
518   - }
519   - })
520   - })
521   - }
522   - }
523   - })
524   - },
525   - }
  403 + })
  404 + },
526 405 }
  406 +}
527 407 </script>
528 408  
529 409 <style scoped>
... ...
antis-ncc-admin/src/views/lqKhxx/index.vue
... ... @@ -5,249 +5,171 @@
5 5 <el-form @submit.native.prevent>
6 6 <el-col :span="6">
7 7 <el-form-item label="客户编码">
8   - <el-input v-model="query.id" placeholder="客户编码" clearable />
  8 + <el-input v-model="query.id" placeholder="客户编码" clearable />
9 9 </el-form-item>
10 10 </el-col>
11 11 <el-col :span="6">
12 12 <el-form-item label="客户名称">
13   - <el-input v-model="query.khmc" placeholder="客户名称" clearable />
  13 + <el-input v-model="query.khmc" placeholder="客户名称" clearable />
14 14 </el-form-item>
15 15 </el-col>
16 16 <el-col :span="6">
17 17 <el-form-item label="手机号">
18   - <el-input v-model="query.sjh" placeholder="手机号" clearable />
  18 + <el-input v-model="query.sjh" placeholder="手机号" clearable />
19 19 </el-form-item>
20 20 </el-col>
21 21 <template v-if="showAll">
22   - <el-col :span="6">
23   - <el-form-item label="档案号">
24   - <el-input v-model="query.dah" placeholder="档案号" clearable />
25   - </el-form-item>
26   - </el-col>
27   - <el-col :span="6">
28   - <el-form-item label="性别">
29   - <el-select v-model="query.xb" placeholder="性别" clearable >
30   - <el-option v-for="(item, index) in xbOptions" :key="index" :label="item.fullName" :value="item.id" />
31   - </el-select>
32   - </el-form-item>
33   - </el-col>
34   - <el-col :span="6">
35   - <el-form-item label="公众号状态">
36   - <el-select v-model="query.gzhzt" placeholder="公众号状态" clearable >
37   - <el-option v-for="(item, index) in gzhztOptions" :key="index" :label="item.fullName" :value="item.id" />
38   - </el-select>
39   - </el-form-item>
40   - </el-col>
41   - <el-col :span="6">
42   - <el-form-item label="微信昵称">
43   - <el-input v-model="query.wxnc" placeholder="微信昵称" clearable />
44   - </el-form-item>
45   - </el-col>
46   - <el-col :span="6">
47   - <el-form-item label="小程序状态">
48   - <el-select v-model="query.wxxcxzt" placeholder="小程序状态" clearable >
49   - <el-option v-for="(item, index) in wxxcxztOptions" :key="index" :label="item.fullName" :value="item.id" />
50   - </el-select>
51   - </el-form-item>
52   - </el-col>
53   - <el-col :span="6">
54   - <el-form-item label="最近登录时间">
55   - <el-date-picker v-model="query.zjdlsj" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
56   - </el-date-picker>
57   - </el-form-item>
58   - </el-col>
59   - <el-col :span="6">
60   - <el-form-item label="客户目前归属">
61   - <el-select v-model="query.khmqgs" placeholder="客户目前归属" clearable >
62   - <el-option v-for="(item, index) in khmqgsOptions" :key="index" :label="item.fullName" :value="item.id" />
63   - </el-select>
64   - </el-form-item>
65   - </el-col>
66   - <el-col :span="6">
67   - <el-form-item label="归属门店">
68   - <el-input v-model="query.gsmd" placeholder="归属门店" clearable />
69   - </el-form-item>
70   - </el-col>
71   - <el-col :span="6">
72   - <el-form-item label="注册时间">
73   - <el-date-picker v-model="query.zcsj" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
74   - </el-date-picker>
75   - </el-form-item>
76   - </el-col>
77   - <el-col :span="6">
78   - <el-form-item label="客户类型">
79   - <el-select v-model="query.khlx" placeholder="客户类型" clearable >
80   - <el-option v-for="(item, index) in khlxOptions" :key="index" :label="item.fullName" :value="item.id" />
81   - </el-select>
82   - </el-form-item>
83   - </el-col>
84   - <el-col :span="6">
85   - <el-form-item label="客户阶段">
86   - <el-select v-model="query.khjd" placeholder="客户阶段" clearable >
87   - <el-option v-for="(item, index) in khjdOptions" :key="index" :label="item.fullName" :value="item.id" />
88   - </el-select>
89   - </el-form-item>
90   - </el-col>
91   - <el-col :span="6">
92   - <el-form-item label="客户消费">
93   - <el-select v-model="query.khxf" placeholder="客户消费" >
94   - <el-option v-for="(item, index) in khxfOptions" :key="index" :label="item.fullName" :value="item.id" />
95   - </el-select>
96   - </el-form-item>
97   - </el-col>
98   - <el-col :span="6">
99   - <el-form-item label="消费频次">
100   - <el-select v-model="query.xfpc" placeholder="消费频次" clearable >
101   - <el-option v-for="(item, index) in xfpcOptions" :key="index" :label="item.fullName" :value="item.id" />
102   - </el-select>
103   - </el-form-item>
104   - </el-col>
105   - <el-col :span="6">
106   - <el-form-item label="推荐人">
107   - <el-input v-model="query.tjr" placeholder="推荐人" clearable />
108   - </el-form-item>
109   - </el-col>
110   - <el-col :span="6">
111   - <el-form-item label="负责顾问">
112   - <el-input v-model="query.fzgw" placeholder="负责顾问" clearable />
113   - </el-form-item>
114   - </el-col>
115   - <el-col :span="6">
116   - <el-form-item label="美容师">
117   - <el-input v-model="query.mrs" placeholder="美容师" clearable />
118   - </el-form-item>
119   - </el-col>
120   - <el-col :span="6">
121   - <el-form-item label="进店渠道">
122   - <el-input v-model="query.jdqd" placeholder="进店渠道" clearable />
123   - </el-form-item>
124   - </el-col>
125   - <el-col :span="6">
126   - <el-form-item label="联系地址">
127   - <el-input v-model="query.lxdz" placeholder="联系地址" clearable />
128   - </el-form-item>
129   - </el-col>
130   - <el-col :span="6">
131   - <el-form-item label="备注">
132   - <el-input v-model="query.bz" placeholder="备注" />
133   - </el-form-item>
134   - </el-col>
135   - <el-col :span="6">
136   - <el-form-item label="首次到店">
137   - <el-date-picker v-model="query.scdd" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
138   - </el-date-picker>
139   - </el-form-item>
140   - </el-col>
141   - <el-col :span="6">
142   - <el-form-item label="最近到店">
143   - <el-date-picker v-model="query.zjdd" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
144   - </el-date-picker>
145   - </el-form-item>
146   - </el-col>
147   - <el-col :span="6">
148   - <el-form-item label="未到店天数">
149   - <el-input v-model="query.wddts" placeholder="未到店天数" clearable />
150   - </el-form-item>
151   - </el-col>
152   - <el-col :span="6">
153   - <el-form-item label="阳历生日">
154   - <el-date-picker v-model="query.yanglsr" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
155   - </el-date-picker>
156   - </el-form-item>
157   - </el-col>
158   - <el-col :span="6">
159   - <el-form-item label="阴历生日">
160   - <el-date-picker v-model="query.yinlsr" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
161   - </el-date-picker>
162   - </el-form-item>
163   - </el-col>
164   - <el-col :span="6">
165   - <el-form-item label="年龄">
166   - <el-input v-model="query.ml" placeholder="年龄" clearable />
167   - </el-form-item>
168   - </el-col>
169   - <el-col :span="6">
170   - <el-form-item label="最近服务人员">
171   - <el-input v-model="query.zjycfwry" placeholder="最近服务人员" clearable />
172   - </el-form-item>
173   - </el-col>
174   - <el-col :span="6">
175   - <el-form-item label="期间到店频次">
176   - <el-input v-model="query.qjddpc" placeholder="期间到店频次" clearable />
177   - </el-form-item>
178   - </el-col>
179   - <el-col :span="6">
180   - <el-form-item label="期间服务单次">
181   - <el-input v-model="query.qjfwdc" placeholder="期间服务单次" clearable />
182   - </el-form-item>
183   - </el-col>
184   - <el-col :span="6">
185   - <el-form-item label="期间现金消费">
186   - <el-input v-model="query.qjxjxf" placeholder="期间现金消费" clearable />
187   - </el-form-item>
188   - </el-col>
189   - <el-col :span="6">
190   - <el-form-item label="期间项目耗卡">
191   - <el-input v-model="query.qjxmhk" placeholder="期间项目耗卡" clearable />
192   - </el-form-item>
193   - </el-col>
194   - <el-col :span="6">
195   - <el-form-item label="期间储值消耗">
196   - <el-input v-model="query.qjczxh" placeholder="期间储值消耗" clearable />
197   - </el-form-item>
198   - </el-col>
199   - <el-col :span="6">
200   - <el-form-item label="剩余储值">
201   - <el-input v-model="query.sycz" placeholder="剩余储值" clearable />
202   - </el-form-item>
203   - </el-col>
204   - <el-col :span="6">
205   - <el-form-item label="剩余积分">
206   - <el-input v-model="query.syjf" placeholder="剩余积分" clearable />
207   - </el-form-item>
208   - </el-col>
209   - <el-col :span="6">
210   - <el-form-item label="剩余品项金额">
211   - <el-input v-model="query.sypxje" placeholder="剩余品项金额" clearable />
212   - </el-form-item>
213   - </el-col>
214   - <el-col :span="6">
215   - <el-form-item label="剩余套餐金额">
216   - <el-input v-model="query.sytcje" placeholder="剩余套餐金额" clearable />
217   - </el-form-item>
218   - </el-col>
219   - <el-col :span="6">
220   - <el-form-item label="项目耗卡金额">
221   - <el-input v-model="query.ljxmhkje" placeholder="项目耗卡金额" clearable />
222   - </el-form-item>
223   - </el-col>
224   - <el-col :span="6">
225   - <el-form-item label="累计储值消耗">
226   - <el-input v-model="query.ljczxh" placeholder="累计储值消耗" clearable />
227   - </el-form-item>
228   - </el-col>
229   - <el-col :span="6">
230   - <el-form-item label="累计消费次数">
231   - <el-input v-model="query.ljxfcs" placeholder="累计消费次数" clearable />
232   - </el-form-item>
233   - </el-col>
234   - <el-col :span="6">
235   - <el-form-item label="累计服务次数">
236   - <el-input v-model="query.ljfwcs" placeholder="累计服务次数" clearable />
237   - </el-form-item>
238   - </el-col>
239   - <el-col :span="6">
240   - <el-form-item label="现金消费金额">
241   - <el-input v-model="query.ljxjxfje" placeholder="现金消费金额" clearable />
242   - </el-form-item>
243   - </el-col>
  22 + <el-col :span="6">
  23 + <el-form-item label="档案号">
  24 + <el-input v-model="query.dah" placeholder="档案号" clearable />
  25 + </el-form-item>
  26 + </el-col>
  27 + <el-col :span="6">
  28 + <el-form-item label="性别">
  29 + <el-select v-model="query.xb" placeholder="性别" clearable>
  30 + <el-option v-for="(item, index) in xbOptions" :key="index" :label="item.fullName"
  31 + :value="item.id" />
  32 + </el-select>
  33 + </el-form-item>
  34 + </el-col>
  35 + <el-col :span="6">
  36 + <el-form-item label="公众号状态">
  37 + <el-select v-model="query.gzhzt" placeholder="公众号状态" clearable>
  38 + <el-option v-for="(item, index) in gzhztOptions" :key="index" :label="item.fullName"
  39 + :value="item.id" />
  40 + </el-select>
  41 + </el-form-item>
  42 + </el-col>
  43 + <el-col :span="6">
  44 + <el-form-item label="微信昵称">
  45 + <el-input v-model="query.wxnc" placeholder="微信昵称" clearable />
  46 + </el-form-item>
  47 + </el-col>
  48 + <el-col :span="6">
  49 + <el-form-item label="小程序状态">
  50 + <el-select v-model="query.wxxcxzt" placeholder="小程序状态" clearable>
  51 + <el-option v-for="(item, index) in wxxcxztOptions" :key="index"
  52 + :label="item.fullName" :value="item.id" />
  53 + </el-select>
  54 + </el-form-item>
  55 + </el-col>
  56 + <el-col :span="6">
  57 + <el-form-item label="最近登录时间">
  58 + <el-date-picker v-model="query.zjdlsj" type="daterange" value-format="timestamp"
  59 + format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
  60 + </el-date-picker>
  61 + </el-form-item>
  62 + </el-col>
  63 + <el-col :span="6">
  64 + <el-form-item label="客户目前归属">
  65 + <el-select v-model="query.khmqgs" placeholder="客户目前归属" clearable>
  66 + <el-option v-for="(item, index) in khmqgsOptions" :key="index"
  67 + :label="item.fullName" :value="item.id" />
  68 + </el-select>
  69 + </el-form-item>
  70 + </el-col>
  71 + <el-col :span="6">
  72 + <el-form-item label="归属门店">
  73 + <el-input v-model="query.gsmd" placeholder="归属门店" clearable />
  74 + </el-form-item>
  75 + </el-col>
  76 + <el-col :span="6">
  77 + <el-form-item label="注册时间">
  78 + <el-date-picker v-model="query.zcsj" type="daterange" value-format="timestamp"
  79 + format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
  80 + </el-date-picker>
  81 + </el-form-item>
  82 + </el-col>
  83 + <el-col :span="6">
  84 + <el-form-item label="客户类型">
  85 + <el-select v-model="query.khlx" placeholder="客户类型" clearable>
  86 + <el-option v-for="(item, index) in khlxOptions" :key="index" :label="item.fullName"
  87 + :value="item.id" />
  88 + </el-select>
  89 + </el-form-item>
  90 + </el-col>
  91 + <el-col :span="6">
  92 + <el-form-item label="客户阶段">
  93 + <el-select v-model="query.khjd" placeholder="客户阶段" clearable>
  94 + <el-option v-for="(item, index) in khjdOptions" :key="index" :label="item.fullName"
  95 + :value="item.id" />
  96 + </el-select>
  97 + </el-form-item>
  98 + </el-col>
  99 + <el-col :span="6">
  100 + <el-form-item label="客户消费">
  101 + <el-select v-model="query.khxf" placeholder="客户消费">
  102 + <el-option v-for="(item, index) in khxfOptions" :key="index" :label="item.fullName"
  103 + :value="item.id" />
  104 + </el-select>
  105 + </el-form-item>
  106 + </el-col>
  107 + <el-col :span="6">
  108 + <el-form-item label="消费频次">
  109 + <el-select v-model="query.xfpc" placeholder="消费频次" clearable>
  110 + <el-option v-for="(item, index) in xfpcOptions" :key="index" :label="item.fullName"
  111 + :value="item.id" />
  112 + </el-select>
  113 + </el-form-item>
  114 + </el-col>
  115 + <el-col :span="6">
  116 + <el-form-item label="推荐人">
  117 + <el-input v-model="query.tjr" placeholder="推荐人" clearable />
  118 + </el-form-item>
  119 + </el-col>
  120 + <el-col :span="6">
  121 + <el-form-item label="负责顾问">
  122 + <el-input v-model="query.fzgw" placeholder="负责顾问" clearable />
  123 + </el-form-item>
  124 + </el-col>
  125 + <el-col :span="6">
  126 + <el-form-item label="美容师">
  127 + <el-input v-model="query.mrs" placeholder="美容师" clearable />
  128 + </el-form-item>
  129 + </el-col>
  130 + <el-col :span="6">
  131 + <el-form-item label="进店渠道">
  132 + <el-input v-model="query.jdqd" placeholder="进店渠道" clearable />
  133 + </el-form-item>
  134 + </el-col>
  135 + <el-col :span="6">
  136 + <el-form-item label="联系地址">
  137 + <el-input v-model="query.lxdz" placeholder="联系地址" clearable />
  138 + </el-form-item>
  139 + </el-col>
  140 + <el-col :span="6">
  141 + <el-form-item label="备注">
  142 + <el-input v-model="query.bz" placeholder="备注" />
  143 + </el-form-item>
  144 + </el-col>
  145 + <el-col :span="6">
  146 + <el-form-item label="阳历生日">
  147 + <el-date-picker v-model="query.yanglsr" type="daterange" value-format="timestamp"
  148 + format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
  149 + </el-date-picker>
  150 + </el-form-item>
  151 + </el-col>
  152 + <el-col :span="6">
  153 + <el-form-item label="阴历生日">
  154 + <el-date-picker v-model="query.yinlsr" type="daterange" value-format="timestamp"
  155 + format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
  156 + </el-date-picker>
  157 + </el-form-item>
  158 + </el-col>
  159 + <el-col :span="6">
  160 + <el-form-item label="年龄">
  161 + <el-input v-model="query.ml" placeholder="年龄" clearable />
  162 + </el-form-item>
  163 + </el-col>
244 164 </template>
245 165 <el-col :span="6">
246 166 <el-form-item>
247 167 <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
248 168 <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
249   - <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button>
250   - <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button>
  169 + <el-button type="text" icon="el-icon-arrow-down" @click="showAll = true"
  170 + v-if="!showAll">展开</el-button>
  171 + <el-button type="text" icon="el-icon-arrow-up" @click="showAll = false"
  172 + v-else>收起</el-button>
251 173 </el-form-item>
252 174 </el-col>
253 175 </el-form>
... ... @@ -261,18 +183,14 @@
261 183 </div>
262 184 <div class="NCC-common-head-right">
263 185 <el-tooltip effect="dark" content="刷新" placement="top">
264   - <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" />
  186 + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false"
  187 + @click="reset()" />
265 188 </el-tooltip>
266 189 <screenfull isContainer />
267 190 </div>
268 191 </div>
269   - <NCC-table
270   - v-loading="listLoading"
271   - :data="list"
272   - has-c
273   - @selection-change="handleSelectionChange"
274   - :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
275   - >
  192 + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"
  193 + :header-cell-style="{ background: '#f5f7fa', color: '#606266' }">
276 194 <!-- 客户编码 -->
277 195 <el-table-column label="客户编码" width="140" align="center">
278 196 <template slot-scope="scope">
... ... @@ -282,7 +200,7 @@
282 200 </div>
283 201 </template>
284 202 </el-table-column>
285   -
  203 +
286 204 <!-- 客户名称 -->
287 205 <el-table-column label="客户名称" width="120" align="center">
288 206 <template slot-scope="scope">
... ... @@ -292,7 +210,7 @@
292 210 </div>
293 211 </template>
294 212 </el-table-column>
295   -
  213 +
296 214 <!-- 手机号 -->
297 215 <el-table-column label="手机号" width="130" align="center">
298 216 <template slot-scope="scope">
... ... @@ -302,7 +220,7 @@
302 220 </div>
303 221 </template>
304 222 </el-table-column>
305   -
  223 +
306 224 <!-- 档案号 -->
307 225 <el-table-column label="档案号" width="120" align="center">
308 226 <template slot-scope="scope">
... ... @@ -312,7 +230,7 @@
312 230 </div>
313 231 </template>
314 232 </el-table-column>
315   -
  233 +
316 234 <!-- 性别 -->
317 235 <el-table-column label="性别" width="80" align="center">
318 236 <template slot-scope="scope">
... ... @@ -322,17 +240,19 @@
322 240 </div>
323 241 </template>
324 242 </el-table-column>
325   -
  243 +
326 244 <!-- 公众号状态 -->
327 245 <el-table-column label="公众号状态" width="120" align="center">
328 246 <template slot-scope="scope">
329 247 <div class="wechat-status-info">
330   - <i class="el-icon-chat-dot-round wechat-status-icon" :class="getStatusClass(scope.row.gzhzt)"></i>
331   - <span class="text-nowrap">{{ scope.row.gzhzt | dynamicText(gzhztOptions) || '无' }}</span>
  248 + <i class="el-icon-chat-dot-round wechat-status-icon"
  249 + :class="getStatusClass(scope.row.gzhzt)"></i>
  250 + <span class="text-nowrap">{{ scope.row.gzhzt | dynamicText(gzhztOptions) || '无'
  251 + }}</span>
332 252 </div>
333 253 </template>
334 254 </el-table-column>
335   -
  255 +
336 256 <!-- 微信昵称 -->
337 257 <el-table-column label="微信昵称" width="120" align="center">
338 258 <template slot-scope="scope">
... ... @@ -342,17 +262,19 @@
342 262 </div>
343 263 </template>
344 264 </el-table-column>
345   -
  265 +
346 266 <!-- 小程序状态 -->
347 267 <el-table-column label="小程序状态" width="120" align="center">
348 268 <template slot-scope="scope">
349 269 <div class="miniprogram-status-info">
350   - <i class="el-icon-mobile-phone miniprogram-status-icon" :class="getStatusClass(scope.row.wxxcxzt)"></i>
351   - <span class="text-nowrap">{{ scope.row.wxxcxzt | dynamicText(wxxcxztOptions) || '无' }}</span>
  270 + <i class="el-icon-mobile-phone miniprogram-status-icon"
  271 + :class="getStatusClass(scope.row.wxxcxzt)"></i>
  272 + <span class="text-nowrap">{{ scope.row.wxxcxzt | dynamicText(wxxcxztOptions) || '无'
  273 + }}</span>
352 274 </div>
353 275 </template>
354 276 </el-table-column>
355   -
  277 +
356 278 <!-- 最近登录时间 -->
357 279 <el-table-column label="最近登录时间" width="140" align="center">
358 280 <template slot-scope="scope">
... ... @@ -362,17 +284,18 @@
362 284 </div>
363 285 </template>
364 286 </el-table-column>
365   -
  287 +
366 288 <!-- 客户目前归属 -->
367 289 <el-table-column label="客户目前归属" width="120" align="center">
368 290 <template slot-scope="scope">
369 291 <div class="customer-belong-info">
370 292 <i class="el-icon-collection-tag customer-belong-icon"></i>
371   - <span class="text-nowrap">{{ scope.row.khmqgs | dynamicText(khmqgsOptions) || '无' }}</span>
  293 + <span class="text-nowrap">{{ scope.row.khmqgs | dynamicText(khmqgsOptions) || '无'
  294 + }}</span>
372 295 </div>
373 296 </template>
374 297 </el-table-column>
375   -
  298 +
376 299 <!-- 归属门店 -->
377 300 <el-table-column label="归属门店" width="120" align="center">
378 301 <template slot-scope="scope">
... ... @@ -382,7 +305,7 @@
382 305 </div>
383 306 </template>
384 307 </el-table-column>
385   -
  308 +
386 309 <!-- 注册时间 -->
387 310 <el-table-column label="注册时间" width="120" align="center">
388 311 <template slot-scope="scope">
... ... @@ -392,7 +315,7 @@
392 315 </div>
393 316 </template>
394 317 </el-table-column>
395   -
  318 +
396 319 <!-- 客户类型 -->
397 320 <el-table-column label="客户类型" width="100" align="center">
398 321 <template slot-scope="scope">
... ... @@ -402,7 +325,7 @@
402 325 </div>
403 326 </template>
404 327 </el-table-column>
405   -
  328 +
406 329 <!-- 客户阶段 -->
407 330 <el-table-column label="客户阶段" width="100" align="center">
408 331 <template slot-scope="scope">
... ... @@ -412,7 +335,7 @@
412 335 </div>
413 336 </template>
414 337 </el-table-column>
415   -
  338 +
416 339 <!-- 客户消费 -->
417 340 <el-table-column label="客户消费" width="100" align="center">
418 341 <template slot-scope="scope">
... ... @@ -422,7 +345,7 @@
422 345 </div>
423 346 </template>
424 347 </el-table-column>
425   -
  348 +
426 349 <!-- 消费频次 -->
427 350 <el-table-column label="消费频次" width="100" align="center">
428 351 <template slot-scope="scope">
... ... @@ -432,7 +355,7 @@
432 355 </div>
433 356 </template>
434 357 </el-table-column>
435   -
  358 +
436 359 <!-- 推荐人 -->
437 360 <el-table-column label="推荐人" width="100" align="center">
438 361 <template slot-scope="scope">
... ... @@ -442,7 +365,7 @@
442 365 </div>
443 366 </template>
444 367 </el-table-column>
445   -
  368 +
446 369 <!-- 负责顾问 -->
447 370 <el-table-column label="负责顾问" width="100" align="center">
448 371 <template slot-scope="scope">
... ... @@ -452,7 +375,7 @@
452 375 </div>
453 376 </template>
454 377 </el-table-column>
455   -
  378 +
456 379 <!-- 美容师 -->
457 380 <el-table-column label="美容师" width="100" align="center">
458 381 <template slot-scope="scope">
... ... @@ -462,7 +385,7 @@
462 385 </div>
463 386 </template>
464 387 </el-table-column>
465   -
  388 +
466 389 <!-- 进店渠道 -->
467 390 <el-table-column label="进店渠道" width="120" align="center">
468 391 <template slot-scope="scope">
... ... @@ -472,7 +395,7 @@
472 395 </div>
473 396 </template>
474 397 </el-table-column>
475   -
  398 +
476 399 <!-- 联系地址 -->
477 400 <el-table-column label="联系地址" min-width="150" show-overflow-tooltip>
478 401 <template slot-scope="scope">
... ... @@ -482,7 +405,7 @@
482 405 </div>
483 406 </template>
484 407 </el-table-column>
485   -
  408 +
486 409 <!-- 备注 -->
487 410 <el-table-column label="备注" min-width="150" show-overflow-tooltip>
488 411 <template slot-scope="scope">
... ... @@ -492,37 +415,10 @@
492 415 </div>
493 416 </template>
494 417 </el-table-column>
495   -
496   - <!-- 首次到店 -->
497   - <el-table-column label="首次到店" width="120" align="center">
498   - <template slot-scope="scope">
499   - <div class="first-visit-info">
500   - <i class="el-icon-date first-visit-icon"></i>
501   - <span class="text-nowrap">{{ formatDate(scope.row.scdd) }}</span>
502   - </div>
503   - </template>
504   - </el-table-column>
505   -
506   - <!-- 最近到店 -->
507   - <el-table-column label="最近到店" width="120" align="center">
508   - <template slot-scope="scope">
509   - <div class="last-visit-info">
510   - <i class="el-icon-date last-visit-icon"></i>
511   - <span class="text-nowrap">{{ formatDate(scope.row.zjdd) }}</span>
512   - </div>
513   - </template>
514   - </el-table-column>
515   -
516   - <!-- 未到店天数 -->
517   - <el-table-column label="未到店天数" width="120" align="center">
518   - <template slot-scope="scope">
519   - <div class="no-visit-days-info">
520   - <i class="el-icon-warning no-visit-days-icon"></i>
521   - <span class="text-nowrap">{{ scope.row.wddts || '0' }}天</span>
522   - </div>
523   - </template>
524   - </el-table-column>
525   -
  418 +
  419 +
  420 +
  421 +
526 422 <!-- 阳历生日 -->
527 423 <el-table-column label="阳历生日" width="120" align="center">
528 424 <template slot-scope="scope">
... ... @@ -532,7 +428,7 @@
532 428 </div>
533 429 </template>
534 430 </el-table-column>
535   -
  431 +
536 432 <!-- 阴历生日 -->
537 433 <el-table-column label="阴历生日" width="120" align="center">
538 434 <template slot-scope="scope">
... ... @@ -542,7 +438,7 @@
542 438 </div>
543 439 </template>
544 440 </el-table-column>
545   -
  441 +
546 442 <!-- 年龄 -->
547 443 <el-table-column label="年龄" width="80" align="center">
548 444 <template slot-scope="scope">
... ... @@ -552,902 +448,770 @@
552 448 </div>
553 449 </template>
554 450 </el-table-column>
555   -
556   - <!-- 最近服务人员 -->
557   - <el-table-column label="最近服务人员" width="130" align="center">
558   - <template slot-scope="scope">
559   - <div class="recent-service-info">
560   - <i class="el-icon-service recent-service-icon"></i>
561   - <span class="text-nowrap">{{ scope.row.zjycfwry || '无' }}</span>
562   - </div>
563   - </template>
564   - </el-table-column>
565   -
566   - <!-- 期间到店频次 -->
567   - <el-table-column label="期间到店频次" width="130" align="center">
568   - <template slot-scope="scope">
569   - <div class="visit-frequency-info">
570   - <i class="el-icon-data-line visit-frequency-icon"></i>
571   - <span class="text-nowrap">{{ scope.row.qjddpc || '0' }}次</span>
572   - </div>
573   - </template>
574   - </el-table-column>
575   -
576   - <!-- 期间服务单次 -->
577   - <el-table-column label="期间服务单次" width="130" align="center">
578   - <template slot-scope="scope">
579   - <div class="service-times-info">
580   - <i class="el-icon-data-line service-times-icon"></i>
581   - <span class="text-nowrap">{{ scope.row.qjfwdc || '0' }}次</span>
582   - </div>
583   - </template>
584   - </el-table-column>
585   -
586   - <!-- 期间现金消费 -->
587   - <el-table-column label="期间现金消费" width="130" align="center">
588   - <template slot-scope="scope">
589   - <div class="cash-consume-info">
590   - <i class="el-icon-money cash-consume-icon"></i>
591   - <span class="text-nowrap">{{ formatMoney(scope.row.qjxjxf) }}</span>
592   - </div>
593   - </template>
594   - </el-table-column>
595   -
596   - <!-- 期间项目耗卡 -->
597   - <el-table-column label="期间项目耗卡" width="130" align="center">
598   - <template slot-scope="scope">
599   - <div class="card-consume-info">
600   - <i class="el-icon-bank-card card-consume-icon"></i>
601   - <span class="text-nowrap">{{ formatMoney(scope.row.qjxmhk) }}</span>
602   - </div>
603   - </template>
604   - </el-table-column>
605   -
606   - <!-- 期间储值消耗 -->
607   - <el-table-column label="期间储值消耗" width="130" align="center">
608   - <template slot-scope="scope">
609   - <div class="stored-consume-info">
610   - <i class="el-icon-coin stored-consume-icon"></i>
611   - <span class="text-nowrap">{{ formatMoney(scope.row.qjczxh) }}</span>
612   - </div>
613   - </template>
614   - </el-table-column>
615   -
616   - <!-- 剩余储值 -->
617   - <el-table-column label="剩余储值" width="120" align="center">
618   - <template slot-scope="scope">
619   - <div class="remaining-stored-info">
620   - <i class="el-icon-coin remaining-stored-icon"></i>
621   - <span class="text-nowrap">{{ formatMoney(scope.row.sycz) }}</span>
622   - </div>
623   - </template>
624   - </el-table-column>
625   -
626   - <!-- 剩余积分 -->
627   - <el-table-column label="剩余积分" width="120" align="center">
628   - <template slot-scope="scope">
629   - <div class="remaining-points-info">
630   - <i class="el-icon-star-on remaining-points-icon"></i>
631   - <span class="text-nowrap">{{ scope.row.syjf || '0' }}分</span>
632   - </div>
633   - </template>
634   - </el-table-column>
635   -
636   - <!-- 剩余品项金额 -->
637   - <el-table-column label="剩余品项金额" width="130" align="center">
638   - <template slot-scope="scope">
639   - <div class="remaining-product-info">
640   - <i class="el-icon-goods remaining-product-icon"></i>
641   - <span class="text-nowrap">{{ formatMoney(scope.row.sypxje) }}</span>
642   - </div>
643   - </template>
644   - </el-table-column>
645   -
646   - <!-- 剩余套餐金额 -->
647   - <el-table-column label="剩余套餐金额" width="130" align="center">
648   - <template slot-scope="scope">
649   - <div class="remaining-package-info">
650   - <i class="el-icon-box remaining-package-icon"></i>
651   - <span class="text-nowrap">{{ formatMoney(scope.row.sytcje) }}</span>
652   - </div>
653   - </template>
654   - </el-table-column>
655   -
656   - <!-- 项目耗卡金额 -->
657   - <el-table-column label="项目耗卡金额" width="130" align="center">
658   - <template slot-scope="scope">
659   - <div class="project-card-info">
660   - <i class="el-icon-bank-card project-card-icon"></i>
661   - <span class="text-nowrap">{{ formatMoney(scope.row.ljxmhkje) }}</span>
662   - </div>
663   - </template>
664   - </el-table-column>
665   -
666   - <!-- 累计储值消耗 -->
667   - <el-table-column label="累计储值消耗" width="130" align="center">
668   - <template slot-scope="scope">
669   - <div class="total-stored-consume-info">
670   - <i class="el-icon-coin total-stored-consume-icon"></i>
671   - <span class="text-nowrap">{{ formatMoney(scope.row.ljczxh) }}</span>
672   - </div>
673   - </template>
674   - </el-table-column>
675   -
676   - <!-- 累计消费次数 -->
677   - <el-table-column label="累计消费次数" width="130" align="center">
678   - <template slot-scope="scope">
679   - <div class="total-consume-times-info">
680   - <i class="el-icon-data-line total-consume-times-icon"></i>
681   - <span class="text-nowrap">{{ scope.row.ljxfcs || '0' }}次</span>
682   - </div>
683   - </template>
684   - </el-table-column>
685   -
686   - <!-- 累计服务次数 -->
687   - <el-table-column label="累计服务次数" width="130" align="center">
688   - <template slot-scope="scope">
689   - <div class="total-service-times-info">
690   - <i class="el-icon-data-line total-service-times-icon"></i>
691   - <span class="text-nowrap">{{ scope.row.ljfwcs || '0' }}次</span>
692   - </div>
693   - </template>
694   - </el-table-column>
695   -
696   - <!-- 现金消费金额 -->
697   - <el-table-column label="现金消费金额" width="130" align="center">
698   - <template slot-scope="scope">
699   - <div class="cash-total-info">
700   - <i class="el-icon-money cash-total-icon"></i>
701   - <span class="text-nowrap">{{ formatMoney(scope.row.ljxjxfje) }}</span>
702   - </div>
703   - </template>
704   - </el-table-column>
705   -
  451 +
  452 +
  453 +
  454 +
  455 +
  456 +
  457 +
  458 +
  459 +
  460 +
  461 +
  462 +
  463 +
  464 +
  465 +
  466 +
706 467 <!-- 操作 -->
707 468 <el-table-column label="操作" width="160" align="left" fixed="right">
708 469 <template slot-scope="scope">
709 470 <div class="action-buttons">
710   - <el-button
711   - type="text"
712   - icon="el-icon-edit"
713   - @click="addOrUpdateHandle(scope.row.id)"
714   - class="edit-btn"
715   - >
  471 + <el-button type="text" icon="el-icon-edit" @click="addOrUpdateHandle(scope.row.id)"
  472 + class="edit-btn">
716 473 编辑
717 474 </el-button>
718   - <el-button
719   - type="text"
720   - icon="el-icon-delete"
721   - @click="handleDel(scope.row.id)"
722   - class="delete-btn"
723   - >
  475 + <el-button type="text" icon="el-icon-delete" @click="handleDel(scope.row.id)"
  476 + class="delete-btn">
724 477 删除
725 478 </el-button>
726 479 </div>
727 480 </template>
728 481 </el-table-column>
729 482 </NCC-table>
730   - <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" />
731   - </div>
732   - </div>
  483 + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
  484 + @pagination="initData" />
  485 + </div>
  486 + </div>
733 487 <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" />
734 488 <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
735 489 </div>
736 490 </template>
737 491 <script>
738   - import request from '@/utils/request'
739   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
740   - import NCCForm from './Form'
741   - import ExportBox from './ExportBox'
742   - import { previewDataInterface } from '@/api/systemData/dataInterface'
743   - export default {
744   - components: { NCCForm, ExportBox },
745   - data() {
746   - return {
747   - showAll: false,
748   - query: {
749   - id:undefined,
750   - khmc:undefined,
751   - sjh:undefined,
752   - dah:undefined,
753   - xb:undefined,
754   - gzhzt:undefined,
755   - wxnc:undefined,
756   - wxxcxzt:undefined,
757   - zjdlsj:undefined,
758   - khmqgs:undefined,
759   - gsmd:undefined,
760   - zcsj:undefined,
761   - khlx:undefined,
762   - khjd:undefined,
763   - khxf:undefined,
764   - xfpc:undefined,
765   - tjr:undefined,
766   - fzgw:undefined,
767   - mrs:undefined,
768   - jdqd:undefined,
769   - lxdz:undefined,
770   - bz:undefined,
771   - scdd:undefined,
772   - zjdd:undefined,
773   - wddts:undefined,
774   - yanglsr:undefined,
775   - yinlsr:undefined,
776   - ml:undefined,
777   - zjycfwry:undefined,
778   - qjddpc:undefined,
779   - qjfwdc:undefined,
780   - qjxjxf:undefined,
781   - qjxmhk:undefined,
782   - qjczxh:undefined,
783   - sycz:undefined,
784   - syjf:undefined,
785   - sypxje:undefined,
786   - sytcje:undefined,
787   - ljxmhkje:undefined,
788   - ljczxh:undefined,
789   - ljxfcs:undefined,
790   - ljfwcs:undefined,
791   - ljxjxfje:undefined,
792   - },
793   - list: [],
794   - listLoading: true,
795   - multipleSelection: [], total: 0,
796   - listQuery: {
797   - currentPage: 1,
798   - pageSize: 20,
799   - sort: "desc",
800   - sidx: "",
801   - },
802   - formVisible: false,
803   - exportBoxVisible: false,
804   - columnList: [
805   - { prop: 'id', label: '客户编码' },
806   - { prop: 'khmc', label: '客户名称' },
807   - { prop: 'sjh', label: '手机号' },
808   - { prop: 'dah', label: '档案号' },
809   - { prop: 'xb', label: '性别' },
810   - { prop: 'gzhzt', label: '公众号状态' },
811   - { prop: 'wxnc', label: '微信昵称' },
812   - { prop: 'wxxcxzt', label: '小程序状态' },
813   - { prop: 'zjdlsj', label: '最近登录时间' },
814   - { prop: 'khmqgs', label: '客户目前归属' },
815   - { prop: 'gsmd', label: '归属门店' },
816   - { prop: 'zcsj', label: '注册时间' },
817   - { prop: 'khlx', label: '客户类型' },
818   - { prop: 'khjd', label: '客户阶段' },
819   - { prop: 'khxf', label: '客户消费' },
820   - { prop: 'xfpc', label: '消费频次' },
821   - { prop: 'tjr', label: '推荐人' },
822   - { prop: 'fzgw', label: '负责顾问' },
823   - { prop: 'mrs', label: '美容师' },
824   - { prop: 'jdqd', label: '进店渠道' },
825   - { prop: 'lxdz', label: '联系地址' },
826   - { prop: 'bz', label: '备注' },
827   - { prop: 'scdd', label: '首次到店' },
828   - { prop: 'zjdd', label: '最近到店' },
829   - { prop: 'wddts', label: '未到店天数' },
830   - { prop: 'yanglsr', label: '阳历生日' },
831   - { prop: 'yinlsr', label: '阴历生日' },
832   - { prop: 'ml', label: '年龄' },
833   - { prop: 'zjycfwry', label: '最近服务人员' },
834   - { prop: 'qjddpc', label: '期间到店频次' },
835   - { prop: 'qjfwdc', label: '期间服务单次' },
836   - { prop: 'qjxjxf', label: '期间现金消费' },
837   - { prop: 'qjxmhk', label: '期间项目耗卡' },
838   - { prop: 'qjczxh', label: '期间储值消耗' },
839   - { prop: 'sycz', label: '剩余储值' },
840   - { prop: 'syjf', label: '剩余积分' },
841   - { prop: 'sypxje', label: '剩余品项金额' },
842   - { prop: 'sytcje', label: '剩余套餐金额' },
843   - { prop: 'ljxmhkje', label: '项目耗卡金额' },
844   - { prop: 'ljczxh', label: '累计储值消耗' },
845   - { prop: 'ljxfcs', label: '累计消费次数' },
846   - { prop: 'ljfwcs', label: '累计服务次数' },
847   - { prop: 'ljxjxfje', label: '现金消费金额' },
848   - ],
849   - xbOptions:[{"fullName":"男","id":"男"},{"fullName":"女","id":"女"}],
850   - gzhztOptions:[{"fullName":"已绑定","id":"已绑定"},{"fullName":"未绑定","id":"未绑定"}],
851   - wxxcxztOptions:[{"fullName":"已绑定","id":"已绑定"},{"fullName":"未绑定","id":"未绑定"}],
852   - khmqgsOptions:[{"fullName":"会员","id":"会员"},{"fullName":"线索池","id":"线索池"},{"fullName":"会员-归档","id":"会员-归档"}],
853   - khlxOptions:[{"fullName":"新客","id":"新客"},{"fullName":"老客","id":"老客"},{"fullName":"潜客","id":"潜客"}],
854   - khjdOptions:[{"fullName":"体验","id":"体验"},{"fullName":"有效","id":"有效"},{"fullName":"沉睡","id":"沉睡"},{"fullName":"流失","id":"流失"}],
855   - khxfOptions:[{"fullName":"D客","id":"D客"},{"fullName":"有效","id":"有效"}],
856   - xfpcOptions:[{"fullName":"高频","id":"高频"},{"fullName":"低频","id":"低频"}],
  492 +import request from '@/utils/request'
  493 +import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
  494 +import NCCForm from './Form'
  495 +import ExportBox from './ExportBox'
  496 +import { previewDataInterface } from '@/api/systemData/dataInterface'
  497 +export default {
  498 + components: { NCCForm, ExportBox },
  499 + data() {
  500 + return {
  501 + showAll: false,
  502 + query: {
  503 + id: undefined,
  504 + khmc: undefined,
  505 + sjh: undefined,
  506 + dah: undefined,
  507 + xb: undefined,
  508 + gzhzt: undefined,
  509 + wxnc: undefined,
  510 + wxxcxzt: undefined,
  511 + zjdlsj: undefined,
  512 + khmqgs: undefined,
  513 + gsmd: undefined,
  514 + zcsj: undefined,
  515 + khlx: undefined,
  516 + khjd: undefined,
  517 + khxf: undefined,
  518 + xfpc: undefined,
  519 + tjr: undefined,
  520 + fzgw: undefined,
  521 + mrs: undefined,
  522 + jdqd: undefined,
  523 + lxdz: undefined,
  524 + bz: undefined,
  525 + yanglsr: undefined,
  526 + yinlsr: undefined,
  527 + ml: undefined,
  528 + },
  529 + list: [],
  530 + listLoading: true,
  531 + multipleSelection: [], total: 0,
  532 + listQuery: {
  533 + currentPage: 1,
  534 + pageSize: 20,
  535 + sort: "desc",
  536 + sidx: "",
  537 + },
  538 + formVisible: false,
  539 + exportBoxVisible: false,
  540 + columnList: [
  541 + { prop: 'id', label: '客户编码' },
  542 + { prop: 'khmc', label: '客户名称' },
  543 + { prop: 'sjh', label: '手机号' },
  544 + { prop: 'dah', label: '档案号' },
  545 + { prop: 'xb', label: '性别' },
  546 + { prop: 'gzhzt', label: '公众号状态' },
  547 + { prop: 'wxnc', label: '微信昵称' },
  548 + { prop: 'wxxcxzt', label: '小程序状态' },
  549 + { prop: 'zjdlsj', label: '最近登录时间' },
  550 + { prop: 'khmqgs', label: '客户目前归属' },
  551 + { prop: 'gsmd', label: '归属门店' },
  552 + { prop: 'zcsj', label: '注册时间' },
  553 + { prop: 'khlx', label: '客户类型' },
  554 + { prop: 'khjd', label: '客户阶段' },
  555 + { prop: 'khxf', label: '客户消费' },
  556 + { prop: 'xfpc', label: '消费频次' },
  557 + { prop: 'tjr', label: '推荐人' },
  558 + { prop: 'fzgw', label: '负责顾问' },
  559 + { prop: 'mrs', label: '美容师' },
  560 + { prop: 'jdqd', label: '进店渠道' },
  561 + { prop: 'lxdz', label: '联系地址' },
  562 + { prop: 'bz', label: '备注' },
  563 + { prop: 'yanglsr', label: '阳历生日' },
  564 + { prop: 'yinlsr', label: '阴历生日' },
  565 + { prop: 'ml', label: '年龄' },
  566 + ],
  567 + xbOptions: [{ "fullName": "男", "id": "男" }, { "fullName": "女", "id": "女" }],
  568 + gzhztOptions: [{ "fullName": "已绑定", "id": "已绑定" }, { "fullName": "未绑定", "id": "未绑定" }],
  569 + wxxcxztOptions: [{ "fullName": "已绑定", "id": "已绑定" }, { "fullName": "未绑定", "id": "未绑定" }],
  570 + khmqgsOptions: [{ "fullName": "会员", "id": "会员" }, { "fullName": "线索池", "id": "线索池" }, { "fullName": "会员-归档", "id": "会员-归档" }],
  571 + khlxOptions: [{ "fullName": "新客", "id": "新客" }, { "fullName": "老客", "id": "老客" }, { "fullName": "潜客", "id": "潜客" }],
  572 + khjdOptions: [{ "fullName": "体验", "id": "体验" }, { "fullName": "有效", "id": "有效" }, { "fullName": "沉睡", "id": "沉睡" }, { "fullName": "流失", "id": "流失" }],
  573 + khxfOptions: [{ "fullName": "D客", "id": "D客" }, { "fullName": "有效", "id": "有效" }],
  574 + xfpcOptions: [{ "fullName": "高频", "id": "高频" }, { "fullName": "低频", "id": "低频" }],
  575 + }
  576 + },
  577 + computed: {},
  578 + created() {
  579 + this.initData()
  580 + },
  581 + methods: {
  582 + initData() {
  583 + this.listLoading = true;
  584 + let _query = {
  585 + ...this.listQuery,
  586 + ...this.query
  587 + };
  588 + let query = {}
  589 + for (let key in _query) {
  590 + if (Array.isArray(_query[key])) {
  591 + query[key] = _query[key].join()
  592 + } else {
  593 + query[key] = _query[key]
  594 + }
  595 + }
  596 + request({
  597 + url: `/api/Extend/LqKhxx`,
  598 + method: 'GET',
  599 + data: query
  600 + }).then(res => {
  601 + this.list = res.data.list
  602 + this.total = res.data.pagination.total
  603 + this.listLoading = false
  604 + })
  605 + },
  606 + handleDel(id) {
  607 + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  608 + type: 'warning'
  609 + }).then(() => {
  610 + request({
  611 + url: `/api/Extend/LqKhxx/${id}`,
  612 + method: 'DELETE'
  613 + }).then(res => {
  614 + this.$message({
  615 + type: 'success',
  616 + message: res.msg,
  617 + onClose: () => {
  618 + this.initData()
  619 + }
  620 + });
  621 + })
  622 + }).catch(() => {
  623 + });
  624 + },
  625 + handleSelectionChange(val) {
  626 + const res = val.map(item => item.id)
  627 + this.multipleSelection = res
  628 + },
  629 + handleBatchRemoveDel() {
  630 + if (!this.multipleSelection.length) {
  631 + this.$message({
  632 + type: 'error',
  633 + message: '请选择一条数据',
  634 + duration: 1500,
  635 + })
  636 + return
  637 + }
  638 + const ids = this.multipleSelection
  639 + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
  640 + type: 'warning'
  641 + }).then(() => {
  642 + request({
  643 + url: `/api/Extend/LqKhxx/batchRemove`,
  644 + method: 'POST',
  645 + data: ids,
  646 + }).then(res => {
  647 + this.$message({
  648 + type: 'success',
  649 + message: res.msg,
  650 + onClose: () => {
  651 + this.initData()
  652 + }
  653 + });
  654 + })
  655 + }).catch(() => { })
  656 + },
  657 + addOrUpdateHandle(id, isDetail) {
  658 + this.formVisible = true
  659 + this.$nextTick(() => {
  660 + this.$refs.NCCForm.init(id, isDetail)
  661 + })
  662 + },
  663 + exportData() {
  664 + this.exportBoxVisible = true
  665 + this.$nextTick(() => {
  666 + this.$refs.ExportBox.init(this.columnList)
  667 + })
  668 + },
  669 + download(data) {
  670 + let query = { ...data, ...this.listQuery, ...this.query }
  671 + request({
  672 + url: `/api/Extend/LqKhxx/Actions/Export`,
  673 + method: 'GET',
  674 + data: query
  675 + }).then(res => {
  676 + if (!res.data.url) return
  677 + window.location.href = this.define.comUrl + res.data.url
  678 + this.$refs.ExportBox.visible = false
  679 + this.exportBoxVisible = false
  680 + })
  681 + },
  682 + search() {
  683 + this.listQuery = {
  684 + currentPage: 1,
  685 + pageSize: 20,
  686 + sort: "desc",
  687 + sidx: "",
857 688 }
858   - },
859   - computed: {},
860   - created() {
861 689 this.initData()
862 690 },
863   - methods: {
864   - initData() {
865   - this.listLoading = true;
866   - let _query = {
867   - ...this.listQuery,
868   - ...this.query
869   - };
870   - let query = {}
871   - for (let key in _query) {
872   - if (Array.isArray(_query[key])) {
873   - query[key] = _query[key].join()
874   - } else {
875   - query[key] = _query[key]
876   - }
877   - }
878   - request({
879   - url: `/api/Extend/LqKhxx`,
880   - method: 'GET',
881   - data: query
882   - }).then(res => {
883   - this.list = res.data.list
884   - this.total = res.data.pagination.total
885   - this.listLoading = false
886   - })
887   - },
888   - handleDel(id) {
889   - this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
890   - type: 'warning'
891   - }).then(() => {
892   - request({
893   - url: `/api/Extend/LqKhxx/${id}`,
894   - method: 'DELETE'
895   - }).then(res => {
896   - this.$message({
897   - type: 'success',
898   - message: res.msg,
899   - onClose: () => {
900   - this.initData()
901   - }
902   - });
903   - })
904   - }).catch(() => {
905   - });
906   - },
907   - handleSelectionChange(val) {
908   - const res = val.map(item => item.id)
909   - this.multipleSelection = res
910   - },
911   - handleBatchRemoveDel() {
912   - if (!this.multipleSelection.length) {
913   - this.$message({
914   - type: 'error',
915   - message: '请选择一条数据',
916   - duration: 1500,
917   - })
918   - return
919   - }
920   - const ids = this.multipleSelection
921   - this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
922   - type: 'warning'
923   - }).then(() => {
924   - request({
925   - url: `/api/Extend/LqKhxx/batchRemove`,
926   - method: 'POST',
927   - data: ids ,
928   - }).then(res => {
929   - this.$message({
930   - type: 'success',
931   - message: res.msg,
932   - onClose: () => {
933   - this.initData()
934   - }
935   - });
936   - })
937   - }).catch(() => { })
938   - },
939   - addOrUpdateHandle(id, isDetail) {
940   - this.formVisible = true
941   - this.$nextTick(() => {
942   - this.$refs.NCCForm.init(id, isDetail)
943   - })
944   - },
945   - exportData() {
946   - this.exportBoxVisible = true
947   - this.$nextTick(() => {
948   - this.$refs.ExportBox.init(this.columnList)
949   - })
950   - },
951   - download(data) {
952   - let query = { ...data, ...this.listQuery, ...this.query }
953   - request({
954   - url: `/api/Extend/LqKhxx/Actions/Export`,
955   - method: 'GET',
956   - data: query
957   - }).then(res => {
958   - if (!res.data.url) return
959   - window.location.href = this.define.comUrl + res.data.url
960   - this.$refs.ExportBox.visible = false
961   - this.exportBoxVisible = false
962   - })
963   - },
964   - search() {
965   - this.listQuery = {
966   - currentPage: 1,
967   - pageSize: 20,
968   - sort: "desc",
969   - sidx: "",
970   - }
971   - this.initData()
972   - },
973   - refresh(isrRefresh) {
974   - this.formVisible = false
975   - if (isrRefresh) this.reset()
976   - },
977   - reset() {
978   - for (let key in this.query) {
979   - this.query[key] = undefined
980   - }
981   - this.listQuery = {
982   - currentPage: 1,
983   - pageSize: 20,
984   - sort: "desc",
985   - sidx: "",
986   - }
987   - this.initData()
988   - },
989   - // 格式化日期
990   - formatDate(date) {
991   - if (!date) return '无'
992   - const d = new Date(date)
993   - if (isNaN(d.getTime())) return '无'
994   - return d.toLocaleDateString('zh-CN', {
995   - year: 'numeric',
996   - month: '2-digit',
997   - day: '2-digit'
998   - })
999   - },
1000   - // 格式化金额
1001   - formatMoney(amount) {
1002   - if (!amount || amount === 0) return '¥0.00'
1003   - const num = parseFloat(amount)
1004   - if (isNaN(num)) return '¥0.00'
1005   - return '¥' + num.toLocaleString('zh-CN', {
1006   - minimumFractionDigits: 2,
1007   - maximumFractionDigits: 2
1008   - })
1009   - },
1010   - // 获取性别样式类
1011   - getGenderClass(gender) {
1012   - if (gender === '男') return 'gender-male'
1013   - if (gender === '女') return 'gender-female'
1014   - return 'gender-unknown'
1015   - },
1016   - // 获取状态样式类
1017   - getStatusClass(status) {
1018   - if (status === '已绑定') return 'status-bound'
1019   - if (status === '未绑定') return 'status-unbound'
1020   - return 'status-unknown'
1021   - }
  691 + refresh(isrRefresh) {
  692 + this.formVisible = false
  693 + if (isrRefresh) this.reset()
  694 + },
  695 + reset() {
  696 + for (let key in this.query) {
  697 + this.query[key] = undefined
  698 + }
  699 + this.listQuery = {
  700 + currentPage: 1,
  701 + pageSize: 20,
  702 + sort: "desc",
  703 + sidx: "",
  704 + }
  705 + this.initData()
  706 + },
  707 + // 格式化日期
  708 + formatDate(date) {
  709 + if (!date) return '无'
  710 + const d = new Date(date)
  711 + if (isNaN(d.getTime())) return '无'
  712 + return d.toLocaleDateString('zh-CN', {
  713 + year: 'numeric',
  714 + month: '2-digit',
  715 + day: '2-digit'
  716 + })
  717 + },
  718 + // 格式化金额
  719 + formatMoney(amount) {
  720 + if (!amount || amount === 0) return '¥0.00'
  721 + const num = parseFloat(amount)
  722 + if (isNaN(num)) return '¥0.00'
  723 + return '¥' + num.toLocaleString('zh-CN', {
  724 + minimumFractionDigits: 2,
  725 + maximumFractionDigits: 2
  726 + })
  727 + },
  728 + // 获取性别样式类
  729 + getGenderClass(gender) {
  730 + if (gender === '男') return 'gender-male'
  731 + if (gender === '女') return 'gender-female'
  732 + return 'gender-unknown'
  733 + },
  734 + // 获取状态样式类
  735 + getStatusClass(status) {
  736 + if (status === '已绑定') return 'status-bound'
  737 + if (status === '未绑定') return 'status-unbound'
  738 + return 'status-unknown'
1022 739 }
1023   - }
  740 + }
  741 +}
1024 742 </script>
1025 743  
1026 744 <style lang="scss" scoped>
1027 745 // 通用文本不换行样式
1028 746 .text-nowrap {
1029   - white-space: nowrap;
1030   - overflow: hidden;
1031   - text-overflow: ellipsis;
1032   - max-width: 100%;
  747 + white-space: nowrap;
  748 + overflow: hidden;
  749 + text-overflow: ellipsis;
  750 + max-width: 100%;
1033 751 }
1034 752  
1035 753 // 客户编码样式
1036 754 .customer-code-info {
1037   - display: flex;
1038   - align-items: center;
1039   - justify-content: center;
1040   - gap: 6px;
1041   -
1042   - .customer-code-icon {
1043   - color: #409EFF;
1044   - font-size: 16px;
1045   - }
1046   -
1047   - span {
1048   - font-weight: 500;
1049   - color: #303133;
1050   - }
  755 + display: flex;
  756 + align-items: center;
  757 + justify-content: center;
  758 + gap: 6px;
  759 +
  760 + .customer-code-icon {
  761 + color: #409EFF;
  762 + font-size: 16px;
  763 + }
  764 +
  765 + span {
  766 + font-weight: 500;
  767 + color: #303133;
  768 + }
1051 769 }
1052 770  
1053 771 // 客户名称样式
1054 772 .customer-name-info {
1055   - display: flex;
1056   - align-items: center;
1057   - justify-content: center;
1058   - gap: 6px;
1059   -
1060   - .customer-name-icon {
1061   - color: #67C23A;
1062   - font-size: 16px;
1063   - }
1064   -
1065   - span {
1066   - font-weight: 600;
1067   - color: #303133;
1068   - }
  773 + display: flex;
  774 + align-items: center;
  775 + justify-content: center;
  776 + gap: 6px;
  777 +
  778 + .customer-name-icon {
  779 + color: #67C23A;
  780 + font-size: 16px;
  781 + }
  782 +
  783 + span {
  784 + font-weight: 600;
  785 + color: #303133;
  786 + }
1069 787 }
1070 788  
1071 789 // 手机号样式
1072 790 .phone-info {
1073   - display: flex;
1074   - align-items: center;
1075   - justify-content: center;
1076   - gap: 6px;
1077   -
1078   - .phone-icon {
1079   - color: #409EFF;
1080   - font-size: 16px;
1081   - }
1082   -
1083   - span {
1084   - font-weight: 500;
1085   - color: #303133;
1086   - }
  791 + display: flex;
  792 + align-items: center;
  793 + justify-content: center;
  794 + gap: 6px;
  795 +
  796 + .phone-icon {
  797 + color: #409EFF;
  798 + font-size: 16px;
  799 + }
  800 +
  801 + span {
  802 + font-weight: 500;
  803 + color: #303133;
  804 + }
1087 805 }
1088 806  
1089 807 // 档案号样式
1090 808 .archive-info {
1091   - display: flex;
1092   - align-items: center;
1093   - justify-content: center;
1094   - gap: 6px;
1095   -
1096   - .archive-icon {
1097   - color: #909399;
1098   - font-size: 16px;
1099   - }
1100   -
1101   - span {
1102   - font-weight: 500;
1103   - color: #303133;
1104   - }
  809 + display: flex;
  810 + align-items: center;
  811 + justify-content: center;
  812 + gap: 6px;
  813 +
  814 + .archive-icon {
  815 + color: #909399;
  816 + font-size: 16px;
  817 + }
  818 +
  819 + span {
  820 + font-weight: 500;
  821 + color: #303133;
  822 + }
1105 823 }
1106 824  
1107 825 // 性别样式
1108 826 .gender-info {
1109   - display: flex;
1110   - align-items: center;
1111   - justify-content: center;
1112   - gap: 6px;
1113   -
1114   - .gender-icon {
1115   - font-size: 16px;
1116   -
1117   - &.gender-male {
1118   - color: #409EFF;
1119   - }
1120   -
1121   - &.gender-female {
1122   - color: #F56C6C;
1123   - }
1124   -
1125   - &.gender-unknown {
1126   - color: #909399;
1127   - }
1128   - }
1129   -
1130   - span {
1131   - font-weight: 500;
1132   - color: #303133;
1133   - }
  827 + display: flex;
  828 + align-items: center;
  829 + justify-content: center;
  830 + gap: 6px;
  831 +
  832 + .gender-icon {
  833 + font-size: 16px;
  834 +
  835 + &.gender-male {
  836 + color: #409EFF;
  837 + }
  838 +
  839 + &.gender-female {
  840 + color: #F56C6C;
  841 + }
  842 +
  843 + &.gender-unknown {
  844 + color: #909399;
  845 + }
  846 + }
  847 +
  848 + span {
  849 + font-weight: 500;
  850 + color: #303133;
  851 + }
1134 852 }
1135 853  
1136 854 // 微信状态样式
1137   -.wechat-status-info, .miniprogram-status-info {
1138   - display: flex;
1139   - align-items: center;
1140   - justify-content: center;
1141   - gap: 6px;
1142   -
1143   - .wechat-status-icon, .miniprogram-status-icon {
1144   - font-size: 16px;
1145   -
1146   - &.status-bound {
1147   - color: #67C23A;
1148   - }
1149   -
1150   - &.status-unbound {
1151   - color: #F56C6C;
1152   - }
1153   -
1154   - &.status-unknown {
1155   - color: #909399;
1156   - }
1157   - }
1158   -
1159   - span {
1160   - font-weight: 500;
1161   - color: #303133;
1162   - }
  855 +.wechat-status-info,
  856 +.miniprogram-status-info {
  857 + display: flex;
  858 + align-items: center;
  859 + justify-content: center;
  860 + gap: 6px;
  861 +
  862 + .wechat-status-icon,
  863 + .miniprogram-status-icon {
  864 + font-size: 16px;
  865 +
  866 + &.status-bound {
  867 + color: #67C23A;
  868 + }
  869 +
  870 + &.status-unbound {
  871 + color: #F56C6C;
  872 + }
  873 +
  874 + &.status-unknown {
  875 + color: #909399;
  876 + }
  877 + }
  878 +
  879 + span {
  880 + font-weight: 500;
  881 + color: #303133;
  882 + }
1163 883 }
1164 884  
1165 885 // 微信昵称样式
1166 886 .wechat-name-info {
1167   - display: flex;
1168   - align-items: center;
1169   - justify-content: center;
1170   - gap: 6px;
1171   -
1172   - .wechat-name-icon {
1173   - color: #67C23A;
1174   - font-size: 16px;
1175   - }
1176   -
1177   - span {
1178   - font-weight: 500;
1179   - color: #303133;
1180   - }
  887 + display: flex;
  888 + align-items: center;
  889 + justify-content: center;
  890 + gap: 6px;
  891 +
  892 + .wechat-name-icon {
  893 + color: #67C23A;
  894 + font-size: 16px;
  895 + }
  896 +
  897 + span {
  898 + font-weight: 500;
  899 + color: #303133;
  900 + }
1181 901 }
1182 902  
1183 903 // 时间相关样式
1184   -.login-time-info, .register-time-info, .first-visit-info, .last-visit-info, .solar-birthday-info, .lunar-birthday-info {
1185   - display: flex;
1186   - align-items: center;
1187   - justify-content: center;
1188   - gap: 6px;
1189   -
1190   - .login-time-icon, .register-time-icon, .first-visit-icon, .last-visit-icon, .solar-birthday-icon, .lunar-birthday-icon {
1191   - color: #909399;
1192   - font-size: 16px;
1193   - }
1194   -
1195   - span {
1196   - font-weight: 500;
1197   - color: #303133;
1198   - }
  904 +.login-time-info,
  905 +.register-time-info,
  906 +.first-visit-info,
  907 +.last-visit-info,
  908 +.solar-birthday-info,
  909 +.lunar-birthday-info {
  910 + display: flex;
  911 + align-items: center;
  912 + justify-content: center;
  913 + gap: 6px;
  914 +
  915 + .login-time-icon,
  916 + .register-time-icon,
  917 + .first-visit-icon,
  918 + .last-visit-icon,
  919 + .solar-birthday-icon,
  920 + .lunar-birthday-icon {
  921 + color: #909399;
  922 + font-size: 16px;
  923 + }
  924 +
  925 + span {
  926 + font-weight: 500;
  927 + color: #303133;
  928 + }
1199 929 }
1200 930  
1201 931 // 客户归属样式
1202 932 .customer-belong-info {
1203   - display: flex;
1204   - align-items: center;
1205   - justify-content: center;
1206   - gap: 6px;
1207   -
1208   - .customer-belong-icon {
1209   - color: #E6A23C;
1210   - font-size: 16px;
1211   - }
1212   -
1213   - span {
1214   - font-weight: 500;
1215   - color: #303133;
1216   - }
  933 + display: flex;
  934 + align-items: center;
  935 + justify-content: center;
  936 + gap: 6px;
  937 +
  938 + .customer-belong-icon {
  939 + color: #E6A23C;
  940 + font-size: 16px;
  941 + }
  942 +
  943 + span {
  944 + font-weight: 500;
  945 + color: #303133;
  946 + }
1217 947 }
1218 948  
1219 949 // 门店信息样式
1220 950 .store-info {
1221   - display: flex;
1222   - align-items: center;
1223   - justify-content: center;
1224   - gap: 6px;
1225   -
1226   - .store-icon {
1227   - color: #67C23A;
1228   - font-size: 16px;
1229   - }
1230   -
1231   - span {
1232   - font-weight: 500;
1233   - color: #303133;
1234   - }
  951 + display: flex;
  952 + align-items: center;
  953 + justify-content: center;
  954 + gap: 6px;
  955 +
  956 + .store-icon {
  957 + color: #67C23A;
  958 + font-size: 16px;
  959 + }
  960 +
  961 + span {
  962 + font-weight: 500;
  963 + color: #303133;
  964 + }
1235 965 }
1236 966  
1237 967 // 客户类型和阶段样式
1238   -.customer-type-info, .customer-stage-info {
1239   - display: flex;
1240   - align-items: center;
1241   - justify-content: center;
1242   - gap: 6px;
1243   -
1244   - .customer-type-icon, .customer-stage-icon {
1245   - color: #67C23A;
1246   - font-size: 16px;
1247   - }
1248   -
1249   - span {
1250   - font-weight: 500;
1251   - color: #303133;
1252   - }
  968 +.customer-type-info,
  969 +.customer-stage-info {
  970 + display: flex;
  971 + align-items: center;
  972 + justify-content: center;
  973 + gap: 6px;
  974 +
  975 + .customer-type-icon,
  976 + .customer-stage-icon {
  977 + color: #67C23A;
  978 + font-size: 16px;
  979 + }
  980 +
  981 + span {
  982 + font-weight: 500;
  983 + color: #303133;
  984 + }
1253 985 }
1254 986  
1255 987 // 消费相关样式
1256   -.customer-consume-info, .consume-frequency-info {
1257   - display: flex;
1258   - align-items: center;
1259   - justify-content: center;
1260   - gap: 6px;
1261   -
1262   - .customer-consume-icon, .consume-frequency-icon {
1263   - color: #409EFF;
1264   - font-size: 16px;
1265   - }
1266   -
1267   - span {
1268   - font-weight: 500;
1269   - color: #303133;
1270   - }
  988 +.customer-consume-info,
  989 +.consume-frequency-info {
  990 + display: flex;
  991 + align-items: center;
  992 + justify-content: center;
  993 + gap: 6px;
  994 +
  995 + .customer-consume-icon,
  996 + .consume-frequency-icon {
  997 + color: #409EFF;
  998 + font-size: 16px;
  999 + }
  1000 +
  1001 + span {
  1002 + font-weight: 500;
  1003 + color: #303133;
  1004 + }
1271 1005 }
1272 1006  
1273 1007 // 人员信息样式
1274   -.referrer-info, .advisor-info, .beautician-info, .recent-service-info {
1275   - display: flex;
1276   - align-items: center;
1277   - justify-content: center;
1278   - gap: 6px;
1279   -
1280   - .referrer-icon, .advisor-icon, .beautician-icon, .recent-service-icon {
1281   - color: #67C23A;
1282   - font-size: 16px;
1283   - }
1284   -
1285   - span {
1286   - font-weight: 500;
1287   - color: #303133;
1288   - }
  1008 +.referrer-info,
  1009 +.advisor-info,
  1010 +.beautician-info,
  1011 +.recent-service-info {
  1012 + display: flex;
  1013 + align-items: center;
  1014 + justify-content: center;
  1015 + gap: 6px;
  1016 +
  1017 + .referrer-icon,
  1018 + .advisor-icon,
  1019 + .beautician-icon,
  1020 + .recent-service-icon {
  1021 + color: #67C23A;
  1022 + font-size: 16px;
  1023 + }
  1024 +
  1025 + span {
  1026 + font-weight: 500;
  1027 + color: #303133;
  1028 + }
1289 1029 }
1290 1030  
1291 1031 // 渠道信息样式
1292 1032 .channel-info {
1293   - display: flex;
1294   - align-items: center;
1295   - justify-content: center;
1296   - gap: 6px;
1297   -
1298   - .channel-icon {
1299   - color: #909399;
1300   - font-size: 16px;
1301   - }
1302   -
1303   - span {
1304   - font-weight: 500;
1305   - color: #303133;
1306   - }
  1033 + display: flex;
  1034 + align-items: center;
  1035 + justify-content: center;
  1036 + gap: 6px;
  1037 +
  1038 + .channel-icon {
  1039 + color: #909399;
  1040 + font-size: 16px;
  1041 + }
  1042 +
  1043 + span {
  1044 + font-weight: 500;
  1045 + color: #303133;
  1046 + }
1307 1047 }
1308 1048  
1309 1049 // 地址和备注样式
1310   -.address-info, .remark-info {
1311   - display: flex;
1312   - align-items: center;
1313   - gap: 6px;
1314   -
1315   - .address-icon, .remark-icon {
1316   - color: #909399;
1317   - font-size: 14px;
1318   - }
1319   -
1320   - span {
1321   - color: #606266;
1322   - }
  1050 +.address-info,
  1051 +.remark-info {
  1052 + display: flex;
  1053 + align-items: center;
  1054 + gap: 6px;
  1055 +
  1056 + .address-icon,
  1057 + .remark-icon {
  1058 + color: #909399;
  1059 + font-size: 14px;
  1060 + }
  1061 +
  1062 + span {
  1063 + color: #606266;
  1064 + }
1323 1065 }
1324 1066  
1325 1067 // 未到店天数样式
1326 1068 .no-visit-days-info {
1327   - display: flex;
1328   - align-items: center;
1329   - justify-content: center;
1330   - gap: 6px;
1331   -
1332   - .no-visit-days-icon {
1333   - color: #F56C6C;
1334   - font-size: 16px;
1335   - }
1336   -
1337   - span {
1338   - font-weight: 500;
1339   - color: #F56C6C;
1340   - }
  1069 + display: flex;
  1070 + align-items: center;
  1071 + justify-content: center;
  1072 + gap: 6px;
  1073 +
  1074 + .no-visit-days-icon {
  1075 + color: #F56C6C;
  1076 + font-size: 16px;
  1077 + }
  1078 +
  1079 + span {
  1080 + font-weight: 500;
  1081 + color: #F56C6C;
  1082 + }
1341 1083 }
1342 1084  
1343 1085 // 年龄样式
1344 1086 .age-info {
1345   - display: flex;
1346   - align-items: center;
1347   - justify-content: center;
1348   - gap: 6px;
1349   -
1350   - .age-icon {
1351   - color: #909399;
1352   - font-size: 16px;
1353   - }
1354   -
1355   - span {
1356   - font-weight: 500;
1357   - color: #303133;
1358   - }
  1087 + display: flex;
  1088 + align-items: center;
  1089 + justify-content: center;
  1090 + gap: 6px;
  1091 +
  1092 + .age-icon {
  1093 + color: #909399;
  1094 + font-size: 16px;
  1095 + }
  1096 +
  1097 + span {
  1098 + font-weight: 500;
  1099 + color: #303133;
  1100 + }
1359 1101 }
1360 1102  
1361 1103 // 频次相关样式
1362   -.visit-frequency-info, .service-times-info, .total-consume-times-info, .total-service-times-info {
1363   - display: flex;
1364   - align-items: center;
1365   - justify-content: center;
1366   - gap: 6px;
1367   -
1368   - .visit-frequency-icon, .service-times-icon, .total-consume-times-icon, .total-service-times-icon {
1369   - color: #409EFF;
1370   - font-size: 16px;
1371   - }
1372   -
1373   - span {
1374   - font-weight: 500;
1375   - color: #303133;
1376   - }
  1104 +.visit-frequency-info,
  1105 +.service-times-info,
  1106 +.total-consume-times-info,
  1107 +.total-service-times-info {
  1108 + display: flex;
  1109 + align-items: center;
  1110 + justify-content: center;
  1111 + gap: 6px;
  1112 +
  1113 + .visit-frequency-icon,
  1114 + .service-times-icon,
  1115 + .total-consume-times-icon,
  1116 + .total-service-times-icon {
  1117 + color: #409EFF;
  1118 + font-size: 16px;
  1119 + }
  1120 +
  1121 + span {
  1122 + font-weight: 500;
  1123 + color: #303133;
  1124 + }
1377 1125 }
1378 1126  
1379 1127 // 金额相关样式
1380   -.cash-consume-info, .card-consume-info, .stored-consume-info, .remaining-stored-info, .remaining-product-info, .remaining-package-info, .project-card-info, .total-stored-consume-info, .cash-total-info {
1381   - display: flex;
1382   - align-items: center;
1383   - justify-content: center;
1384   - gap: 6px;
1385   -
1386   - .cash-consume-icon, .card-consume-icon, .stored-consume-icon, .remaining-stored-icon, .remaining-product-icon, .remaining-package-icon, .project-card-icon, .total-stored-consume-icon, .cash-total-icon {
1387   - color: #409EFF;
1388   - font-size: 16px;
1389   - }
1390   -
1391   - span {
1392   - font-weight: 600;
1393   - color: #409EFF;
1394   - }
  1128 +.cash-consume-info,
  1129 +.card-consume-info,
  1130 +.stored-consume-info,
  1131 +.remaining-stored-info,
  1132 +.remaining-product-info,
  1133 +.remaining-package-info,
  1134 +.project-card-info,
  1135 +.total-stored-consume-info,
  1136 +.cash-total-info {
  1137 + display: flex;
  1138 + align-items: center;
  1139 + justify-content: center;
  1140 + gap: 6px;
  1141 +
  1142 + .cash-consume-icon,
  1143 + .card-consume-icon,
  1144 + .stored-consume-icon,
  1145 + .remaining-stored-icon,
  1146 + .remaining-product-icon,
  1147 + .remaining-package-icon,
  1148 + .project-card-icon,
  1149 + .total-stored-consume-icon,
  1150 + .cash-total-icon {
  1151 + color: #409EFF;
  1152 + font-size: 16px;
  1153 + }
  1154 +
  1155 + span {
  1156 + font-weight: 600;
  1157 + color: #409EFF;
  1158 + }
1395 1159 }
1396 1160  
1397 1161 // 积分样式
1398 1162 .remaining-points-info {
1399   - display: flex;
1400   - align-items: center;
1401   - justify-content: center;
1402   - gap: 6px;
1403   -
1404   - .remaining-points-icon {
1405   - color: #E6A23C;
1406   - font-size: 16px;
1407   - }
1408   -
1409   - span {
1410   - font-weight: 500;
1411   - color: #E6A23C;
1412   - }
  1163 + display: flex;
  1164 + align-items: center;
  1165 + justify-content: center;
  1166 + gap: 6px;
  1167 +
  1168 + .remaining-points-icon {
  1169 + color: #E6A23C;
  1170 + font-size: 16px;
  1171 + }
  1172 +
  1173 + span {
  1174 + font-weight: 500;
  1175 + color: #E6A23C;
  1176 + }
1413 1177 }
1414 1178  
1415 1179 // 操作按钮样式
1416 1180 .action-buttons {
1417   - display: flex;
1418   - align-items: center;
1419   - gap: 8px;
1420   -
1421   - .edit-btn {
1422   - color: #409EFF;
1423   -
1424   - &:hover {
1425   - color: #66b1ff;
1426   - }
1427   - }
1428   -
1429   - .delete-btn {
1430   - color: #F56C6C;
1431   -
1432   - &:hover {
1433   - color: #f78989;
1434   - }
1435   - }
  1181 + display: flex;
  1182 + align-items: center;
  1183 + gap: 8px;
  1184 +
  1185 + .edit-btn {
  1186 + color: #409EFF;
  1187 +
  1188 + &:hover {
  1189 + color: #66b1ff;
  1190 + }
  1191 + }
  1192 +
  1193 + .delete-btn {
  1194 + color: #F56C6C;
  1195 +
  1196 + &:hover {
  1197 + color: #f78989;
  1198 + }
  1199 + }
1436 1200 }
1437 1201  
1438 1202 // 表格行悬停效果
1439 1203 ::v-deep .el-table__row:hover {
1440   - background-color: #f5f7fa;
  1204 + background-color: #f5f7fa;
1441 1205 }
1442 1206  
1443 1207 // 表格头部样式
1444 1208 ::v-deep .el-table__header-wrapper {
1445   - .el-table__header {
1446   - th {
1447   - background-color: #f5f7fa;
1448   - color: #606266;
1449   - font-weight: 600;
1450   - }
1451   - }
  1209 + .el-table__header {
  1210 + th {
  1211 + background-color: #f5f7fa;
  1212 + color: #606266;
  1213 + font-weight: 600;
  1214 + }
  1215 + }
1452 1216 }
1453 1217 </style>
1454 1218 \ No newline at end of file
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKhxx/LqKhxxCrInput.cs
... ... @@ -12,216 +12,125 @@ namespace NCC.Extend.Entitys.Dto.LqKhxx
12 12 /// 客户编码
13 13 /// </summary>
14 14 public string id { get; set; }
15   -
  15 +
16 16 /// <summary>
17 17 /// 客户名称
18 18 /// </summary>
19 19 public string khmc { get; set; }
20   -
  20 +
21 21 /// <summary>
22 22 /// 手机号
23 23 /// </summary>
24 24 public string sjh { get; set; }
25   -
  25 +
26 26 /// <summary>
27 27 /// 档案号
28 28 /// </summary>
29 29 public string dah { get; set; }
30   -
  30 +
31 31 /// <summary>
32 32 /// 性别
33 33 /// </summary>
34 34 public string xb { get; set; }
35   -
  35 +
36 36 /// <summary>
37 37 /// 公众号状态
38 38 /// </summary>
39 39 public string gzhzt { get; set; }
40   -
  40 +
41 41 /// <summary>
42 42 /// 微信昵称
43 43 /// </summary>
44 44 public string wxnc { get; set; }
45   -
  45 +
46 46 /// <summary>
47 47 /// 微信小程序状态
48 48 /// </summary>
49 49 public string wxxcxzt { get; set; }
50   -
  50 +
51 51 /// <summary>
52 52 /// 最近登录时间
53 53 /// </summary>
54 54 public string zjdlsj { get; set; }
55   -
  55 +
56 56 /// <summary>
57 57 /// 客户目前归属
58 58 /// </summary>
59 59 public string khmqgs { get; set; }
60   -
  60 +
61 61 /// <summary>
62 62 /// 归属门店
63 63 /// </summary>
64 64 public string gsmd { get; set; }
65   -
  65 +
66 66 /// <summary>
67 67 /// 注册时间
68 68 /// </summary>
69 69 public DateTime? zcsj { get; set; }
70   -
  70 +
71 71 /// <summary>
72 72 /// 客户类型
73 73 /// </summary>
74 74 public string khlx { get; set; }
75   -
  75 +
76 76 /// <summary>
77 77 /// 客户阶段
78 78 /// </summary>
79 79 public string khjd { get; set; }
80   -
  80 +
81 81 /// <summary>
82 82 /// 客户消费
83 83 /// </summary>
84   - public List<string> khxf { get; set; }
85   -
  84 + public string khxf { get; set; }
  85 +
86 86 /// <summary>
87 87 /// 消费频次
88 88 /// </summary>
89 89 public string xfpc { get; set; }
90   -
  90 +
91 91 /// <summary>
92 92 /// 推荐人
93 93 /// </summary>
94 94 public string tjr { get; set; }
95   -
  95 +
96 96 /// <summary>
97 97 /// 负责顾问
98 98 /// </summary>
99 99 public string fzgw { get; set; }
100   -
  100 +
101 101 /// <summary>
102 102 /// 美容师
103 103 /// </summary>
104 104 public string mrs { get; set; }
105   -
  105 +
106 106 /// <summary>
107 107 /// 进店渠道
108 108 /// </summary>
109 109 public string jdqd { get; set; }
110   -
  110 +
111 111 /// <summary>
112 112 /// 联系地址
113 113 /// </summary>
114 114 public string lxdz { get; set; }
115   -
  115 +
116 116 /// <summary>
117 117 /// 备注
118 118 /// </summary>
119 119 public string bz { get; set; }
120   -
121   - /// <summary>
122   - /// 首次到店
123   - /// </summary>
124   - public DateTime? scdd { get; set; }
125   -
126   - /// <summary>
127   - /// 最近到店
128   - /// </summary>
129   - public string zjdd { get; set; }
130   -
131   - /// <summary>
132   - /// 未到店天数
133   - /// </summary>
134   - public string wddts { get; set; }
135   -
  120 +
136 121 /// <summary>
137 122 /// 阳历生日
138 123 /// </summary>
139 124 public DateTime? yanglsr { get; set; }
140   -
  125 +
141 126 /// <summary>
142 127 /// 阴历生日
143 128 /// </summary>
144 129 public DateTime? yinlsr { get; set; }
145   -
  130 +
146 131 /// <summary>
147 132 /// 年龄
148 133 /// </summary>
149 134 public string ml { get; set; }
150   -
151   - /// <summary>
152   - /// 最近一次服务人员
153   - /// </summary>
154   - public string zjycfwry { get; set; }
155   -
156   - /// <summary>
157   - /// 期间到店频次
158   - /// </summary>
159   - public string qjddpc { get; set; }
160   -
161   - /// <summary>
162   - /// 期间服务单次
163   - /// </summary>
164   - public string qjfwdc { get; set; }
165   -
166   - /// <summary>
167   - /// 期间现金消费
168   - /// </summary>
169   - public string qjxjxf { get; set; }
170   -
171   - /// <summary>
172   - /// 期间项目耗卡
173   - /// </summary>
174   - public string qjxmhk { get; set; }
175   -
176   - /// <summary>
177   - /// 期间储值消耗
178   - /// </summary>
179   - public string qjczxh { get; set; }
180   -
181   - /// <summary>
182   - /// 剩余储值
183   - /// </summary>
184   - public decimal sycz { get; set; }
185   -
186   - /// <summary>
187   - /// 剩余积分
188   - /// </summary>
189   - public decimal syjf { get; set; }
190   -
191   - /// <summary>
192   - /// 剩余品项金额
193   - /// </summary>
194   - public decimal sypxje { get; set; }
195   -
196   - /// <summary>
197   - /// 剩余套餐金额
198   - /// </summary>
199   - public decimal sytcje { get; set; }
200   -
201   - /// <summary>
202   - /// 累计项目耗卡金额
203   - /// </summary>
204   - public decimal ljxmhkje { get; set; }
205   -
206   - /// <summary>
207   - /// 累计储值消耗
208   - /// </summary>
209   - public decimal ljczxh { get; set; }
210   -
211   - /// <summary>
212   - /// 累计消费次数
213   - /// </summary>
214   - public int? ljxfcs { get; set; }
215   -
216   - /// <summary>
217   - /// 累计服务次数
218   - /// </summary>
219   - public int? ljfwcs { get; set; }
220   -
221   - /// <summary>
222   - /// 累计现金消费金额
223   - /// </summary>
224   - public decimal ljxjxfje { get; set; }
225   -
226 135 }
227 136 }
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKhxx/LqKhxxInfoOutput.cs
... ... @@ -12,216 +12,125 @@ namespace NCC.Extend.Entitys.Dto.LqKhxx
12 12 /// 客户编码
13 13 /// </summary>
14 14 public string id { get; set; }
15   -
  15 +
16 16 /// <summary>
17 17 /// 客户名称
18 18 /// </summary>
19 19 public string khmc { get; set; }
20   -
  20 +
21 21 /// <summary>
22 22 /// 手机号
23 23 /// </summary>
24 24 public string sjh { get; set; }
25   -
  25 +
26 26 /// <summary>
27 27 /// 档案号
28 28 /// </summary>
29 29 public string dah { get; set; }
30   -
  30 +
31 31 /// <summary>
32 32 /// 性别
33 33 /// </summary>
34 34 public string xb { get; set; }
35   -
  35 +
36 36 /// <summary>
37 37 /// 公众号状态
38 38 /// </summary>
39 39 public string gzhzt { get; set; }
40   -
  40 +
41 41 /// <summary>
42 42 /// 微信昵称
43 43 /// </summary>
44 44 public string wxnc { get; set; }
45   -
  45 +
46 46 /// <summary>
47 47 /// 微信小程序状态
48 48 /// </summary>
49 49 public string wxxcxzt { get; set; }
50   -
  50 +
51 51 /// <summary>
52 52 /// 最近登录时间
53 53 /// </summary>
54 54 public string zjdlsj { get; set; }
55   -
  55 +
56 56 /// <summary>
57 57 /// 客户目前归属
58 58 /// </summary>
59 59 public string khmqgs { get; set; }
60   -
  60 +
61 61 /// <summary>
62 62 /// 归属门店
63 63 /// </summary>
64 64 public string gsmd { get; set; }
65   -
  65 +
66 66 /// <summary>
67 67 /// 注册时间
68 68 /// </summary>
69 69 public DateTime? zcsj { get; set; }
70   -
  70 +
71 71 /// <summary>
72 72 /// 客户类型
73 73 /// </summary>
74 74 public string khlx { get; set; }
75   -
  75 +
76 76 /// <summary>
77 77 /// 客户阶段
78 78 /// </summary>
79 79 public string khjd { get; set; }
80   -
  80 +
81 81 /// <summary>
82 82 /// 客户消费
83 83 /// </summary>
84   - public List<string> khxf { get; set; }
85   -
  84 + public string khxf { get; set; }
  85 +
86 86 /// <summary>
87 87 /// 消费频次
88 88 /// </summary>
89 89 public string xfpc { get; set; }
90   -
  90 +
91 91 /// <summary>
92 92 /// 推荐人
93 93 /// </summary>
94 94 public string tjr { get; set; }
95   -
  95 +
96 96 /// <summary>
97 97 /// 负责顾问
98 98 /// </summary>
99 99 public string fzgw { get; set; }
100   -
  100 +
101 101 /// <summary>
102 102 /// 美容师
103 103 /// </summary>
104 104 public string mrs { get; set; }
105   -
  105 +
106 106 /// <summary>
107 107 /// 进店渠道
108 108 /// </summary>
109 109 public string jdqd { get; set; }
110   -
  110 +
111 111 /// <summary>
112 112 /// 联系地址
113 113 /// </summary>
114 114 public string lxdz { get; set; }
115   -
  115 +
116 116 /// <summary>
117 117 /// 备注
118 118 /// </summary>
119 119 public string bz { get; set; }
120   -
121   - /// <summary>
122   - /// 首次到店
123   - /// </summary>
124   - public DateTime? scdd { get; set; }
125   -
126   - /// <summary>
127   - /// 最近到店
128   - /// </summary>
129   - public string zjdd { get; set; }
130   -
131   - /// <summary>
132   - /// 未到店天数
133   - /// </summary>
134   - public string wddts { get; set; }
135   -
  120 +
136 121 /// <summary>
137 122 /// 阳历生日
138 123 /// </summary>
139 124 public DateTime? yanglsr { get; set; }
140   -
  125 +
141 126 /// <summary>
142 127 /// 阴历生日
143 128 /// </summary>
144 129 public DateTime? yinlsr { get; set; }
145   -
  130 +
146 131 /// <summary>
147 132 /// 年龄
148 133 /// </summary>
149 134 public string ml { get; set; }
150   -
151   - /// <summary>
152   - /// 最近一次服务人员
153   - /// </summary>
154   - public string zjycfwry { get; set; }
155   -
156   - /// <summary>
157   - /// 期间到店频次
158   - /// </summary>
159   - public string qjddpc { get; set; }
160   -
161   - /// <summary>
162   - /// 期间服务单次
163   - /// </summary>
164   - public string qjfwdc { get; set; }
165   -
166   - /// <summary>
167   - /// 期间现金消费
168   - /// </summary>
169   - public string qjxjxf { get; set; }
170   -
171   - /// <summary>
172   - /// 期间项目耗卡
173   - /// </summary>
174   - public string qjxmhk { get; set; }
175   -
176   - /// <summary>
177   - /// 期间储值消耗
178   - /// </summary>
179   - public string qjczxh { get; set; }
180   -
181   - /// <summary>
182   - /// 剩余储值
183   - /// </summary>
184   - public decimal sycz { get; set; }
185   -
186   - /// <summary>
187   - /// 剩余积分
188   - /// </summary>
189   - public decimal syjf { get; set; }
190   -
191   - /// <summary>
192   - /// 剩余品项金额
193   - /// </summary>
194   - public decimal sypxje { get; set; }
195   -
196   - /// <summary>
197   - /// 剩余套餐金额
198   - /// </summary>
199   - public decimal sytcje { get; set; }
200   -
201   - /// <summary>
202   - /// 累计项目耗卡金额
203   - /// </summary>
204   - public decimal ljxmhkje { get; set; }
205   -
206   - /// <summary>
207   - /// 累计储值消耗
208   - /// </summary>
209   - public decimal ljczxh { get; set; }
210   -
211   - /// <summary>
212   - /// 累计消费次数
213   - /// </summary>
214   - public int? ljxfcs { get; set; }
215   -
216   - /// <summary>
217   - /// 累计服务次数
218   - /// </summary>
219   - public int? ljfwcs { get; set; }
220   -
221   - /// <summary>
222   - /// 累计现金消费金额
223   - /// </summary>
224   - public decimal ljxjxfje { get; set; }
225   -
226 135 }
227 136 }
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKhxx/LqKhxxListOutput.cs
... ... @@ -11,216 +11,125 @@ namespace NCC.Extend.Entitys.Dto.LqKhxx
11 11 /// 客户编码
12 12 /// </summary>
13 13 public string id { get; set; }
14   -
  14 +
15 15 /// <summary>
16 16 /// 客户名称
17 17 /// </summary>
18 18 public string khmc { get; set; }
19   -
  19 +
20 20 /// <summary>
21 21 /// 手机号
22 22 /// </summary>
23 23 public string sjh { get; set; }
24   -
  24 +
25 25 /// <summary>
26 26 /// 档案号
27 27 /// </summary>
28 28 public string dah { get; set; }
29   -
  29 +
30 30 /// <summary>
31 31 /// 性别
32 32 /// </summary>
33 33 public string xb { get; set; }
34   -
  34 +
35 35 /// <summary>
36 36 /// 公众号状态
37 37 /// </summary>
38 38 public string gzhzt { get; set; }
39   -
  39 +
40 40 /// <summary>
41 41 /// 微信昵称
42 42 /// </summary>
43 43 public string wxnc { get; set; }
44   -
  44 +
45 45 /// <summary>
46 46 /// 微信小程序状态
47 47 /// </summary>
48 48 public string wxxcxzt { get; set; }
49   -
  49 +
50 50 /// <summary>
51 51 /// 最近登录时间
52 52 /// </summary>
53 53 public string zjdlsj { get; set; }
54   -
  54 +
55 55 /// <summary>
56 56 /// 客户目前归属
57 57 /// </summary>
58 58 public string khmqgs { get; set; }
59   -
  59 +
60 60 /// <summary>
61 61 /// 归属门店
62 62 /// </summary>
63 63 public string gsmd { get; set; }
64   -
  64 +
65 65 /// <summary>
66 66 /// 注册时间
67 67 /// </summary>
68 68 public DateTime? zcsj { get; set; }
69   -
  69 +
70 70 /// <summary>
71 71 /// 客户类型
72 72 /// </summary>
73 73 public string khlx { get; set; }
74   -
  74 +
75 75 /// <summary>
76 76 /// 客户阶段
77 77 /// </summary>
78 78 public string khjd { get; set; }
79   -
  79 +
80 80 /// <summary>
81 81 /// 客户消费
82 82 /// </summary>
83 83 public string khxf { get; set; }
84   -
  84 +
85 85 /// <summary>
86 86 /// 消费频次
87 87 /// </summary>
88 88 public string xfpc { get; set; }
89   -
  89 +
90 90 /// <summary>
91 91 /// 推荐人
92 92 /// </summary>
93 93 public string tjr { get; set; }
94   -
  94 +
95 95 /// <summary>
96 96 /// 负责顾问
97 97 /// </summary>
98 98 public string fzgw { get; set; }
99   -
  99 +
100 100 /// <summary>
101 101 /// 美容师
102 102 /// </summary>
103 103 public string mrs { get; set; }
104   -
  104 +
105 105 /// <summary>
106 106 /// 进店渠道
107 107 /// </summary>
108 108 public string jdqd { get; set; }
109   -
  109 +
110 110 /// <summary>
111 111 /// 联系地址
112 112 /// </summary>
113 113 public string lxdz { get; set; }
114   -
  114 +
115 115 /// <summary>
116 116 /// 备注
117 117 /// </summary>
118 118 public string bz { get; set; }
119   -
120   - /// <summary>
121   - /// 首次到店
122   - /// </summary>
123   - public DateTime? scdd { get; set; }
124   -
125   - /// <summary>
126   - /// 最近到店
127   - /// </summary>
128   - public string zjdd { get; set; }
129   -
130   - /// <summary>
131   - /// 未到店天数
132   - /// </summary>
133   - public string wddts { get; set; }
134   -
  119 +
135 120 /// <summary>
136 121 /// 阳历生日
137 122 /// </summary>
138 123 public DateTime? yanglsr { get; set; }
139   -
  124 +
140 125 /// <summary>
141 126 /// 阴历生日
142 127 /// </summary>
143 128 public DateTime? yinlsr { get; set; }
144   -
  129 +
145 130 /// <summary>
146 131 /// 年龄
147 132 /// </summary>
148 133 public string ml { get; set; }
149   -
150   - /// <summary>
151   - /// 最近一次服务人员
152   - /// </summary>
153   - public string zjycfwry { get; set; }
154   -
155   - /// <summary>
156   - /// 期间到店频次
157   - /// </summary>
158   - public string qjddpc { get; set; }
159   -
160   - /// <summary>
161   - /// 期间服务单次
162   - /// </summary>
163   - public string qjfwdc { get; set; }
164   -
165   - /// <summary>
166   - /// 期间现金消费
167   - /// </summary>
168   - public string qjxjxf { get; set; }
169   -
170   - /// <summary>
171   - /// 期间项目耗卡
172   - /// </summary>
173   - public string qjxmhk { get; set; }
174   -
175   - /// <summary>
176   - /// 期间储值消耗
177   - /// </summary>
178   - public string qjczxh { get; set; }
179   -
180   - /// <summary>
181   - /// 剩余储值
182   - /// </summary>
183   - public decimal sycz { get; set; }
184   -
185   - /// <summary>
186   - /// 剩余积分
187   - /// </summary>
188   - public decimal syjf { get; set; }
189   -
190   - /// <summary>
191   - /// 剩余品项金额
192   - /// </summary>
193   - public decimal sypxje { get; set; }
194   -
195   - /// <summary>
196   - /// 剩余套餐金额
197   - /// </summary>
198   - public decimal sytcje { get; set; }
199   -
200   - /// <summary>
201   - /// 累计项目耗卡金额
202   - /// </summary>
203   - public decimal ljxmhkje { get; set; }
204   -
205   - /// <summary>
206   - /// 累计储值消耗
207   - /// </summary>
208   - public decimal ljczxh { get; set; }
209   -
210   - /// <summary>
211   - /// 累计消费次数
212   - /// </summary>
213   - public int? ljxfcs { get; set; }
214   -
215   - /// <summary>
216   - /// 累计服务次数
217   - /// </summary>
218   - public int? ljfwcs { get; set; }
219   -
220   - /// <summary>
221   - /// 累计现金消费金额
222   - /// </summary>
223   - public decimal ljxjxfje { get; set; }
224   -
225 134 }
226 135 }
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKhxx/LqKhxxListQueryInput.cs
1   -using NCC.Common.Filter;
2   -using System.Collections.Generic;
  1 +using System.Collections.Generic;
  2 +using NCC.Common.Filter;
3 3  
4 4 namespace NCC.Extend.Entitys.Dto.LqKhxx
5 5 {
... ... @@ -14,225 +14,133 @@ namespace NCC.Extend.Entitys.Dto.LqKhxx
14 14 public string selectKey { get; set; }
15 15  
16 16 /// <summary>
17   - ///
  17 + ///
18 18 /// </summary>
19 19 public int dataType { get; set; }
20 20  
21   -
22 21 /// <summary>
23 22 /// 客户编码
24 23 /// </summary>
25 24 public string id { get; set; }
26   -
  25 +
27 26 /// <summary>
28 27 /// 客户名称
29 28 /// </summary>
30 29 public string khmc { get; set; }
31   -
  30 +
32 31 /// <summary>
33 32 /// 手机号
34 33 /// </summary>
35 34 public string sjh { get; set; }
36   -
  35 +
37 36 /// <summary>
38 37 /// 档案号
39 38 /// </summary>
40 39 public string dah { get; set; }
41   -
  40 +
42 41 /// <summary>
43 42 /// 性别
44 43 /// </summary>
45 44 public string xb { get; set; }
46   -
  45 +
47 46 /// <summary>
48 47 /// 公众号状态
49 48 /// </summary>
50 49 public string gzhzt { get; set; }
51   -
  50 +
52 51 /// <summary>
53 52 /// 微信昵称
54 53 /// </summary>
55 54 public string wxnc { get; set; }
56   -
  55 +
57 56 /// <summary>
58 57 /// 微信小程序状态
59 58 /// </summary>
60 59 public string wxxcxzt { get; set; }
61   -
  60 +
62 61 /// <summary>
63 62 /// 最近登录时间
64 63 /// </summary>
65 64 public string zjdlsj { get; set; }
66   -
  65 +
67 66 /// <summary>
68 67 /// 客户目前归属
69 68 /// </summary>
70 69 public string khmqgs { get; set; }
71   -
  70 +
72 71 /// <summary>
73 72 /// 归属门店
74 73 /// </summary>
75 74 public string gsmd { get; set; }
76   -
  75 +
77 76 /// <summary>
78 77 /// 注册时间
79 78 /// </summary>
80 79 public string zcsj { get; set; }
81   -
  80 +
82 81 /// <summary>
83 82 /// 客户类型
84 83 /// </summary>
85 84 public string khlx { get; set; }
86   -
  85 +
87 86 /// <summary>
88 87 /// 客户阶段
89 88 /// </summary>
90 89 public string khjd { get; set; }
91   -
  90 +
92 91 /// <summary>
93 92 /// 客户消费
94 93 /// </summary>
95 94 public string khxf { get; set; }
96   -
  95 +
97 96 /// <summary>
98 97 /// 消费频次
99 98 /// </summary>
100 99 public string xfpc { get; set; }
101   -
  100 +
102 101 /// <summary>
103 102 /// 推荐人
104 103 /// </summary>
105 104 public string tjr { get; set; }
106   -
  105 +
107 106 /// <summary>
108 107 /// 负责顾问
109 108 /// </summary>
110 109 public string fzgw { get; set; }
111   -
  110 +
112 111 /// <summary>
113 112 /// 美容师
114 113 /// </summary>
115 114 public string mrs { get; set; }
116   -
  115 +
117 116 /// <summary>
118 117 /// 进店渠道
119 118 /// </summary>
120 119 public string jdqd { get; set; }
121   -
  120 +
122 121 /// <summary>
123 122 /// 联系地址
124 123 /// </summary>
125 124 public string lxdz { get; set; }
126   -
  125 +
127 126 /// <summary>
128 127 /// 备注
129 128 /// </summary>
130 129 public string bz { get; set; }
131   -
132   - /// <summary>
133   - /// 首次到店
134   - /// </summary>
135   - public string scdd { get; set; }
136   -
137   - /// <summary>
138   - /// 最近到店
139   - /// </summary>
140   - public string zjdd { get; set; }
141   -
142   - /// <summary>
143   - /// 未到店天数
144   - /// </summary>
145   - public string wddts { get; set; }
146   -
  130 +
147 131 /// <summary>
148 132 /// 阳历生日
149 133 /// </summary>
150 134 public string yanglsr { get; set; }
151   -
  135 +
152 136 /// <summary>
153 137 /// 阴历生日
154 138 /// </summary>
155 139 public string yinlsr { get; set; }
156   -
  140 +
157 141 /// <summary>
158 142 /// 年龄
159 143 /// </summary>
160 144 public string ml { get; set; }
161   -
162   - /// <summary>
163   - /// 最近一次服务人员
164   - /// </summary>
165   - public string zjycfwry { get; set; }
166   -
167   - /// <summary>
168   - /// 期间到店频次
169   - /// </summary>
170   - public string qjddpc { get; set; }
171   -
172   - /// <summary>
173   - /// 期间服务单次
174   - /// </summary>
175   - public string qjfwdc { get; set; }
176   -
177   - /// <summary>
178   - /// 期间现金消费
179   - /// </summary>
180   - public string qjxjxf { get; set; }
181   -
182   - /// <summary>
183   - /// 期间项目耗卡
184   - /// </summary>
185   - public string qjxmhk { get; set; }
186   -
187   - /// <summary>
188   - /// 期间储值消耗
189   - /// </summary>
190   - public string qjczxh { get; set; }
191   -
192   - /// <summary>
193   - /// 剩余储值
194   - /// </summary>
195   - public string sycz { get; set; }
196   -
197   - /// <summary>
198   - /// 剩余积分
199   - /// </summary>
200   - public string syjf { get; set; }
201   -
202   - /// <summary>
203   - /// 剩余品项金额
204   - /// </summary>
205   - public string sypxje { get; set; }
206   -
207   - /// <summary>
208   - /// 剩余套餐金额
209   - /// </summary>
210   - public string sytcje { get; set; }
211   -
212   - /// <summary>
213   - /// 累计项目耗卡金额
214   - /// </summary>
215   - public string ljxmhkje { get; set; }
216   -
217   - /// <summary>
218   - /// 累计储值消耗
219   - /// </summary>
220   - public string ljczxh { get; set; }
221   -
222   - /// <summary>
223   - /// 累计消费次数
224   - /// </summary>
225   - public string ljxfcs { get; set; }
226   -
227   - /// <summary>
228   - /// 累计服务次数
229   - /// </summary>
230   - public string ljfwcs { get; set; }
231   -
232   - /// <summary>
233   - /// 累计现金消费金额
234   - /// </summary>
235   - public string ljxjxfje { get; set; }
236   -
237 145 }
238 146 }
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_khxx/LqKhxxEntity.cs
1   -using NCC.Common.Const;
  1 +using System;
  2 +using NCC.Common.Const;
2 3 using SqlSugar;
3   -using System;
4 4  
5 5 namespace NCC.Extend.Entitys.lq_khxx
6 6 {
... ... @@ -16,258 +16,149 @@ namespace NCC.Extend.Entitys.lq_khxx
16 16 /// </summary>
17 17 [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
18 18 public string Id { get; set; }
19   -
  19 +
20 20 /// <summary>
21 21 /// 客户名称
22 22 /// </summary>
23   - [SugarColumn(ColumnName = "khmc")]
  23 + [SugarColumn(ColumnName = "khmc")]
24 24 public string Khmc { get; set; }
25   -
  25 +
26 26 /// <summary>
27 27 /// 手机号
28 28 /// </summary>
29   - [SugarColumn(ColumnName = "sjh")]
  29 + [SugarColumn(ColumnName = "sjh")]
30 30 public string Sjh { get; set; }
31   -
  31 +
32 32 /// <summary>
33 33 /// 档案号
34 34 /// </summary>
35   - [SugarColumn(ColumnName = "dah")]
  35 + [SugarColumn(ColumnName = "dah")]
36 36 public string Dah { get; set; }
37   -
  37 +
38 38 /// <summary>
39 39 /// 性别
40 40 /// </summary>
41   - [SugarColumn(ColumnName = "xb")]
  41 + [SugarColumn(ColumnName = "xb")]
42 42 public string Xb { get; set; }
43   -
  43 +
44 44 /// <summary>
45 45 /// 公众号状态
46 46 /// </summary>
47   - [SugarColumn(ColumnName = "gzhzt")]
  47 + [SugarColumn(ColumnName = "gzhzt")]
48 48 public string Gzhzt { get; set; }
49   -
  49 +
50 50 /// <summary>
51 51 /// 微信昵称
52 52 /// </summary>
53   - [SugarColumn(ColumnName = "wxnc")]
  53 + [SugarColumn(ColumnName = "wxnc")]
54 54 public string Wxnc { get; set; }
55   -
  55 +
56 56 /// <summary>
57 57 /// 微信小程序状态
58 58 /// </summary>
59   - [SugarColumn(ColumnName = "wxxcxzt")]
  59 + [SugarColumn(ColumnName = "wxxcxzt")]
60 60 public string Wxxcxzt { get; set; }
61   -
  61 +
62 62 /// <summary>
63 63 /// 最近登录时间
64 64 /// </summary>
65   - [SugarColumn(ColumnName = "zjdlsj")]
  65 + [SugarColumn(ColumnName = "zjdlsj")]
66 66 public string Zjdlsj { get; set; }
67   -
  67 +
68 68 /// <summary>
69 69 /// 客户目前归属
70 70 /// </summary>
71   - [SugarColumn(ColumnName = "khmqgs")]
  71 + [SugarColumn(ColumnName = "khmqgs")]
72 72 public string Khmqgs { get; set; }
73   -
  73 +
74 74 /// <summary>
75 75 /// 归属门店
76 76 /// </summary>
77   - [SugarColumn(ColumnName = "gsmd")]
  77 + [SugarColumn(ColumnName = "gsmd")]
78 78 public string Gsmd { get; set; }
79   -
  79 +
80 80 /// <summary>
81 81 /// 注册时间
82 82 /// </summary>
83   - [SugarColumn(ColumnName = "zcsj")]
  83 + [SugarColumn(ColumnName = "zcsj")]
84 84 public DateTime? Zcsj { get; set; }
85   -
  85 +
86 86 /// <summary>
87 87 /// 客户类型
88 88 /// </summary>
89   - [SugarColumn(ColumnName = "khlx")]
  89 + [SugarColumn(ColumnName = "khlx")]
90 90 public string Khlx { get; set; }
91   -
  91 +
92 92 /// <summary>
93 93 /// 客户阶段
94 94 /// </summary>
95   - [SugarColumn(ColumnName = "khjd")]
  95 + [SugarColumn(ColumnName = "khjd")]
96 96 public string Khjd { get; set; }
97   -
  97 +
98 98 /// <summary>
99 99 /// 客户消费
100 100 /// </summary>
101   - [SugarColumn(ColumnName = "khxf")]
  101 + [SugarColumn(ColumnName = "khxf")]
102 102 public string Khxf { get; set; }
103   -
  103 +
104 104 /// <summary>
105 105 /// 消费频次
106 106 /// </summary>
107   - [SugarColumn(ColumnName = "xfpc")]
  107 + [SugarColumn(ColumnName = "xfpc")]
108 108 public string Xfpc { get; set; }
109   -
  109 +
110 110 /// <summary>
111 111 /// 推荐人
112 112 /// </summary>
113   - [SugarColumn(ColumnName = "tjr")]
  113 + [SugarColumn(ColumnName = "tjr")]
114 114 public string Tjr { get; set; }
115   -
  115 +
116 116 /// <summary>
117 117 /// 负责顾问
118 118 /// </summary>
119   - [SugarColumn(ColumnName = "fzgw")]
  119 + [SugarColumn(ColumnName = "fzgw")]
120 120 public string Fzgw { get; set; }
121   -
  121 +
122 122 /// <summary>
123 123 /// 美容师
124 124 /// </summary>
125   - [SugarColumn(ColumnName = "mrs")]
  125 + [SugarColumn(ColumnName = "mrs")]
126 126 public string Mrs { get; set; }
127   -
  127 +
128 128 /// <summary>
129 129 /// 进店渠道
130 130 /// </summary>
131   - [SugarColumn(ColumnName = "jdqd")]
  131 + [SugarColumn(ColumnName = "jdqd")]
132 132 public string Jdqd { get; set; }
133   -
  133 +
134 134 /// <summary>
135 135 /// 联系地址
136 136 /// </summary>
137   - [SugarColumn(ColumnName = "lxdz")]
  137 + [SugarColumn(ColumnName = "lxdz")]
138 138 public string Lxdz { get; set; }
139   -
  139 +
140 140 /// <summary>
141 141 /// 备注
142 142 /// </summary>
143   - [SugarColumn(ColumnName = "bz")]
  143 + [SugarColumn(ColumnName = "bz")]
144 144 public string Bz { get; set; }
145   -
146   - /// <summary>
147   - /// 首次到店
148   - /// </summary>
149   - [SugarColumn(ColumnName = "scdd")]
150   - public DateTime? Scdd { get; set; }
151   -
152   - /// <summary>
153   - /// 最近到店
154   - /// </summary>
155   - [SugarColumn(ColumnName = "zjdd")]
156   - public string Zjdd { get; set; }
157   -
158   - /// <summary>
159   - /// 未到店天数
160   - /// </summary>
161   - [SugarColumn(ColumnName = "wddts")]
162   - public string Wddts { get; set; }
163   -
  145 +
164 146 /// <summary>
165 147 /// 阳历生日
166 148 /// </summary>
167   - [SugarColumn(ColumnName = "yanglsr")]
  149 + [SugarColumn(ColumnName = "yanglsr")]
168 150 public DateTime? Yanglsr { get; set; }
169   -
  151 +
170 152 /// <summary>
171 153 /// 阴历生日
172 154 /// </summary>
173   - [SugarColumn(ColumnName = "yinlsr")]
  155 + [SugarColumn(ColumnName = "yinlsr")]
174 156 public DateTime? Yinlsr { get; set; }
175   -
  157 +
176 158 /// <summary>
177 159 /// 年龄
178 160 /// </summary>
179   - [SugarColumn(ColumnName = "ml")]
  161 + [SugarColumn(ColumnName = "ml")]
180 162 public string Ml { get; set; }
181   -
182   - /// <summary>
183   - /// 最近一次服务人员
184   - /// </summary>
185   - [SugarColumn(ColumnName = "zjycfwry")]
186   - public string Zjycfwry { get; set; }
187   -
188   - /// <summary>
189   - /// 期间到店频次
190   - /// </summary>
191   - [SugarColumn(ColumnName = "qjddpc")]
192   - public string Qjddpc { get; set; }
193   -
194   - /// <summary>
195   - /// 期间服务单次
196   - /// </summary>
197   - [SugarColumn(ColumnName = "qjfwdc")]
198   - public string Qjfwdc { get; set; }
199   -
200   - /// <summary>
201   - /// 期间现金消费
202   - /// </summary>
203   - [SugarColumn(ColumnName = "qjxjxf")]
204   - public string Qjxjxf { get; set; }
205   -
206   - /// <summary>
207   - /// 期间项目耗卡
208   - /// </summary>
209   - [SugarColumn(ColumnName = "qjxmhk")]
210   - public string Qjxmhk { get; set; }
211   -
212   - /// <summary>
213   - /// 期间储值消耗
214   - /// </summary>
215   - [SugarColumn(ColumnName = "qjczxh")]
216   - public string Qjczxh { get; set; }
217   -
218   - /// <summary>
219   - /// 剩余储值
220   - /// </summary>
221   - [SugarColumn(ColumnName = "sycz")]
222   - public decimal Sycz { get; set; }
223   -
224   - /// <summary>
225   - /// 剩余积分
226   - /// </summary>
227   - [SugarColumn(ColumnName = "syjf")]
228   - public decimal Syjf { get; set; }
229   -
230   - /// <summary>
231   - /// 剩余品项金额
232   - /// </summary>
233   - [SugarColumn(ColumnName = "sypxje")]
234   - public decimal Sypxje { get; set; }
235   -
236   - /// <summary>
237   - /// 剩余套餐金额
238   - /// </summary>
239   - [SugarColumn(ColumnName = "sytcje")]
240   - public decimal Sytcje { get; set; }
241   -
242   - /// <summary>
243   - /// 累计项目耗卡金额
244   - /// </summary>
245   - [SugarColumn(ColumnName = "ljxmhkje")]
246   - public decimal Ljxmhkje { get; set; }
247   -
248   - /// <summary>
249   - /// 累计储值消耗
250   - /// </summary>
251   - [SugarColumn(ColumnName = "ljczxh")]
252   - public decimal Ljczxh { get; set; }
253   -
254   - /// <summary>
255   - /// 累计消费次数
256   - /// </summary>
257   - [SugarColumn(ColumnName = "ljxfcs")]
258   - public int? Ljxfcs { get; set; }
259   -
260   - /// <summary>
261   - /// 累计服务次数
262   - /// </summary>
263   - [SugarColumn(ColumnName = "ljfwcs")]
264   - public int? Ljfwcs { get; set; }
265   -
266   - /// <summary>
267   - /// 累计现金消费金额
268   - /// </summary>
269   - [SugarColumn(ColumnName = "ljxjxfje")]
270   - public decimal Ljxjxfje { get; set; }
271   -
272 163 }
273   -}
274 164 \ No newline at end of file
  165 +}
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqKhxxMapper.cs
1   -using NCC.Common.Helper;
  1 +using System.Collections.Generic;
  2 +using Mapster;
  3 +using NCC.Common.Helper;
2 4 using NCC.Extend.Entitys.Dto.LqKhxx;
3 5 using NCC.Extend.Entitys.lq_khxx;
4   -using Mapster;
5   -using System.Collections.Generic;
6 6  
7 7 namespace NCC.Extend.Entitys.Mapper.LqKhxx
8 8 {
9   - public class Mapper : IRegister
10   - {
11   - public void Register(TypeAdapterConfig config)
12   - {
13   - config.ForType<LqKhxxCrInput, LqKhxxEntity>()
14   - .Map(dest => dest.Khxf, src => src.khxf.ToJson())
15   - ;
16   - config.ForType<LqKhxxEntity, LqKhxxInfoOutput>()
17   - .Map(dest => dest.khxf, src => src.Khxf.ToObject<List<string>>())
18   - ;
19   - }
20   - }
  9 + public class Mapper : IRegister
  10 + {
  11 + public void Register(TypeAdapterConfig config)
  12 + {
  13 + // 由于khxf字段现在是string类型,不需要特殊的映射处理
  14 + // 使用默认的映射即可
  15 + }
  16 + }
21 17 }
... ...
netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
... ... @@ -106,19 +106,13 @@ namespace NCC.Extend.LqKdKdjlb
106 106 var output = entity.Adapt<LqKdKdjlbInfoOutput>();
107 107  
108 108 // 2. 查询品项明细列表
109   - var lqKdPxmxList = await _db.Queryable<LqKdPxmxEntity>()
110   - .Where(w => w.Glkdbh == entity.Id)
111   - .ToListAsync();
  109 + var lqKdPxmxList = await _db.Queryable<LqKdPxmxEntity>().Where(w => w.Glkdbh == entity.Id).ToListAsync();
112 110  
113 111 // 3. 查询健康师业绩列表
114   - var lqKdJksyjList = await _db.Queryable<LqKdJksyjEntity>()
115   - .Where(w => w.Glkdbh == entity.Id)
116   - .ToListAsync();
  112 + var lqKdJksyjList = await _db.Queryable<LqKdJksyjEntity>().Where(w => w.Glkdbh == entity.Id).ToListAsync();
117 113  
118 114 // 4. 查询科技部老师业绩列表
119   - var lqKdKjbsyjList = await _db.Queryable<LqKdKjbsyjEntity>()
120   - .Where(w => w.Glkdbh == entity.Id)
121   - .ToListAsync();
  115 + var lqKdKjbsyjList = await _db.Queryable<LqKdKjbsyjEntity>().Where(w => w.Glkdbh == entity.Id).ToListAsync();
122 116  
123 117 // 5. 构建品项明细输出,每个品项关联对应的业绩信息
124 118 var pxmxOutputList = new List<LqKdPxmxInfoOutput>();
... ... @@ -178,40 +172,15 @@ namespace NCC.Extend.LqKdKdjlb
178 172 public async Task<dynamic> GetList([FromQuery] LqKdKdjlbListQueryInput input)
179 173 {
180 174 var sidx = input.sidx == null ? "id" : input.sidx;
181   - List<string> queryKdrq =
182   - input.kdrq != null ? input.kdrq.Split(',').ToObeject<List<string>>() : null;
  175 + List<string> queryKdrq = input.kdrq != null ? input.kdrq.Split(',').ToObeject<List<string>>() : null;
183 176 DateTime? startKdrq = queryKdrq != null ? Ext.GetDateTime(queryKdrq.First()) : null;
184 177 DateTime? endKdrq = queryKdrq != null ? Ext.GetDateTime(queryKdrq.Last()) : null;
185 178 var data = await _db.Queryable<LqKdKdjlbEntity>()
186 179 .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
187 180 .WhereIF(!string.IsNullOrEmpty(input.djmd), p => p.Djmd.Equals(input.djmd))
188 181 .WhereIF(!string.IsNullOrEmpty(input.jsj), p => p.Jsj.Equals(input.jsj))
189   - .WhereIF(
190   - queryKdrq != null,
191   - p =>
192   - p.Kdrq
193   - >= new DateTime(
194   - startKdrq.ToDate().Year,
195   - startKdrq.ToDate().Month,
196   - startKdrq.ToDate().Day,
197   - 0,
198   - 0,
199   - 0
200   - )
201   - )
202   - .WhereIF(
203   - queryKdrq != null,
204   - p =>
205   - p.Kdrq
206   - <= new DateTime(
207   - endKdrq.ToDate().Year,
208   - endKdrq.ToDate().Month,
209   - endKdrq.ToDate().Day,
210   - 23,
211   - 59,
212   - 59
213   - )
214   - )
  182 + .WhereIF(queryKdrq != null, p => p.Kdrq >= new DateTime(startKdrq.ToDate().Year, startKdrq.ToDate().Month, startKdrq.ToDate().Day, 0, 0, 0))
  183 + .WhereIF(queryKdrq != null, p => p.Kdrq <= new DateTime(endKdrq.ToDate().Year, endKdrq.ToDate().Month, endKdrq.ToDate().Day, 23, 59, 59))
215 184 .WhereIF(!string.IsNullOrEmpty(input.gjlx), p => p.Gjlx.Equals(input.gjlx))
216 185 .WhereIF(!string.IsNullOrEmpty(input.hgjg), p => p.Hgjg.Equals(input.hgjg))
217 186 .WhereIF(!string.IsNullOrEmpty(input.zdyj), p => p.Zdyj.Equals(input.zdyj))
... ... @@ -229,20 +198,11 @@ namespace NCC.Extend.LqKdKdjlb
229 198 .WhereIF(!string.IsNullOrEmpty(input.bz), p => p.Bz.Contains(input.bz))
230 199 .WhereIF(!string.IsNullOrEmpty(input.kdhy), p => p.Kdhy.Equals(input.kdhy))
231 200 .WhereIF(!string.IsNullOrEmpty(input.kdhyc), p => p.Kdhyc.Contains(input.kdhyc))
232   - .WhereIF(
233   - !string.IsNullOrEmpty(input.kdhysjh),
234   - p => p.Kdhysjh.Contains(input.kdhysjh)
235   - )
  201 + .WhereIF(!string.IsNullOrEmpty(input.kdhysjh), p => p.Kdhysjh.Contains(input.kdhysjh))
236 202 .WhereIF(!string.IsNullOrEmpty(input.jksyj), p => p.Jksyj.Contains(input.jksyj))
237   - .WhereIF(
238   - !string.IsNullOrEmpty(input.kjblsyj),
239   - p => p.Kjblsyj.Contains(input.kjblsyj)
240   - )
  203 + .WhereIF(!string.IsNullOrEmpty(input.kjblsyj), p => p.Kjblsyj.Contains(input.kjblsyj))
241 204 .WhereIF(!string.IsNullOrEmpty(input.pxxx), p => p.Pxxx.Contains(input.pxxx))
242   - .WhereIF(
243   - !string.IsNullOrEmpty(input.F_FIleUrl),
244   - p => p.F_FIleUrl.Contains(input.F_FIleUrl)
245   - )
  205 + .WhereIF(!string.IsNullOrEmpty(input.F_FIleUrl), p => p.F_FIleUrl.Contains(input.F_FIleUrl))
246 206 .Select(it => new LqKdKdjlbListOutput
247 207 {
248 208 id = it.Id,
... ... @@ -297,9 +257,7 @@ namespace NCC.Extend.LqKdKdjlb
297 257 _db.BeginTran();
298 258 //新增开单记录表记录
299 259 entity.CreateUser = userInfo.userId;
300   - var newEntity = await _db.Insertable(entity)
301   - .IgnoreColumns(ignoreNullColumn: true)
302   - .ExecuteReturnEntityAsync();
  260 + var newEntity = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteReturnEntityAsync();
303 261 //循环品相信息
304 262 // 收集所有需要插入的实体,然后批量插入
305 263 var allPxmxEntities = new List<LqKdPxmxEntity>();
... ... @@ -394,18 +352,14 @@ namespace NCC.Extend.LqKdKdjlb
394 352 var entityInfo = await GetInfo(newEntity.Id);
395 353 if (entityInfo != null)
396 354 {
397   - var orderRecordString = _stringGenerator.GenerateOrderRecordString(
398   - entityInfo
399   - );
  355 + var orderRecordString = _stringGenerator.GenerateOrderRecordString(entityInfo);
400 356 Console.WriteLine("开单记录字符串生成成功:");
401 357 Console.WriteLine(orderRecordString);
402 358  
403 359 // 发送到企业微信群
404 360 try
405 361 {
406   - var sendResult = await _weChatBotService.SendOrderRecordMessage(
407   - orderRecordString
408   - );
  362 + var sendResult = await _weChatBotService.SendOrderRecordMessage(orderRecordString);
409 363 if (sendResult)
410 364 {
411 365 Console.WriteLine("开单记录已成功发送到企业微信群");
... ... @@ -448,40 +402,15 @@ namespace NCC.Extend.LqKdKdjlb
448 402 public async Task<dynamic> GetNoPagingList([FromQuery] LqKdKdjlbListQueryInput input)
449 403 {
450 404 var sidx = input.sidx == null ? "id" : input.sidx;
451   - List<string> queryKdrq =
452   - input.kdrq != null ? input.kdrq.Split(',').ToObeject<List<string>>() : null;
  405 + List<string> queryKdrq = input.kdrq != null ? input.kdrq.Split(',').ToObeject<List<string>>() : null;
453 406 DateTime? startKdrq = queryKdrq != null ? Ext.GetDateTime(queryKdrq.First()) : null;
454 407 DateTime? endKdrq = queryKdrq != null ? Ext.GetDateTime(queryKdrq.Last()) : null;
455 408 var data = await _db.Queryable<LqKdKdjlbEntity>()
456 409 .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
457 410 .WhereIF(!string.IsNullOrEmpty(input.djmd), p => p.Djmd.Equals(input.djmd))
458 411 .WhereIF(!string.IsNullOrEmpty(input.jsj), p => p.Jsj.Equals(input.jsj))
459   - .WhereIF(
460   - queryKdrq != null,
461   - p =>
462   - p.Kdrq
463   - >= new DateTime(
464   - startKdrq.ToDate().Year,
465   - startKdrq.ToDate().Month,
466   - startKdrq.ToDate().Day,
467   - 0,
468   - 0,
469   - 0
470   - )
471   - )
472   - .WhereIF(
473   - queryKdrq != null,
474   - p =>
475   - p.Kdrq
476   - <= new DateTime(
477   - endKdrq.ToDate().Year,
478   - endKdrq.ToDate().Month,
479   - endKdrq.ToDate().Day,
480   - 23,
481   - 59,
482   - 59
483   - )
484   - )
  412 + .WhereIF(queryKdrq != null, p => p.Kdrq >= new DateTime(startKdrq.ToDate().Year, startKdrq.ToDate().Month, startKdrq.ToDate().Day, 0, 0, 0))
  413 + .WhereIF(queryKdrq != null, p => p.Kdrq <= new DateTime(endKdrq.ToDate().Year, endKdrq.ToDate().Month, endKdrq.ToDate().Day, 23, 59, 59))
485 414 .WhereIF(!string.IsNullOrEmpty(input.gjlx), p => p.Gjlx.Equals(input.gjlx))
486 415 .WhereIF(!string.IsNullOrEmpty(input.hgjg), p => p.Hgjg.Equals(input.hgjg))
487 416 .WhereIF(!string.IsNullOrEmpty(input.zdyj), p => p.Zdyj.Equals(input.zdyj))
... ... @@ -499,20 +428,11 @@ namespace NCC.Extend.LqKdKdjlb
499 428 .WhereIF(!string.IsNullOrEmpty(input.bz), p => p.Bz.Contains(input.bz))
500 429 .WhereIF(!string.IsNullOrEmpty(input.kdhy), p => p.Kdhy.Equals(input.kdhy))
501 430 .WhereIF(!string.IsNullOrEmpty(input.kdhyc), p => p.Kdhyc.Contains(input.kdhyc))
502   - .WhereIF(
503   - !string.IsNullOrEmpty(input.kdhysjh),
504   - p => p.Kdhysjh.Contains(input.kdhysjh)
505   - )
  431 + .WhereIF(!string.IsNullOrEmpty(input.kdhysjh), p => p.Kdhysjh.Contains(input.kdhysjh))
506 432 .WhereIF(!string.IsNullOrEmpty(input.jksyj), p => p.Jksyj.Contains(input.jksyj))
507   - .WhereIF(
508   - !string.IsNullOrEmpty(input.kjblsyj),
509   - p => p.Kjblsyj.Contains(input.kjblsyj)
510   - )
  433 + .WhereIF(!string.IsNullOrEmpty(input.kjblsyj), p => p.Kjblsyj.Contains(input.kjblsyj))
511 434 .WhereIF(!string.IsNullOrEmpty(input.pxxx), p => p.Pxxx.Contains(input.pxxx))
512   - .WhereIF(
513   - !string.IsNullOrEmpty(input.F_FIleUrl),
514   - p => p.F_FIleUrl.Contains(input.F_FIleUrl)
515   - )
  435 + .WhereIF(!string.IsNullOrEmpty(input.F_FIleUrl), p => p.F_FIleUrl.Contains(input.F_FIleUrl))
516 436 .Select(it => new LqKdKdjlbListOutput
517 437 {
518 438 id = it.Id,
... ... @@ -583,23 +503,13 @@ namespace NCC.Extend.LqKdKdjlb
583 503 var isExist = paramList.Find(p => p.field == item);
584 504 if (isExist != null)
585 505 {
586   - excelconfig.ColumnModel.Add(
587   - new ExcelColumnModel()
588   - {
589   - Column = isExist.field,
590   - ExcelColumn = isExist.value,
591   - }
592   - );
  506 + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value });
593 507 }
594 508 }
595 509 var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName;
596 510 ExcelExportHelper<LqKdKdjlbListOutput>.Export(exportData, excelconfig, addPath);
597 511 var fileName = _userManager.UserId + "|" + addPath + "|xls";
598   - var output = new
599   - {
600   - name = excelconfig.FileName,
601   - url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC"),
602   - };
  512 + var output = new { name = excelconfig.FileName, url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") };
603 513 return output;
604 514 }
605 515 #endregion
... ... @@ -621,24 +531,16 @@ namespace NCC.Extend.LqKdKdjlb
621 531 //开启事务
622 532 _db.BeginTran();
623 533 //批量删除开单记录表
624   - await _db.Deleteable<LqKdKdjlbEntity>()
625   - .In(d => d.Id, ids)
626   - .ExecuteCommandAsync();
  534 + await _db.Deleteable<LqKdKdjlbEntity>().In(d => d.Id, ids).ExecuteCommandAsync();
627 535  
628 536 //清空子表数据
629   - await _db.Deleteable<LqKdJksyjEntity>()
630   - .In(u => u.Glkdbh, ids)
631   - .ExecuteCommandAsync();
  537 + await _db.Deleteable<LqKdJksyjEntity>().In(u => u.Glkdbh, ids).ExecuteCommandAsync();
632 538  
633 539 //清空子表数据
634   - await _db.Deleteable<LqKdKjbsyjEntity>()
635   - .In(u => u.Glkdbh, ids)
636   - .ExecuteCommandAsync();
  540 + await _db.Deleteable<LqKdKjbsyjEntity>().In(u => u.Glkdbh, ids).ExecuteCommandAsync();
637 541  
638 542 //清空子表数据
639   - await _db.Deleteable<LqKdPxmxEntity>()
640   - .In(u => u.Glkdbh, ids)
641   - .ExecuteCommandAsync();
  543 + await _db.Deleteable<LqKdPxmxEntity>().In(u => u.Glkdbh, ids).ExecuteCommandAsync();
642 544 //关闭事务
643 545 _db.CommitTran();
644 546 }
... ... @@ -705,20 +607,12 @@ namespace NCC.Extend.LqKdKdjlb
705 607 _db.BeginTran();
706 608  
707 609 //更新开单记录表记录
708   - await _db.Updateable(entity)
709   - .IgnoreColumns(ignoreAllNullColumns: true)
710   - .ExecuteCommandAsync();
  610 + await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
711 611  
712 612 //清空原有数据
713   - await _db.Deleteable<LqKdJksyjEntity>()
714   - .Where(u => u.Glkdbh == id)
715   - .ExecuteCommandAsync();
716   - await _db.Deleteable<LqKdKjbsyjEntity>()
717   - .Where(u => u.Glkdbh == id)
718   - .ExecuteCommandAsync();
719   - await _db.Deleteable<LqKdPxmxEntity>()
720   - .Where(u => u.Glkdbh == id)
721   - .ExecuteCommandAsync();
  613 + await _db.Deleteable<LqKdJksyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync();
  614 + await _db.Deleteable<LqKdKjbsyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync();
  615 + await _db.Deleteable<LqKdPxmxEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync();
722 616  
723 617 // 收集所有需要插入的实体,然后批量插入
724 618 var allPxmxEntities = new List<LqKdPxmxEntity>();
... ... @@ -835,24 +729,16 @@ namespace NCC.Extend.LqKdKdjlb
835 729 _db.BeginTran();
836 730  
837 731 //删除开单记录表记录
838   - await _db.Deleteable<LqKdKdjlbEntity>()
839   - .Where(d => d.Id == id)
840   - .ExecuteCommandAsync();
  732 + await _db.Deleteable<LqKdKdjlbEntity>().Where(d => d.Id == id).ExecuteCommandAsync();
841 733  
842 734 //清空子表数据
843   - await _db.Deleteable<LqKdJksyjEntity>()
844   - .Where(u => u.Glkdbh == id)
845   - .ExecuteCommandAsync();
  735 + await _db.Deleteable<LqKdJksyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync();
846 736  
847 737 //清空子表数据
848   - await _db.Deleteable<LqKdKjbsyjEntity>()
849   - .Where(u => u.Glkdbh == id)
850   - .ExecuteCommandAsync();
  738 + await _db.Deleteable<LqKdKjbsyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync();
851 739  
852 740 //清空子表数据
853   - await _db.Deleteable<LqKdPxmxEntity>()
854   - .Where(u => u.Glkdbh == id)
855   - .ExecuteCommandAsync();
  741 + await _db.Deleteable<LqKdPxmxEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync();
856 742  
857 743 //关闭事务
858 744 _db.CommitTran();
... ...
netcore/src/Modularity/Extend/NCC.Extend/LqKhxxService.cs
1   -using NCC.Common.Core.Manager;
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Threading.Tasks;
  5 +using Mapster;
  6 +using Microsoft.AspNetCore.Mvc;
  7 +using Microsoft.Extensions.Logging;
  8 +using NCC.ClayObject;
  9 +using NCC.Common.Configuration;
  10 +using NCC.Common.Core.Manager;
2 11 using NCC.Common.Enum;
3 12 using NCC.Common.Extension;
4 13 using NCC.Common.Filter;
  14 +using NCC.Common.Helper;
  15 +using NCC.Common.Model.NPOI;
  16 +using NCC.DataEncryption;
5 17 using NCC.Dependency;
6 18 using NCC.DynamicApiController;
7   -using NCC.FriendlyException;
8   -using NCC.Extend.Interfaces.LqKhxx;
9   -using Mapster;
10   -using Microsoft.AspNetCore.Mvc;
11   -using SqlSugar;
12   -using System;
13   -using System.Collections.Generic;
14   -using System.Linq;
15   -using System.Threading.Tasks;
16   -using NCC.Extend.Entitys.lq_khxx;
17 19 using NCC.Extend.Entitys.Dto.LqKhxx;
  20 +using NCC.Extend.Entitys.Dto.LqXhHyhk;
  21 +using NCC.Extend.Entitys.lq_hytk_hytk;
  22 +using NCC.Extend.Entitys.lq_hytk_mx;
18 23 using NCC.Extend.Entitys.lq_kd_kdjlb;
19 24 using NCC.Extend.Entitys.lq_kd_pxmx;
  25 +using NCC.Extend.Entitys.lq_khxx;
20 26 using NCC.Extend.Entitys.lq_xh_hyhk;
21 27 using NCC.Extend.Entitys.lq_xh_pxmx;
22   -using NCC.Extend.Entitys.lq_hytk_hytk;
23   -using NCC.Extend.Entitys.lq_hytk_mx;
24   -using Yitter.IdGenerator;
25   -using NCC.Common.Helper;
  28 +using NCC.Extend.Interfaces.LqKhxx;
  29 +using NCC.FriendlyException;
26 30 using NCC.JsonSerialization;
27   -using NCC.Common.Model.NPOI;
28   -using NCC.Common.Configuration;
29   -using NCC.DataEncryption;
30   -using NCC.ClayObject;
31   -using Microsoft.Extensions.Logging;
32   -using NCC.Extend.Entitys.Dto.LqXhHyhk;
  31 +using SqlSugar;
  32 +using Yitter.IdGenerator;
33 33  
34 34 namespace NCC.Extend.LqKhxx
35 35 {
... ... @@ -55,7 +55,7 @@ namespace NCC.Extend.LqKhxx
55 55 _userManager = userManager;
56 56 _logger = logger;
57 57 }
58   -
  58 +
59 59 #region 客户资料
60 60 /// <summary>
61 61 /// 获取客户资料
... ... @@ -70,7 +70,7 @@ namespace NCC.Extend.LqKhxx
70 70 return output;
71 71 }
72 72 #endregion
73   -
  73 +
74 74 #region 客户资料列表
75 75 /// <summary>
76 76 /// 获取客户资料列表
... ... @@ -81,24 +81,6 @@ namespace NCC.Extend.LqKhxx
81 81 public async Task<dynamic> GetList([FromQuery] LqKhxxListQueryInput input)
82 82 {
83 83 var sidx = input.sidx == null ? "id" : input.sidx;
84   - List<string> queryZjdlsj = input.zjdlsj != null ? input.zjdlsj.Split(',').ToObeject<List<string>>() : null;
85   - DateTime? startZjdlsj = queryZjdlsj != null ? Ext.GetDateTime(queryZjdlsj.First()) : null;
86   - DateTime? endZjdlsj = queryZjdlsj != null ? Ext.GetDateTime(queryZjdlsj.Last()) : null;
87   - List<string> queryZcsj = input.zcsj != null ? input.zcsj.Split(',').ToObeject<List<string>>() : null;
88   - DateTime? startZcsj = queryZcsj != null ? Ext.GetDateTime(queryZcsj.First()) : null;
89   - DateTime? endZcsj = queryZcsj != null ? Ext.GetDateTime(queryZcsj.Last()) : null;
90   - List<string> queryScdd = input.scdd != null ? input.scdd.Split(',').ToObeject<List<string>>() : null;
91   - DateTime? startScdd = queryScdd != null ? Ext.GetDateTime(queryScdd.First()) : null;
92   - DateTime? endScdd = queryScdd != null ? Ext.GetDateTime(queryScdd.Last()) : null;
93   - List<string> queryZjdd = input.zjdd != null ? input.zjdd.Split(',').ToObeject<List<string>>() : null;
94   - DateTime? startZjdd = queryZjdd != null ? Ext.GetDateTime(queryZjdd.First()) : null;
95   - DateTime? endZjdd = queryZjdd != null ? Ext.GetDateTime(queryZjdd.Last()) : null;
96   - List<string> queryYanglsr = input.yanglsr != null ? input.yanglsr.Split(',').ToObeject<List<string>>() : null;
97   - DateTime? startYanglsr = queryYanglsr != null ? Ext.GetDateTime(queryYanglsr.First()) : null;
98   - DateTime? endYanglsr = queryYanglsr != null ? Ext.GetDateTime(queryYanglsr.Last()) : null;
99   - List<string> queryYinlsr = input.yinlsr != null ? input.yinlsr.Split(',').ToObeject<List<string>>() : null;
100   - DateTime? startYinlsr = queryYinlsr != null ? Ext.GetDateTime(queryYinlsr.First()) : null;
101   - DateTime? endYinlsr = queryYinlsr != null ? Ext.GetDateTime(queryYinlsr.Last()) : null;
102 84 var data = await _db.Queryable<LqKhxxEntity>()
103 85 .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
104 86 .WhereIF(!string.IsNullOrEmpty(input.khmc), p => p.Khmc.Contains(input.khmc))
... ... @@ -108,12 +90,8 @@ namespace NCC.Extend.LqKhxx
108 90 .WhereIF(!string.IsNullOrEmpty(input.gzhzt), p => p.Gzhzt.Equals(input.gzhzt))
109 91 .WhereIF(!string.IsNullOrEmpty(input.wxnc), p => p.Wxnc.Contains(input.wxnc))
110 92 .WhereIF(!string.IsNullOrEmpty(input.wxxcxzt), p => p.Wxxcxzt.Equals(input.wxxcxzt))
111   - // .WhereIF(queryZjdlsj != null, p => p.Zjdlsj >= new DateTime(startZjdlsj.ToDate().Year, startZjdlsj.ToDate().Month, startZjdlsj.ToDate().Day, 0, 0, 0))
112   - // .WhereIF(queryZjdlsj != null, p => p.Zjdlsj <= new DateTime(endZjdlsj.ToDate().Year, endZjdlsj.ToDate().Month, endZjdlsj.ToDate().Day, 23, 59, 59))
113 93 .WhereIF(!string.IsNullOrEmpty(input.khmqgs), p => p.Khmqgs.Equals(input.khmqgs))
114 94 .WhereIF(!string.IsNullOrEmpty(input.gsmd), p => p.Gsmd.Contains(input.gsmd))
115   - .WhereIF(queryZcsj != null, p => p.Zcsj >= new DateTime(startZcsj.ToDate().Year, startZcsj.ToDate().Month, startZcsj.ToDate().Day, 0, 0, 0))
116   - .WhereIF(queryZcsj != null, p => p.Zcsj <= new DateTime(endZcsj.ToDate().Year, endZcsj.ToDate().Month, endZcsj.ToDate().Day, 23, 59, 59))
117 95 .WhereIF(!string.IsNullOrEmpty(input.khlx), p => p.Khlx.Equals(input.khlx))
118 96 .WhereIF(!string.IsNullOrEmpty(input.khjd), p => p.Khjd.Equals(input.khjd))
119 97 .WhereIF(!string.IsNullOrEmpty(input.khxf), p => p.Khxf.Contains(input.khxf))
... ... @@ -124,31 +102,7 @@ namespace NCC.Extend.LqKhxx
124 102 .WhereIF(!string.IsNullOrEmpty(input.jdqd), p => p.Jdqd.Contains(input.jdqd))
125 103 .WhereIF(!string.IsNullOrEmpty(input.lxdz), p => p.Lxdz.Contains(input.lxdz))
126 104 .WhereIF(!string.IsNullOrEmpty(input.bz), p => p.Bz.Contains(input.bz))
127   - .WhereIF(queryScdd != null, p => p.Scdd >= new DateTime(startScdd.ToDate().Year, startScdd.ToDate().Month, startScdd.ToDate().Day, 0, 0, 0))
128   - .WhereIF(queryScdd != null, p => p.Scdd <= new DateTime(endScdd.ToDate().Year, endScdd.ToDate().Month, endScdd.ToDate().Day, 23, 59, 59))
129   - // .WhereIF(queryZjdd != null, p => p.Zjdd >= new DateTime(startZjdd.ToDate().Year, startZjdd.ToDate().Month, startZjdd.ToDate().Day, 0, 0, 0))
130   - // .WhereIF(queryZjdd != null, p => p.Zjdd <= new DateTime(endZjdd.ToDate().Year, endZjdd.ToDate().Month, endZjdd.ToDate().Day, 23, 59, 59))
131   - .WhereIF(!string.IsNullOrEmpty(input.wddts), p => p.Wddts.Contains(input.wddts))
132   - .WhereIF(queryYanglsr != null, p => p.Yanglsr >= new DateTime(startYanglsr.ToDate().Year, startYanglsr.ToDate().Month, startYanglsr.ToDate().Day, 0, 0, 0))
133   - .WhereIF(queryYanglsr != null, p => p.Yanglsr <= new DateTime(endYanglsr.ToDate().Year, endYanglsr.ToDate().Month, endYanglsr.ToDate().Day, 23, 59, 59))
134   - .WhereIF(queryYinlsr != null, p => p.Yinlsr >= new DateTime(startYinlsr.ToDate().Year, startYinlsr.ToDate().Month, startYinlsr.ToDate().Day, 0, 0, 0))
135   - .WhereIF(queryYinlsr != null, p => p.Yinlsr <= new DateTime(endYinlsr.ToDate().Year, endYinlsr.ToDate().Month, endYinlsr.ToDate().Day, 23, 59, 59))
136 105 .WhereIF(!string.IsNullOrEmpty(input.ml), p => p.Ml.Contains(input.ml))
137   - .WhereIF(!string.IsNullOrEmpty(input.zjycfwry), p => p.Zjycfwry.Contains(input.zjycfwry))
138   - .WhereIF(!string.IsNullOrEmpty(input.qjddpc), p => p.Qjddpc.Contains(input.qjddpc))
139   - .WhereIF(!string.IsNullOrEmpty(input.qjfwdc), p => p.Qjfwdc.Contains(input.qjfwdc))
140   - .WhereIF(!string.IsNullOrEmpty(input.qjxjxf), p => p.Qjxjxf.Contains(input.qjxjxf))
141   - .WhereIF(!string.IsNullOrEmpty(input.qjxmhk), p => p.Qjxmhk.Contains(input.qjxmhk))
142   - .WhereIF(!string.IsNullOrEmpty(input.qjczxh), p => p.Qjczxh.Contains(input.qjczxh))
143   - .WhereIF(!string.IsNullOrEmpty(input.sycz), p => p.Sycz.Equals(input.sycz))
144   - .WhereIF(!string.IsNullOrEmpty(input.syjf), p => p.Syjf.Equals(input.syjf))
145   - .WhereIF(!string.IsNullOrEmpty(input.sypxje), p => p.Sypxje.Equals(input.sypxje))
146   - .WhereIF(!string.IsNullOrEmpty(input.sytcje), p => p.Sytcje.Equals(input.sytcje))
147   - .WhereIF(!string.IsNullOrEmpty(input.ljxmhkje), p => p.Ljxmhkje.Equals(input.ljxmhkje))
148   - .WhereIF(!string.IsNullOrEmpty(input.ljczxh), p => p.Ljczxh.Equals(input.ljczxh))
149   - .WhereIF(!string.IsNullOrEmpty(input.ljxfcs), p => p.Ljxfcs.Equals(input.ljxfcs))
150   - .WhereIF(!string.IsNullOrEmpty(input.ljfwcs), p => p.Ljfwcs.Equals(input.ljfwcs))
151   - .WhereIF(!string.IsNullOrEmpty(input.ljxjxfje), p => p.Ljxjxfje.Equals(input.ljxjxfje))
152 106 .Select(it => new LqKhxxListOutput
153 107 {
154 108 id = it.Id,
... ... @@ -173,32 +127,17 @@ namespace NCC.Extend.LqKhxx
173 127 jdqd = it.Jdqd,
174 128 lxdz = it.Lxdz,
175 129 bz = it.Bz,
176   - scdd = it.Scdd,
177   - zjdd = it.Zjdd,
178   - wddts = it.Wddts,
179 130 yanglsr = it.Yanglsr,
180 131 yinlsr = it.Yinlsr,
181 132 ml = it.Ml,
182   - zjycfwry = it.Zjycfwry,
183   - qjddpc = it.Qjddpc,
184   - qjfwdc = it.Qjfwdc,
185   - qjxjxf = it.Qjxjxf,
186   - qjxmhk = it.Qjxmhk,
187   - qjczxh = it.Qjczxh,
188   - sycz = it.Sycz,
189   - syjf = it.Syjf,
190   - sypxje = it.Sypxje,
191   - sytcje = it.Sytcje,
192   - ljxmhkje = it.Ljxmhkje,
193   - ljczxh = it.Ljczxh,
194   - ljxfcs = it.Ljxfcs,
195   - ljfwcs = it.Ljfwcs,
196   - ljxjxfje = it.Ljxjxfje,
197   - }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
  133 + })
  134 + .MergeTable()
  135 + .OrderBy(sidx + " " + input.sort)
  136 + .ToPagedListAsync(input.currentPage, input.pageSize);
198 137 return PageResult<LqKhxxListOutput>.SqlSugarPageResult(data);
199 138 }
200 139 #endregion
201   -
  140 +
202 141 #region 新建客户资料
203 142 /// <summary>
204 143 /// 新建客户资料
... ... @@ -212,10 +151,11 @@ namespace NCC.Extend.LqKhxx
212 151 var entity = input.Adapt<LqKhxxEntity>();
213 152 entity.Id = YitIdHelper.NextId().ToString();
214 153 var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
215   - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
  154 + if (!(isOk > 0))
  155 + throw NCCException.Oh(ErrorCode.COM1000);
216 156 }
217 157 #endregion
218   -
  158 +
219 159 #region 获取客户资料无分页列表
220 160 /// <summary>
221 161 /// 获取客户资料无分页列表
... ... @@ -232,12 +172,6 @@ namespace NCC.Extend.LqKhxx
232 172 List<string> queryZcsj = input.zcsj != null ? input.zcsj.Split(',').ToObeject<List<string>>() : null;
233 173 DateTime? startZcsj = queryZcsj != null ? Ext.GetDateTime(queryZcsj.First()) : null;
234 174 DateTime? endZcsj = queryZcsj != null ? Ext.GetDateTime(queryZcsj.Last()) : null;
235   - List<string> queryScdd = input.scdd != null ? input.scdd.Split(',').ToObeject<List<string>>() : null;
236   - DateTime? startScdd = queryScdd != null ? Ext.GetDateTime(queryScdd.First()) : null;
237   - DateTime? endScdd = queryScdd != null ? Ext.GetDateTime(queryScdd.Last()) : null;
238   - List<string> queryZjdd = input.zjdd != null ? input.zjdd.Split(',').ToObeject<List<string>>() : null;
239   - DateTime? startZjdd = queryZjdd != null ? Ext.GetDateTime(queryZjdd.First()) : null;
240   - DateTime? endZjdd = queryZjdd != null ? Ext.GetDateTime(queryZjdd.Last()) : null;
241 175 List<string> queryYanglsr = input.yanglsr != null ? input.yanglsr.Split(',').ToObeject<List<string>>() : null;
242 176 DateTime? startYanglsr = queryYanglsr != null ? Ext.GetDateTime(queryYanglsr.First()) : null;
243 177 DateTime? endYanglsr = queryYanglsr != null ? Ext.GetDateTime(queryYanglsr.Last()) : null;
... ... @@ -269,31 +203,11 @@ namespace NCC.Extend.LqKhxx
269 203 .WhereIF(!string.IsNullOrEmpty(input.jdqd), p => p.Jdqd.Contains(input.jdqd))
270 204 .WhereIF(!string.IsNullOrEmpty(input.lxdz), p => p.Lxdz.Contains(input.lxdz))
271 205 .WhereIF(!string.IsNullOrEmpty(input.bz), p => p.Bz.Contains(input.bz))
272   - .WhereIF(queryScdd != null, p => p.Scdd >= new DateTime(startScdd.ToDate().Year, startScdd.ToDate().Month, startScdd.ToDate().Day, 0, 0, 0))
273   - // .WhereIF(queryScdd != null, p => p.Scdd <= new DateTime(endScdd.ToDate().Year, endScdd.ToDate().Month, endScdd.ToDate().Day, 23, 59, 59))
274   - // .WhereIF(queryZjdd != null, p => p.Zjdd >= new DateTime(startZjdd.ToDate().Year, startZjdd.ToDate().Month, startZjdd.ToDate().Day, 0, 0, 0))
275   - // .WhereIF(queryZjdd != null, p => p.Zjdd <= new DateTime(endZjdd.ToDate().Year, endZjdd.ToDate().Month, endZjdd.ToDate().Day, 23, 59, 59))
276   - .WhereIF(!string.IsNullOrEmpty(input.wddts), p => p.Wddts.Contains(input.wddts))
277 206 .WhereIF(queryYanglsr != null, p => p.Yanglsr >= new DateTime(startYanglsr.ToDate().Year, startYanglsr.ToDate().Month, startYanglsr.ToDate().Day, 0, 0, 0))
278 207 .WhereIF(queryYanglsr != null, p => p.Yanglsr <= new DateTime(endYanglsr.ToDate().Year, endYanglsr.ToDate().Month, endYanglsr.ToDate().Day, 23, 59, 59))
279 208 .WhereIF(queryYinlsr != null, p => p.Yinlsr >= new DateTime(startYinlsr.ToDate().Year, startYinlsr.ToDate().Month, startYinlsr.ToDate().Day, 0, 0, 0))
280 209 .WhereIF(queryYinlsr != null, p => p.Yinlsr <= new DateTime(endYinlsr.ToDate().Year, endYinlsr.ToDate().Month, endYinlsr.ToDate().Day, 23, 59, 59))
281 210 .WhereIF(!string.IsNullOrEmpty(input.ml), p => p.Ml.Contains(input.ml))
282   - .WhereIF(!string.IsNullOrEmpty(input.zjycfwry), p => p.Zjycfwry.Contains(input.zjycfwry))
283   - .WhereIF(!string.IsNullOrEmpty(input.qjddpc), p => p.Qjddpc.Contains(input.qjddpc))
284   - .WhereIF(!string.IsNullOrEmpty(input.qjfwdc), p => p.Qjfwdc.Contains(input.qjfwdc))
285   - .WhereIF(!string.IsNullOrEmpty(input.qjxjxf), p => p.Qjxjxf.Contains(input.qjxjxf))
286   - .WhereIF(!string.IsNullOrEmpty(input.qjxmhk), p => p.Qjxmhk.Contains(input.qjxmhk))
287   - .WhereIF(!string.IsNullOrEmpty(input.qjczxh), p => p.Qjczxh.Contains(input.qjczxh))
288   - .WhereIF(!string.IsNullOrEmpty(input.sycz), p => p.Sycz.Equals(input.sycz))
289   - .WhereIF(!string.IsNullOrEmpty(input.syjf), p => p.Syjf.Equals(input.syjf))
290   - .WhereIF(!string.IsNullOrEmpty(input.sypxje), p => p.Sypxje.Equals(input.sypxje))
291   - .WhereIF(!string.IsNullOrEmpty(input.sytcje), p => p.Sytcje.Equals(input.sytcje))
292   - .WhereIF(!string.IsNullOrEmpty(input.ljxmhkje), p => p.Ljxmhkje.Equals(input.ljxmhkje))
293   - .WhereIF(!string.IsNullOrEmpty(input.ljczxh), p => p.Ljczxh.Equals(input.ljczxh))
294   - .WhereIF(!string.IsNullOrEmpty(input.ljxfcs), p => p.Ljxfcs.Equals(input.ljxfcs))
295   - .WhereIF(!string.IsNullOrEmpty(input.ljfwcs), p => p.Ljfwcs.Equals(input.ljfwcs))
296   - .WhereIF(!string.IsNullOrEmpty(input.ljxjxfje), p => p.Ljxjxfje.Equals(input.ljxjxfje))
297 211 .Select(it => new LqKhxxListOutput
298 212 {
299 213 id = it.Id,
... ... @@ -318,33 +232,18 @@ namespace NCC.Extend.LqKhxx
318 232 jdqd = it.Jdqd,
319 233 lxdz = it.Lxdz,
320 234 bz = it.Bz,
321   - scdd = it.Scdd,
322   - zjdd = it.Zjdd,
323   - wddts = it.Wddts,
324 235 yanglsr = it.Yanglsr,
325 236 yinlsr = it.Yinlsr,
326 237 ml = it.Ml,
327   - zjycfwry = it.Zjycfwry,
328   - qjddpc = it.Qjddpc,
329   - qjfwdc = it.Qjfwdc,
330   - qjxjxf = it.Qjxjxf,
331   - qjxmhk = it.Qjxmhk,
332   - qjczxh = it.Qjczxh,
333   - sycz = it.Sycz,
334   - syjf = it.Syjf,
335   - sypxje = it.Sypxje,
336   - sytcje = it.Sytcje,
337   - ljxmhkje = it.Ljxmhkje,
338   - ljczxh = it.Ljczxh,
339   - ljxfcs = it.Ljxfcs,
340   - ljfwcs = it.Ljfwcs,
341   - ljxjxfje = it.Ljxjxfje,
342   - }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync();
  238 + })
  239 + .MergeTable()
  240 + .OrderBy(sidx + " " + input.sort)
  241 + .ToListAsync();
343 242 return data;
344 243 }
345 244 #endregion
346   -
347   - #region 导出客户资料
  245 +
  246 + #region 导出客户资料
348 247 /// <summary>
349 248 /// 导出客户资料
350 249 /// </summary>
... ... @@ -364,7 +263,8 @@ namespace NCC.Extend.LqKhxx
364 263 {
365 264 exportData = await this.GetNoPagingList(input);
366 265 }
367   - List<ParamsModel> paramList = "[{\"value\":\"客户编码\",\"field\":\"id\"},{\"value\":\"客户名称\",\"field\":\"khmc\"},{\"value\":\"手机号\",\"field\":\"sjh\"},{\"value\":\"档案号\",\"field\":\"dah\"},{\"value\":\"性别\",\"field\":\"xb\"},{\"value\":\"公众号状态\",\"field\":\"gzhzt\"},{\"value\":\"微信昵称\",\"field\":\"wxnc\"},{\"value\":\"小程序状态\",\"field\":\"wxxcxzt\"},{\"value\":\"最近登录时间\",\"field\":\"zjdlsj\"},{\"value\":\"客户目前归属\",\"field\":\"khmqgs\"},{\"value\":\"归属门店\",\"field\":\"gsmd\"},{\"value\":\"注册时间\",\"field\":\"zcsj\"},{\"value\":\"客户类型\",\"field\":\"khlx\"},{\"value\":\"客户阶段\",\"field\":\"khjd\"},{\"value\":\"客户消费\",\"field\":\"khxf\"},{\"value\":\"消费频次\",\"field\":\"xfpc\"},{\"value\":\"推荐人\",\"field\":\"tjr\"},{\"value\":\"负责顾问\",\"field\":\"fzgw\"},{\"value\":\"美容师\",\"field\":\"mrs\"},{\"value\":\"进店渠道\",\"field\":\"jdqd\"},{\"value\":\"联系地址\",\"field\":\"lxdz\"},{\"value\":\"备注\",\"field\":\"bz\"},{\"value\":\"首次到店\",\"field\":\"scdd\"},{\"value\":\"最近到店\",\"field\":\"zjdd\"},{\"value\":\"未到店天数\",\"field\":\"wddts\"},{\"value\":\"阳历生日\",\"field\":\"yanglsr\"},{\"value\":\"阴历生日\",\"field\":\"yinlsr\"},{\"value\":\"年龄\",\"field\":\"ml\"},{\"value\":\"最近服务人员\",\"field\":\"zjycfwry\"},{\"value\":\"期间到店频次\",\"field\":\"qjddpc\"},{\"value\":\"期间服务单次\",\"field\":\"qjfwdc\"},{\"value\":\"期间现金消费\",\"field\":\"qjxjxf\"},{\"value\":\"期间项目耗卡\",\"field\":\"qjxmhk\"},{\"value\":\"期间储值消耗\",\"field\":\"qjczxh\"},{\"value\":\"剩余储值\",\"field\":\"sycz\"},{\"value\":\"剩余积分\",\"field\":\"syjf\"},{\"value\":\"剩余品项金额\",\"field\":\"sypxje\"},{\"value\":\"剩余套餐金额\",\"field\":\"sytcje\"},{\"value\":\"项目耗卡金额\",\"field\":\"ljxmhkje\"},{\"value\":\"累计储值消耗\",\"field\":\"ljczxh\"},{\"value\":\"累计消费次数\",\"field\":\"ljxfcs\"},{\"value\":\"累计服务次数\",\"field\":\"ljfwcs\"},{\"value\":\"现金消费金额\",\"field\":\"ljxjxfje\"},]".ToList<ParamsModel>();
  266 + List<ParamsModel> paramList =
  267 + "[{\"value\":\"客户编码\",\"field\":\"id\"},{\"value\":\"客户名称\",\"field\":\"khmc\"},{\"value\":\"手机号\",\"field\":\"sjh\"},{\"value\":\"档案号\",\"field\":\"dah\"},{\"value\":\"性别\",\"field\":\"xb\"},{\"value\":\"公众号状态\",\"field\":\"gzhzt\"},{\"value\":\"微信昵称\",\"field\":\"wxnc\"},{\"value\":\"小程序状态\",\"field\":\"wxxcxzt\"},{\"value\":\"最近登录时间\",\"field\":\"zjdlsj\"},{\"value\":\"客户目前归属\",\"field\":\"khmqgs\"},{\"value\":\"归属门店\",\"field\":\"gsmd\"},{\"value\":\"注册时间\",\"field\":\"zcsj\"},{\"value\":\"客户类型\",\"field\":\"khlx\"},{\"value\":\"客户阶段\",\"field\":\"khjd\"},{\"value\":\"客户消费\",\"field\":\"khxf\"},{\"value\":\"消费频次\",\"field\":\"xfpc\"},{\"value\":\"推荐人\",\"field\":\"tjr\"},{\"value\":\"负责顾问\",\"field\":\"fzgw\"},{\"value\":\"美容师\",\"field\":\"mrs\"},{\"value\":\"进店渠道\",\"field\":\"jdqd\"},{\"value\":\"联系地址\",\"field\":\"lxdz\"},{\"value\":\"备注\",\"field\":\"bz\"},{\"value\":\"阳历生日\",\"field\":\"yanglsr\"},{\"value\":\"阴历生日\",\"field\":\"yinlsr\"},{\"value\":\"年龄\",\"field\":\"ml\"},]".ToList<ParamsModel>();
368 268 ExcelConfig excelconfig = new ExcelConfig();
369 269 excelconfig.FileName = "客户资料.xls";
370 270 excelconfig.HeadFont = "微软雅黑";
... ... @@ -383,15 +283,11 @@ namespace NCC.Extend.LqKhxx
383 283 var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName;
384 284 ExcelExportHelper<LqKhxxListOutput>.Export(exportData, excelconfig, addPath);
385 285 var fileName = _userManager.UserId + "|" + addPath + "|xls";
386   - var output = new
387   - {
388   - name = excelconfig.FileName,
389   - url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC")
390   - };
  286 + var output = new { name = excelconfig.FileName, url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") };
391 287 return output;
392 288 }
393 289 #endregion
394   -
  290 +
395 291 #region 批量删除客户资料
396 292 /// <summary>
397 293 /// 批量删除客户资料
... ... @@ -422,7 +318,7 @@ namespace NCC.Extend.LqKhxx
422 318 }
423 319 }
424 320 #endregion
425   -
  321 +
426 322 #region 更新客户资料
427 323 /// <summary>
428 324 /// 更新客户资料
... ... @@ -435,10 +331,11 @@ namespace NCC.Extend.LqKhxx
435 331 {
436 332 var entity = input.Adapt<LqKhxxEntity>();
437 333 var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
438   - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
  334 + if (!(isOk > 0))
  335 + throw NCCException.Oh(ErrorCode.COM1001);
439 336 }
440 337 #endregion
441   -
  338 +
442 339 #region 删除客户资料
443 340 /// <summary>
444 341 /// 删除客户资料
... ... @@ -450,7 +347,8 @@ namespace NCC.Extend.LqKhxx
450 347 var entity = await _db.Queryable<LqKhxxEntity>().FirstAsync(p => p.Id == id);
451 348 _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
452 349 var isOk = await _db.Deleteable<LqKhxxEntity>().Where(d => d.Id == id).ExecuteCommandAsync();
453   - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002);
  350 + if (!(isOk > 0))
  351 + throw NCCException.Oh(ErrorCode.COM1002);
454 352 }
455 353 #endregion
456 354  
... ... @@ -462,15 +360,15 @@ namespace NCC.Extend.LqKhxx
462 360 /// 根据会员ID查询该会员的剩余品项信息,包括已购买但未消费完的品项详情
463 361 /// 支持按来源类型(F_SourceType)区分相同品项的不同来源,确保数据准确分组
464 362 /// 计算逻辑:剩余数量 = 购买数量 - 消费数量 - 退卡数量
465   - ///
  363 + ///
466 364 /// 示例请求:
467 365 /// ```json
468 366 /// GET /api/Extend/LqKhxx/GetMemberRemainingItems?memberId=GK2025022100004
469 367 /// ```
470   - ///
  368 + ///
471 369 /// 参数说明:
472 370 /// - memberId: 会员ID,必填参数
473   - ///
  371 + ///
474 372 /// 返回数据结构:
475 373 /// - MemberId: 会员ID
476 374 /// - MemberName: 会员姓名
... ... @@ -483,7 +381,7 @@ namespace NCC.Extend.LqKhxx
483 381 /// - ConsumedCount: 已消费数量
484 382 /// - RefundedCount: 已退卡数量
485 383 /// - RemainingCount: 剩余数量
486   - ///
  384 + ///
487 385 /// 特殊说明:
488 386 /// - 相同品项但不同SourceType的记录会分开显示
489 387 /// - 耗卡和退卡统计会按品项ID和SourceType精确匹配
... ... @@ -508,9 +406,7 @@ namespace NCC.Extend.LqKhxx
508 406 _logger.LogInformation("开始查询会员剩余品项,会员ID:{MemberId}", memberId);
509 407  
510 408 // 1. 查询会员基本信息
511   - var memberInfo = await _db.Queryable<LqKhxxEntity>()
512   - .Where(x => x.Id == memberId)
513   - .FirstAsync();
  409 + var memberInfo = await _db.Queryable<LqKhxxEntity>().Where(x => x.Id == memberId).FirstAsync();
514 410  
515 411 if (memberInfo == null)
516 412 {
... ... @@ -522,10 +418,7 @@ namespace NCC.Extend.LqKhxx
522 418  
523 419 // 2. 查询开单记录ID列表
524 420 _logger.LogInformation("开始查询开单记录ID列表");
525   - var orderIds = await _db.Queryable<LqKdKdjlbEntity>()
526   - .Where(kd => kd.Kdhy == memberId)
527   - .Select(kd => kd.Id)
528   - .ToListAsync();
  421 + var orderIds = await _db.Queryable<LqKdKdjlbEntity>().Where(kd => kd.Kdhy == memberId).Select(kd => kd.Id).ToListAsync();
529 422  
530 423 _logger.LogInformation("开单记录ID列表查询成功,数量:{Count}", orderIds.Count);
531 424  
... ... @@ -536,20 +429,26 @@ namespace NCC.Extend.LqKhxx
536 429 {
537 430 var tempPurchasedItems = await _db.Queryable<LqKdPxmxEntity>()
538 431 .Where(px => orderIds.Contains(px.Glkdbh))
539   - .GroupBy(px => new { px.Px, px.Pxmc, px.Pxjg, px.SourceType })
  432 + .GroupBy(px => new
  433 + {
  434 + px.Px,
  435 + px.Pxmc,
  436 + px.Pxjg,
  437 + px.SourceType,
  438 + })
540 439 .Select(px => new
541 440 {
542 441 ItemId = px.Px,
543 442 ItemName = px.Pxmc,
544 443 ItemPrice = px.Pxjg,
545 444 SourceType = SqlFunc.IsNull(px.SourceType, "未知"),
546   - TotalPurchased = SqlFunc.AggregateSum(SqlFunc.ToDecimal(px.ProjectNumber))
  445 + TotalPurchased = SqlFunc.AggregateSum(SqlFunc.ToDecimal(px.ProjectNumber)),
547 446 })
548 447 .ToListAsync();
549 448  
550 449 purchasedItems = tempPurchasedItems.Cast<dynamic>().ToList();
551 450 _logger.LogInformation("开单品项统计查询成功,数量:{Count}", purchasedItems.Count);
552   -
  451 +
553 452 // 调试:输出前几条记录查看SourceType字段
554 453 foreach (var item in purchasedItems.Take(3))
555 454 {
... ... @@ -559,10 +458,7 @@ namespace NCC.Extend.LqKhxx
559 458  
560 459 // 4. 查询耗卡记录ID列表
561 460 _logger.LogInformation("开始查询耗卡记录ID列表");
562   - var consumeIds = await _db.Queryable<LqXhHyhkEntity>()
563   - .Where(hk => hk.Hy == memberId)
564   - .Select(hk => hk.Id)
565   - .ToListAsync();
  461 + var consumeIds = await _db.Queryable<LqXhHyhkEntity>().Where(hk => hk.Hy == memberId).Select(hk => hk.Id).ToListAsync();
566 462  
567 463 _logger.LogInformation("耗卡记录ID列表查询成功,数量:{Count}", consumeIds.Count);
568 464  
... ... @@ -578,7 +474,7 @@ namespace NCC.Extend.LqKhxx
578 474 {
579 475 ItemId = px.Px,
580 476 SourceType = SqlFunc.IsNull(px.SourceType, "未知"),
581   - ConsumedCount = SqlFunc.AggregateSum(SqlFunc.ToDecimal(px.ProjectNumber))
  477 + ConsumedCount = SqlFunc.AggregateSum(SqlFunc.ToDecimal(px.ProjectNumber)),
582 478 })
583 479 .ToListAsync();
584 480  
... ... @@ -588,10 +484,7 @@ namespace NCC.Extend.LqKhxx
588 484  
589 485 // 6. 查询退卡记录ID列表
590 486 _logger.LogInformation("开始查询退卡记录ID列表");
591   - var refundIds = await _db.Queryable<LqHytkHytkEntity>()
592   - .Where(tk => tk.Hy == memberId && tk.F_DeleteMark != 1)
593   - .Select(tk => tk.Id)
594   - .ToListAsync();
  487 + var refundIds = await _db.Queryable<LqHytkHytkEntity>().Where(tk => tk.Hy == memberId && tk.F_DeleteMark != 1).Select(tk => tk.Id).ToListAsync();
595 488  
596 489 _logger.LogInformation("退卡记录ID列表查询成功,数量:{Count}", refundIds.Count);
597 490  
... ... @@ -607,7 +500,7 @@ namespace NCC.Extend.LqKhxx
607 500 {
608 501 ItemId = px.Px,
609 502 SourceType = SqlFunc.IsNull(px.F_SourceType, "未知"),
610   - RefundedCount = SqlFunc.AggregateSum(SqlFunc.ToDecimal(px.F_ProjectNumber))
  503 + RefundedCount = SqlFunc.AggregateSum(SqlFunc.ToDecimal(px.F_ProjectNumber)),
611 504 })
612 505 .ToListAsync();
613 506  
... ... @@ -623,15 +516,11 @@ namespace NCC.Extend.LqKhxx
623 516 foreach (var purchased in purchasedItems)
624 517 {
625 518 // 按品项ID和来源类型匹配耗卡记录
626   - var consumed = consumedItems.FirstOrDefault(x =>
627   - x.ItemId == purchased.ItemId &&
628   - x.SourceType == purchased.SourceType);
  519 + var consumed = consumedItems.FirstOrDefault(x => x.ItemId == purchased.ItemId && x.SourceType == purchased.SourceType);
629 520 var consumedCount = consumed?.ConsumedCount ?? 0;
630 521  
631 522 // 按品项ID和来源类型匹配退卡记录
632   - var refunded = refundedItems.FirstOrDefault(x =>
633   - x.ItemId == purchased.ItemId &&
634   - x.SourceType == purchased.SourceType);
  523 + var refunded = refundedItems.FirstOrDefault(x => x.ItemId == purchased.ItemId && x.SourceType == purchased.SourceType);
635 524 var refundedCount = refunded?.RefundedCount ?? 0;
636 525  
637 526 // 计算剩余数量:购买数量 - 消费数量 - 退卡数量
... ... @@ -639,17 +528,19 @@ namespace NCC.Extend.LqKhxx
639 528  
640 529 if (remainingCount > 0)
641 530 {
642   - remainingItems.Add(new RemainingItemInfo
643   - {
644   - ItemId = purchased.ItemId,
645   - ItemName = purchased.ItemName,
646   - ItemPrice = purchased.ItemPrice,
647   - SourceType = purchased.SourceType?.ToString() ?? "未知",
648   - TotalPurchased = purchased.TotalPurchased,
649   - ConsumedCount = consumedCount,
650   - RefundedCount = refundedCount,
651   - RemainingCount = remainingCount
652   - });
  531 + remainingItems.Add(
  532 + new RemainingItemInfo
  533 + {
  534 + ItemId = purchased.ItemId,
  535 + ItemName = purchased.ItemName,
  536 + ItemPrice = purchased.ItemPrice,
  537 + SourceType = purchased.SourceType?.ToString() ?? "未知",
  538 + TotalPurchased = purchased.TotalPurchased,
  539 + ConsumedCount = consumedCount,
  540 + RefundedCount = refundedCount,
  541 + RemainingCount = remainingCount,
  542 + }
  543 + );
653 544 }
654 545 }
655 546  
... ... @@ -662,7 +553,7 @@ namespace NCC.Extend.LqKhxx
662 553 {
663 554 MemberId = memberId,
664 555 MemberName = memberInfo.Khmc,
665   - RemainingItems = remainingItems
  556 + RemainingItems = remainingItems,
666 557 };
667 558 }
668 559 catch (Exception ex)
... ...
netcore/src/Modularity/Extend/NCC.Extend/LqTkjlbService.cs
... ... @@ -62,6 +62,7 @@ namespace NCC.Extend.LqTkjlb
62 62 return output;
63 63 }
64 64 #endregion
  65 +
65 66 #region 获取拓客管理列表
66 67  
67 68 /// <summary>
... ... @@ -111,6 +112,7 @@ namespace NCC.Extend.LqTkjlb
111 112 return PageResult<LqTkjlbListOutput>.SqlSugarPageResult(data);
112 113 }
113 114 #endregion
  115 +
114 116 #region 新建拓客管理
115 117 /// <summary>
116 118 /// 新建拓客管理
... ... @@ -136,6 +138,7 @@ namespace NCC.Extend.LqTkjlb
136 138 throw NCCException.Oh(ErrorCode.COM1000);
137 139 }
138 140 #endregion
  141 +
139 142 #region 获取拓客管理无分页列表
140 143 /// <summary>
141 144 /// 获取拓客管理无分页列表
... ... @@ -182,6 +185,7 @@ namespace NCC.Extend.LqTkjlb
182 185 return data;
183 186 }
184 187 #endregion
  188 +
185 189 #region 导出拓客管理
186 190 /// <summary>
187 191 /// 导出拓客管理
... ... @@ -226,6 +230,7 @@ namespace NCC.Extend.LqTkjlb
226 230 return output;
227 231 }
228 232 #endregion
  233 +
229 234 #region 批量删除拓客管理
230 235  
231 236 /// <summary>
... ... @@ -257,6 +262,7 @@ namespace NCC.Extend.LqTkjlb
257 262 }
258 263 }
259 264 #endregion
  265 +
260 266 #region 更新拓客管理
261 267 /// <summary>
262 268 /// 更新拓客管理
... ... @@ -273,6 +279,7 @@ namespace NCC.Extend.LqTkjlb
273 279 throw NCCException.Oh(ErrorCode.COM1001);
274 280 }
275 281 #endregion
  282 +
276 283 #region 删除拓客管理
277 284 /// <summary>
278 285 /// 删除拓客管理
... ... @@ -288,6 +295,7 @@ namespace NCC.Extend.LqTkjlb
288 295 throw NCCException.Oh(ErrorCode.COM1002);
289 296 }
290 297 #endregion
  298 +
291 299 #region 获取拓客排行榜
292 300 /// <summary>
293 301 /// 获取拓客排行榜
... ... @@ -308,6 +316,7 @@ namespace NCC.Extend.LqTkjlb
308 316 return sortedData;
309 317 }
310 318 #endregion
  319 +
311 320 #region 获取战队人员详细报表
312 321 /// <summary>
313 322 /// 获取战队人员详细报表
... ...