Commit d0025b28d66891e2ce601cca0107aa693b548f96
Merge branch 'master' of http://39.98.150.180/antissoft/lvqianmeiye_ERP
Showing
18 changed files
with
1133 additions
and
422 deletions
antis-ncc-admin/.env.development
antis-ncc-admin/src/views/login/index.vue
| 1 | 1 | <template> |
| 2 | - <div class="container"> | |
| 3 | - <el-container> | |
| 4 | - <el-aside style="width: 50%; background-color: #fff"> | |
| 5 | - <img src="../../assets/images/3.png" alt="" /> | |
| 6 | - </el-aside> | |
| 7 | - <el-main> | |
| 8 | - <p>绿纤ERP</p> | |
| 9 | - <!-- <span>一体化协同服务</span> --> | |
| 10 | - <el-form ref="loginForm" :model="loginForm" :rules="loginRules"> | |
| 11 | - <ul> | |
| 12 | - <li> | |
| 13 | - <el-form-item prop="account"> | |
| 14 | - <img src="../../assets/images/1.png" alt="" /> | |
| 15 | - <input | |
| 16 | - type="text" | |
| 17 | - name="account" | |
| 18 | - v-model="loginForm.account" | |
| 19 | - ref="account" | |
| 20 | - tabindex="1" | |
| 21 | - :placeholder="$t('login.username')" | |
| 22 | - /> | |
| 23 | - </el-form-item> | |
| 24 | - </li> | |
| 25 | - <li> | |
| 26 | - <el-form-item prop="password"> | |
| 27 | - <img src="../../assets/images/2.png" alt="" /> | |
| 28 | - <input | |
| 29 | - type="password" | |
| 30 | - name="password" | |
| 31 | - v-model="loginForm.password" | |
| 32 | - ref="password" | |
| 33 | - tabindex="2" | |
| 34 | - :placeholder="$t('login.password')" | |
| 35 | - /> | |
| 36 | - </el-form-item> | |
| 37 | - </li> | |
| 38 | - <li class="bottom"> | |
| 39 | - <el-button | |
| 40 | - :loading="loading" | |
| 41 | - type="primary" | |
| 42 | - round | |
| 43 | - @click.native.prevent="handleLogin" | |
| 44 | - >{{ $t("login.logIn") }}</el-button | |
| 2 | + <div class="login-container"> | |
| 3 | + <!-- 动画背景层 --> | |
| 4 | + <div class="animated-bg"> | |
| 5 | + <!-- 浮动粒子 --> | |
| 6 | + <div class="particles"> | |
| 7 | + <div class="particle" v-for="n in 15" :key="n" :style="getParticleStyle(n)"></div> | |
| 8 | + </div> | |
| 9 | + | |
| 10 | + <!-- 渐变波浪 --> | |
| 11 | + <div class="gradient-waves"> | |
| 12 | + <div class="wave wave-1"></div> | |
| 13 | + <div class="wave wave-2"></div> | |
| 14 | + <div class="wave wave-3"></div> | |
| 15 | + </div> | |
| 16 | + </div> | |
| 17 | + | |
| 18 | + <div class="login-wrapper"> | |
| 19 | + <!-- 左侧品牌区域 --> | |
| 20 | + <div class="brand-section"> | |
| 21 | + <div class="brand-content"> | |
| 22 | + <div class="system-section"> | |
| 23 | + <h1 class="system-title">绿纤ERP</h1> | |
| 24 | + <p class="system-desc">智能化企业资源管理平台</p> | |
| 25 | + </div> | |
| 26 | + | |
| 27 | + <div class="data-visualization"> | |
| 28 | + <div class="chart-container"> | |
| 29 | + <div class="chart-item"> | |
| 30 | + <div class="chart-bar" style="height: 60%"></div> | |
| 31 | + <div class="chart-bar" style="height: 80%"></div> | |
| 32 | + <div class="chart-bar" style="height: 45%"></div> | |
| 33 | + <div class="chart-bar" style="height: 90%"></div> | |
| 34 | + <div class="chart-bar" style="height: 70%"></div> | |
| 35 | + </div> | |
| 36 | + <p class="chart-label">实时数据分析</p> | |
| 37 | + </div> | |
| 38 | + </div> | |
| 39 | + | |
| 40 | + <div class="core-feature"> | |
| 41 | + <div class="feature-highlight"> | |
| 42 | + <i class="el-icon-s-data"></i> | |
| 43 | + <span>数据驱动决策</span> | |
| 44 | + </div> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + | |
| 49 | + <!-- 右侧登录表单 --> | |
| 50 | + <div class="form-section"> | |
| 51 | + <div class="login-form-wrapper"> | |
| 52 | + <div class="form-header"> | |
| 53 | + <h2>欢迎登录</h2> | |
| 54 | + <p>请输入您的账号信息</p> | |
| 55 | + </div> | |
| 56 | + | |
| 57 | + <el-form | |
| 58 | + ref="loginForm" | |
| 59 | + :model="loginForm" | |
| 60 | + :rules="loginRules" | |
| 61 | + class="login-form" | |
| 62 | + @keyup.enter.native="handleLogin" | |
| 63 | + > | |
| 64 | + <el-form-item prop="account"> | |
| 65 | + <el-input | |
| 66 | + ref="account" | |
| 67 | + v-model="loginForm.account" | |
| 68 | + :placeholder="$t('login.username')" | |
| 69 | + name="account" | |
| 70 | + type="text" | |
| 71 | + tabindex="1" | |
| 72 | + autocomplete="on" | |
| 73 | + size="large" | |
| 74 | + prefix-icon="el-icon-user" | |
| 75 | + /> | |
| 76 | + </el-form-item> | |
| 77 | + | |
| 78 | + <el-form-item prop="password"> | |
| 79 | + <el-input | |
| 80 | + ref="password" | |
| 81 | + v-model="loginForm.password" | |
| 82 | + :type="passwordType" | |
| 83 | + :placeholder="$t('login.password')" | |
| 84 | + name="password" | |
| 85 | + tabindex="2" | |
| 86 | + autocomplete="on" | |
| 87 | + size="large" | |
| 88 | + prefix-icon="el-icon-lock" | |
| 45 | 89 | > |
| 46 | - </li> | |
| 47 | - </ul> | |
| 48 | - </el-form> | |
| 49 | - </el-main> | |
| 50 | - </el-container> | |
| 90 | + <i | |
| 91 | + slot="suffix" | |
| 92 | + :class="passwordType === 'password' ? 'el-icon-view' : 'el-icon-hide'" | |
| 93 | + class="show-pwd" | |
| 94 | + @click="showPwd" | |
| 95 | + ></i> | |
| 96 | + </el-input> | |
| 97 | + </el-form-item> | |
| 98 | + | |
| 99 | + <el-button | |
| 100 | + :loading="loading" | |
| 101 | + type="primary" | |
| 102 | + size="large" | |
| 103 | + class="login-btn" | |
| 104 | + @click.native.prevent="handleLogin" | |
| 105 | + > | |
| 106 | + {{ loading ? '登录中...' : $t("login.logIn") }} | |
| 107 | + </el-button> | |
| 108 | + </el-form> | |
| 109 | + | |
| 110 | + <div class="footer"> | |
| 111 | + <p>© 2024 绿纤ERP. All rights reserved.</p> | |
| 112 | + </div> | |
| 113 | + </div> | |
| 114 | + </div> | |
| 115 | + </div> | |
| 51 | 116 | </div> |
| 52 | 117 | </template> |
| 53 | -<script> | |
| 54 | 118 | |
| 119 | +<script> | |
| 55 | 120 | export default { |
| 56 | 121 | name: "Login", |
| 57 | 122 | data: function () { |
| ... | ... | @@ -77,6 +142,7 @@ export default { |
| 77 | 142 | }, |
| 78 | 143 | ], |
| 79 | 144 | }, |
| 145 | + passwordType: 'password', | |
| 80 | 146 | capsTooltip: false, |
| 81 | 147 | loading: false, |
| 82 | 148 | showDialog: false, |
| ... | ... | @@ -132,6 +198,30 @@ export default { |
| 132 | 198 | }; |
| 133 | 199 | }, |
| 134 | 200 | methods: { |
| 201 | + getParticleStyle(index) { | |
| 202 | + const size = Math.random() * 4 + 2; // 2-6px | |
| 203 | + const left = Math.random() * 100; // 0-100% | |
| 204 | + const animationDelay = Math.random() * 20; // 0-20s | |
| 205 | + const animationDuration = Math.random() * 10 + 15; // 15-25s | |
| 206 | + | |
| 207 | + return { | |
| 208 | + width: `${size}px`, | |
| 209 | + height: `${size}px`, | |
| 210 | + left: `${left}%`, | |
| 211 | + animationDelay: `${animationDelay}s`, | |
| 212 | + animationDuration: `${animationDuration}s` | |
| 213 | + }; | |
| 214 | + }, | |
| 215 | + showPwd() { | |
| 216 | + if (this.passwordType === 'password') { | |
| 217 | + this.passwordType = '' | |
| 218 | + } else { | |
| 219 | + this.passwordType = 'password' | |
| 220 | + } | |
| 221 | + this.$nextTick(() => { | |
| 222 | + this.$refs.password.focus() | |
| 223 | + }) | |
| 224 | + }, | |
| 135 | 225 | checkCapslock(e) { |
| 136 | 226 | const { key } = e; |
| 137 | 227 | this.capsTooltip = key && key.length === 1 && key >= "A" && key <= "Z"; |
| ... | ... | @@ -159,119 +249,511 @@ export default { |
| 159 | 249 | }); |
| 160 | 250 | }, |
| 161 | 251 | handlemyLogin() { |
| 162 | - //this.$store.dispatch('user/logout') | |
| 163 | - console.log("开始执行单点登录!"); | |
| 164 | - if (this.loading) return; | |
| 165 | - let username = this.$route.query.username; | |
| 166 | - let hospitalname=this.$route.query.hospitalname; | |
| 167 | - console.log("username:"+username); | |
| 168 | - if (username != null && username != "") { | |
| 169 | - this.loginForm.account = username; | |
| 170 | - this.loginForm.hospitalname =hospitalname; | |
| 171 | - this.loading = true; | |
| 172 | - this.$store.commit("user/SET_LOGIN_LOADING", true); | |
| 173 | - this.$store | |
| 174 | - .dispatch("user/pislogin", this.loginForm) | |
| 175 | - .then(() => { | |
| 176 | - this.$router.push({ | |
| 177 | - path: this.redirect || "/home", | |
| 178 | - query: this.otherQuery, | |
| 252 | + //this.$store.dispatch('user/logout') | |
| 253 | + console.log("开始执行单点登录!"); | |
| 254 | + if (this.loading) return; | |
| 255 | + let username = this.$route.query.username; | |
| 256 | + let hospitalname=this.$route.query.hospitalname; | |
| 257 | + console.log("username:"+username); | |
| 258 | + if (username != null && username != "") { | |
| 259 | + this.loginForm.account = username; | |
| 260 | + this.loginForm.hospitalname =hospitalname; | |
| 261 | + this.loading = true; | |
| 262 | + this.$store.commit("user/SET_LOGIN_LOADING", true); | |
| 263 | + this.$store | |
| 264 | + .dispatch("user/pislogin", this.loginForm) | |
| 265 | + .then(() => { | |
| 266 | + this.$router.push({ | |
| 267 | + path: this.redirect || "/home", | |
| 268 | + query: this.otherQuery, | |
| 269 | + }); | |
| 270 | + }) | |
| 271 | + .catch(() => { | |
| 272 | + this.$store.commit("user/SET_LOGIN_LOADING", false); | |
| 179 | 273 | }); |
| 180 | - }) | |
| 181 | - .catch(() => { | |
| 182 | - this.$store.commit("user/SET_LOGIN_LOADING", false); | |
| 183 | - }); | |
| 184 | - } | |
| 185 | - }, | |
| 186 | - }, | |
| 187 | - | |
| 188 | - getOtherQuery(query) { | |
| 189 | - return Object.keys(query).reduce((acc, cur) => { | |
| 190 | - if (cur !== "redirect") { | |
| 191 | - acc[cur] = query[cur]; | |
| 192 | 274 | } |
| 193 | - return acc; | |
| 194 | - }, {}); | |
| 275 | + }, | |
| 276 | + getOtherQuery(query) { | |
| 277 | + return Object.keys(query).reduce((acc, cur) => { | |
| 278 | + if (cur !== "redirect") { | |
| 279 | + acc[cur] = query[cur]; | |
| 280 | + } | |
| 281 | + return acc; | |
| 282 | + }, {}); | |
| 283 | + }, | |
| 195 | 284 | }, |
| 196 | 285 | }; |
| 197 | 286 | </script> |
| 287 | + | |
| 198 | 288 | <style lang="scss" scoped> |
| 199 | -* { | |
| 200 | - margin: 0; | |
| 201 | - padding: 0; | |
| 202 | - list-style: none; | |
| 203 | - box-sizing: border-box; | |
| 289 | +.login-container { | |
| 290 | + width: 100vw; | |
| 291 | + height: 100vh; | |
| 292 | + background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); | |
| 293 | + display: flex; | |
| 294 | + align-items: center; | |
| 295 | + justify-content: center; | |
| 296 | + font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; | |
| 297 | + position: relative; | |
| 298 | + overflow: hidden; | |
| 204 | 299 | } |
| 205 | -html, | |
| 206 | -body { | |
| 300 | + | |
| 301 | +// 动画背景层 | |
| 302 | +.animated-bg { | |
| 303 | + position: absolute; | |
| 304 | + top: 0; | |
| 305 | + left: 0; | |
| 207 | 306 | width: 100%; |
| 208 | 307 | height: 100%; |
| 308 | + pointer-events: none; | |
| 309 | + z-index: 1; | |
| 209 | 310 | } |
| 210 | -.container { | |
| 311 | + | |
| 312 | +// 浮动粒子效果 | |
| 313 | +.particles { | |
| 314 | + position: absolute; | |
| 211 | 315 | width: 100%; |
| 212 | 316 | height: 100%; |
| 213 | - background-image: url(../../assets/images/4.jpg); | |
| 214 | - background-size: 100% 100%; | |
| 215 | - padding-top: 10%; | |
| 216 | - box-sizing: border-box; | |
| 317 | + | |
| 318 | + .particle { | |
| 319 | + position: absolute; | |
| 320 | + background: rgba(255, 255, 255, 0.6); | |
| 321 | + border-radius: 50%; | |
| 322 | + animation: floatUp linear infinite; | |
| 323 | + will-change: transform, opacity; | |
| 324 | + | |
| 325 | + &:nth-child(odd) { | |
| 326 | + background: rgba(52, 152, 219, 0.4); | |
| 327 | + } | |
| 328 | + | |
| 329 | + &:nth-child(3n) { | |
| 330 | + background: rgba(155, 89, 182, 0.3); | |
| 331 | + } | |
| 332 | + } | |
| 217 | 333 | } |
| 218 | 334 | |
| 219 | -.container > .el-container { | |
| 220 | - width: 50%; | |
| 221 | - max-width: 900px; | |
| 222 | - min-width: 600px; | |
| 223 | - margin: 0 auto; | |
| 224 | - background-color: #fff; | |
| 225 | - border-radius: 20px; | |
| 226 | - padding: 50px 0; | |
| 335 | +@keyframes floatUp { | |
| 336 | + 0% { | |
| 337 | + transform: translateY(100vh) rotate(0deg); | |
| 338 | + opacity: 0; | |
| 339 | + } | |
| 340 | + 10% { | |
| 341 | + opacity: 1; | |
| 342 | + } | |
| 343 | + 90% { | |
| 344 | + opacity: 1; | |
| 345 | + } | |
| 346 | + 100% { | |
| 347 | + transform: translateY(-100px) rotate(360deg); | |
| 348 | + opacity: 0; | |
| 349 | + } | |
| 227 | 350 | } |
| 228 | -.el-aside { | |
| 229 | - text-align: center; | |
| 230 | - padding: 40px; | |
| 351 | + | |
| 352 | +// 渐变波浪效果 | |
| 353 | +.gradient-waves { | |
| 354 | + position: absolute; | |
| 355 | + width: 100%; | |
| 356 | + height: 100%; | |
| 357 | + | |
| 358 | + .wave { | |
| 359 | + position: absolute; | |
| 360 | + width: 200%; | |
| 361 | + height: 200%; | |
| 362 | + background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%); | |
| 363 | + border-radius: 50%; | |
| 364 | + animation: waveFloat ease-in-out infinite; | |
| 365 | + will-change: transform; | |
| 366 | + } | |
| 367 | + | |
| 368 | + .wave-1 { | |
| 369 | + top: -50%; | |
| 370 | + left: -50%; | |
| 371 | + animation-duration: 20s; | |
| 372 | + animation-delay: 0s; | |
| 373 | + } | |
| 374 | + | |
| 375 | + .wave-2 { | |
| 376 | + top: -30%; | |
| 377 | + right: -50%; | |
| 378 | + animation-duration: 25s; | |
| 379 | + animation-delay: -5s; | |
| 380 | + background: radial-gradient(ellipse at center, rgba(52, 152, 219, 0.08) 0%, transparent 70%); | |
| 381 | + } | |
| 382 | + | |
| 383 | + .wave-3 { | |
| 384 | + bottom: -50%; | |
| 385 | + left: -30%; | |
| 386 | + animation-duration: 30s; | |
| 387 | + animation-delay: -10s; | |
| 388 | + background: radial-gradient(ellipse at center, rgba(155, 89, 182, 0.06) 0%, transparent 70%); | |
| 389 | + } | |
| 231 | 390 | } |
| 232 | -.el-main { | |
| 233 | - padding-right: 80px; | |
| 391 | + | |
| 392 | +@keyframes waveFloat { | |
| 393 | + 0%, 100% { | |
| 394 | + transform: translate(0, 0) rotate(0deg) scale(1); | |
| 395 | + } | |
| 396 | + 25% { | |
| 397 | + transform: translate(20px, -20px) rotate(90deg) scale(1.1); | |
| 398 | + } | |
| 399 | + 50% { | |
| 400 | + transform: translate(-10px, 10px) rotate(180deg) scale(0.9); | |
| 401 | + } | |
| 402 | + 75% { | |
| 403 | + transform: translate(-20px, -10px) rotate(270deg) scale(1.05); | |
| 404 | + } | |
| 234 | 405 | } |
| 235 | -.el-aside img { | |
| 406 | + | |
| 407 | +.login-wrapper { | |
| 236 | 408 | width: 100%; |
| 409 | + max-width: 1000px; | |
| 410 | + height: 600px; | |
| 411 | + background: rgba(255, 255, 255, 0.95); | |
| 412 | + backdrop-filter: blur(10px); | |
| 413 | + border-radius: 16px; | |
| 414 | + box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); | |
| 415 | + display: flex; | |
| 416 | + overflow: hidden; | |
| 417 | + position: relative; | |
| 418 | + z-index: 2; | |
| 237 | 419 | } |
| 238 | -.el-main p { | |
| 239 | - font-size: 25px; | |
| 240 | - margin-bottom: 10px; | |
| 241 | - margin-top: 40px; | |
| 242 | -} | |
| 243 | -.el-main > span { | |
| 244 | - color: #bfbfbf; | |
| 245 | - font-size: 20px; | |
| 420 | + | |
| 421 | +// 左侧品牌区域 | |
| 422 | +.brand-section { | |
| 423 | + flex: 1; | |
| 424 | + background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); | |
| 425 | + color: #fff; | |
| 426 | + display: flex; | |
| 427 | + align-items: center; | |
| 428 | + justify-content: center; | |
| 429 | + position: relative; | |
| 430 | + | |
| 431 | + .brand-content { | |
| 432 | + position: relative; | |
| 433 | + z-index: 1; | |
| 434 | + text-align: center; | |
| 435 | + padding: 40px; | |
| 436 | + width: 100%; | |
| 437 | + } | |
| 438 | + | |
| 439 | + .system-section { | |
| 440 | + margin-bottom: 50px; | |
| 441 | + | |
| 442 | + .system-title { | |
| 443 | + font-size: 42px; | |
| 444 | + font-weight: 700; | |
| 445 | + margin-bottom: 12px; | |
| 446 | + color: #fff; | |
| 447 | + letter-spacing: 2px; | |
| 448 | + } | |
| 449 | + | |
| 450 | + .system-desc { | |
| 451 | + font-size: 16px; | |
| 452 | + opacity: 0.85; | |
| 453 | + font-weight: 300; | |
| 454 | + color: #ecf0f1; | |
| 455 | + } | |
| 456 | + } | |
| 457 | + | |
| 458 | + .data-visualization { | |
| 459 | + margin-bottom: 40px; | |
| 460 | + | |
| 461 | + .chart-container { | |
| 462 | + .chart-item { | |
| 463 | + display: flex; | |
| 464 | + align-items: end; | |
| 465 | + justify-content: center; | |
| 466 | + gap: 8px; | |
| 467 | + height: 80px; | |
| 468 | + margin-bottom: 16px; | |
| 469 | + | |
| 470 | + .chart-bar { | |
| 471 | + width: 12px; | |
| 472 | + background: linear-gradient(to top, #3498db, #5dade2); | |
| 473 | + border-radius: 6px 6px 0 0; | |
| 474 | + animation: chartGrow 2s ease-out; | |
| 475 | + box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3); | |
| 476 | + } | |
| 477 | + } | |
| 478 | + | |
| 479 | + .chart-label { | |
| 480 | + font-size: 14px; | |
| 481 | + color: #bdc3c7; | |
| 482 | + margin: 0; | |
| 483 | + font-weight: 400; | |
| 484 | + } | |
| 485 | + } | |
| 486 | + } | |
| 487 | + | |
| 488 | + .core-feature { | |
| 489 | + .feature-highlight { | |
| 490 | + display: flex; | |
| 491 | + align-items: center; | |
| 492 | + justify-content: center; | |
| 493 | + gap: 12px; | |
| 494 | + padding: 16px 24px; | |
| 495 | + background: rgba(52, 152, 219, 0.2); | |
| 496 | + border: 1px solid rgba(52, 152, 219, 0.3); | |
| 497 | + border-radius: 12px; | |
| 498 | + transition: all 0.3s ease; | |
| 499 | + | |
| 500 | + &:hover { | |
| 501 | + background: rgba(52, 152, 219, 0.3); | |
| 502 | + transform: translateY(-2px); | |
| 503 | + box-shadow: 0 8px 20px rgba(52, 152, 219, 0.2); | |
| 504 | + } | |
| 505 | + | |
| 506 | + i { | |
| 507 | + font-size: 24px; | |
| 508 | + color: #3498db; | |
| 509 | + } | |
| 510 | + | |
| 511 | + span { | |
| 512 | + font-size: 16px; | |
| 513 | + font-weight: 500; | |
| 514 | + color: #ecf0f1; | |
| 515 | + } | |
| 516 | + } | |
| 517 | + } | |
| 246 | 518 | } |
| 247 | -.el-main ul { | |
| 248 | - margin-top: 70px; | |
| 519 | + | |
| 520 | +@keyframes chartGrow { | |
| 521 | + from { | |
| 522 | + height: 0; | |
| 523 | + opacity: 0; | |
| 524 | + } | |
| 525 | + to { | |
| 526 | + opacity: 1; | |
| 527 | + } | |
| 249 | 528 | } |
| 250 | -.el-main ul li { | |
| 251 | - border-bottom: 1px solid #eeeeee; | |
| 252 | - padding-bottom: 10px; | |
| 253 | - margin: 20px 0; | |
| 529 | + | |
| 530 | +// 右侧表单区域 | |
| 531 | +.form-section { | |
| 532 | + flex: 1; | |
| 533 | + display: flex; | |
| 534 | + align-items: center; | |
| 535 | + justify-content: center; | |
| 536 | + padding: 40px; | |
| 254 | 537 | } |
| 255 | -.el-main ul .bottom { | |
| 256 | - border-bottom: none; | |
| 257 | - margin-top: 60px; | |
| 538 | + | |
| 539 | +.login-form-wrapper { | |
| 540 | + width: 100%; | |
| 541 | + max-width: 360px; | |
| 542 | + | |
| 543 | + .form-header { | |
| 544 | + text-align: center; | |
| 545 | + margin-bottom: 40px; | |
| 546 | + | |
| 547 | + h2 { | |
| 548 | + font-size: 28px; | |
| 549 | + font-weight: 600; | |
| 550 | + color: #262626; | |
| 551 | + margin-bottom: 8px; | |
| 552 | + } | |
| 553 | + | |
| 554 | + p { | |
| 555 | + font-size: 14px; | |
| 556 | + color: #8c8c8c; | |
| 557 | + } | |
| 558 | + } | |
| 258 | 559 | } |
| 259 | -.el-main ul li img { | |
| 260 | - width: 25px; | |
| 261 | - vertical-align: middle; | |
| 560 | + | |
| 561 | +.login-form { | |
| 562 | + .el-form-item { | |
| 563 | + margin-bottom: 20px; | |
| 564 | + } | |
| 565 | + | |
| 566 | + .el-input { | |
| 567 | + ::v-deep .el-input__inner { | |
| 568 | + height: 48px; | |
| 569 | + padding-left: 44px; | |
| 570 | + padding-right: 44px; | |
| 571 | + border: 1px solid #d9d9d9; | |
| 572 | + border-radius: 8px; | |
| 573 | + font-size: 14px; | |
| 574 | + transition: all 0.3s ease; | |
| 575 | + | |
| 576 | + &:focus { | |
| 577 | + border-color: #1890ff; | |
| 578 | + box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1); | |
| 579 | + } | |
| 580 | + | |
| 581 | + &:hover { | |
| 582 | + border-color: #40a9ff; | |
| 583 | + } | |
| 584 | + } | |
| 585 | + | |
| 586 | + ::v-deep .el-input__prefix { | |
| 587 | + left: 12px; | |
| 588 | + top: 50%; | |
| 589 | + transform: translateY(-50%); | |
| 590 | + | |
| 591 | + .el-input__icon { | |
| 592 | + color: #bfbfbf; | |
| 593 | + font-size: 16px; | |
| 594 | + line-height: 1; | |
| 595 | + } | |
| 596 | + } | |
| 597 | + | |
| 598 | + ::v-deep .el-input__suffix { | |
| 599 | + right: 12px; | |
| 600 | + height: 48px; | |
| 601 | + display: flex; | |
| 602 | + align-items: center; | |
| 603 | + justify-content: center; | |
| 604 | + } | |
| 605 | + | |
| 606 | + ::v-deep .el-input__suffix-inner { | |
| 607 | + display: flex; | |
| 608 | + align-items: center; | |
| 609 | + justify-content: center; | |
| 610 | + height: 100%; | |
| 611 | + } | |
| 612 | + } | |
| 613 | + | |
| 614 | + .show-pwd { | |
| 615 | + color: #bfbfbf; | |
| 616 | + cursor: pointer; | |
| 617 | + font-size: 16px; | |
| 618 | + line-height: 1; | |
| 619 | + display: flex; | |
| 620 | + align-items: center; | |
| 621 | + justify-content: center; | |
| 622 | + width: 20px; | |
| 623 | + height: 20px; | |
| 624 | + | |
| 625 | + &:hover { | |
| 626 | + color: #1890ff; | |
| 627 | + } | |
| 628 | + } | |
| 262 | 629 | } |
| 263 | -.el-main ul li input { | |
| 264 | - width: 80%; | |
| 265 | - border: none; | |
| 266 | - outline: none; | |
| 267 | - padding-left: 10px; | |
| 630 | + | |
| 631 | +.login-btn { | |
| 632 | + width: 100%; | |
| 633 | + height: 48px; | |
| 268 | 634 | font-size: 16px; |
| 635 | + font-weight: 500; | |
| 636 | + border-radius: 8px; | |
| 637 | + background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%); | |
| 638 | + border: none; | |
| 639 | + margin-top: 8px; | |
| 640 | + | |
| 641 | + &:hover { | |
| 642 | + background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%); | |
| 643 | + } | |
| 269 | 644 | } |
| 270 | -.el-main ul li button { | |
| 271 | - width: 90%; | |
| 272 | - color: #fff; | |
| 273 | - display: block; | |
| 274 | - margin: 20px auto; | |
| 275 | - font-size: 20px; | |
| 645 | + | |
| 646 | +.footer { | |
| 647 | + margin-top: 32px; | |
| 648 | + text-align: center; | |
| 649 | + | |
| 650 | + p { | |
| 651 | + font-size: 12px; | |
| 652 | + color: #bfbfbf; | |
| 653 | + } | |
| 654 | +} | |
| 655 | + | |
| 656 | +// 响应式设计和性能优化 | |
| 657 | +@media (max-width: 768px) { | |
| 658 | + .login-wrapper { | |
| 659 | + flex-direction: column; | |
| 660 | + height: auto; | |
| 661 | + min-height: 100vh; | |
| 662 | + border-radius: 0; | |
| 663 | + max-width: none; | |
| 664 | + } | |
| 665 | + | |
| 666 | + .brand-section { | |
| 667 | + flex: none; | |
| 668 | + height: 200px; | |
| 669 | + | |
| 670 | + .brand-content { | |
| 671 | + padding: 20px; | |
| 672 | + } | |
| 673 | + | |
| 674 | + .system-section { | |
| 675 | + margin-bottom: 20px; | |
| 676 | + | |
| 677 | + .system-title { | |
| 678 | + font-size: 32px; | |
| 679 | + } | |
| 680 | + | |
| 681 | + .system-desc { | |
| 682 | + font-size: 14px; | |
| 683 | + } | |
| 684 | + } | |
| 685 | + | |
| 686 | + .data-visualization { | |
| 687 | + margin-bottom: 20px; | |
| 688 | + | |
| 689 | + .chart-container .chart-item { | |
| 690 | + height: 60px; | |
| 691 | + | |
| 692 | + .chart-bar { | |
| 693 | + width: 8px; | |
| 694 | + } | |
| 695 | + } | |
| 696 | + } | |
| 697 | + } | |
| 698 | + | |
| 699 | + .form-section { | |
| 700 | + padding: 30px 20px; | |
| 701 | + } | |
| 702 | + | |
| 703 | + // 移动端动画优化 | |
| 704 | + .particles .particle { | |
| 705 | + display: none; // 移动端隐藏粒子以提升性能 | |
| 706 | + } | |
| 707 | + | |
| 708 | + .gradient-waves .wave { | |
| 709 | + animation-duration: 40s; // 减慢动画速度 | |
| 710 | + } | |
| 711 | +} | |
| 712 | + | |
| 713 | +@media (max-width: 480px) { | |
| 714 | + .login-container { | |
| 715 | + padding: 0; | |
| 716 | + } | |
| 717 | + | |
| 718 | + .form-section { | |
| 719 | + padding: 20px 16px; | |
| 720 | + } | |
| 721 | + | |
| 722 | + .login-form-wrapper { | |
| 723 | + max-width: none; | |
| 724 | + } | |
| 725 | + | |
| 726 | + // 小屏幕进一步优化 | |
| 727 | + .gradient-waves { | |
| 728 | + display: none; // 小屏幕完全隐藏波浪动画 | |
| 729 | + } | |
| 730 | +} | |
| 731 | + | |
| 732 | +// 减少动画的媒体查询 - 尊重用户偏好 | |
| 733 | +@media (prefers-reduced-motion: reduce) { | |
| 734 | + .particles .particle, | |
| 735 | + .gradient-waves .wave, | |
| 736 | + .chart-bar { | |
| 737 | + animation: none; | |
| 738 | + } | |
| 739 | + | |
| 740 | + .brand-section .core-feature .feature-highlight { | |
| 741 | + transition: none; | |
| 742 | + } | |
| 743 | +} | |
| 744 | + | |
| 745 | +// 高性能设备增强动画 | |
| 746 | +@media (min-width: 1200px) and (min-height: 800px) { | |
| 747 | + .particles { | |
| 748 | + .particle { | |
| 749 | + &:nth-child(5n) { | |
| 750 | + background: rgba(46, 204, 113, 0.3); | |
| 751 | + } | |
| 752 | + | |
| 753 | + &:nth-child(7n) { | |
| 754 | + background: rgba(241, 196, 15, 0.3); | |
| 755 | + } | |
| 756 | + } | |
| 757 | + } | |
| 276 | 758 | } |
| 277 | 759 | -</style> |
| 760 | +</style> | |
| 278 | 761 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/lqKhxx/Form.vue
| ... | ... | @@ -207,30 +207,6 @@ |
| 207 | 207 | </el-form-item> |
| 208 | 208 | </el-col> |
| 209 | 209 | |
| 210 | - <!-- 到店记录 --> | |
| 211 | - <el-col :span="24"> | |
| 212 | - <div class="form-section-title"> | |
| 213 | - <i class="el-icon-date"></i> | |
| 214 | - <span>到店记录</span> | |
| 215 | - </div> | |
| 216 | - </el-col> | |
| 217 | - | |
| 218 | - <!-- 消费信息 --> | |
| 219 | - <el-col :span="24"> | |
| 220 | - <div class="form-section-title"> | |
| 221 | - <i class="el-icon-money"></i> | |
| 222 | - <span>消费信息</span> | |
| 223 | - </div> | |
| 224 | - </el-col> | |
| 225 | - | |
| 226 | - <!-- 余额信息 --> | |
| 227 | - <el-col :span="24"> | |
| 228 | - <div class="form-section-title"> | |
| 229 | - <i class="el-icon-coin"></i> | |
| 230 | - <span>余额信息</span> | |
| 231 | - </div> | |
| 232 | - </el-col> | |
| 233 | - | |
| 234 | 210 | <!-- 备注信息 --> |
| 235 | 211 | <el-col :span="24"> |
| 236 | 212 | <div class="form-section-title"> | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/LqKdKdjlbCrInput.cs
| ... | ... | @@ -13,146 +13,145 @@ namespace NCC.Extend.Entitys.Dto.LqKdKdjlb |
| 13 | 13 | /// 开单编号 |
| 14 | 14 | /// </summary> |
| 15 | 15 | public string id { get; set; } |
| 16 | - | |
| 16 | + | |
| 17 | 17 | /// <summary> |
| 18 | 18 | /// 单据门店 |
| 19 | 19 | /// </summary> |
| 20 | 20 | public string djmd { get; set; } |
| 21 | - | |
| 21 | + | |
| 22 | 22 | /// <summary> |
| 23 | 23 | /// 金三角 |
| 24 | 24 | /// </summary> |
| 25 | 25 | public string jsj { get; set; } |
| 26 | - | |
| 26 | + | |
| 27 | 27 | /// <summary> |
| 28 | 28 | /// 开单日期 |
| 29 | 29 | /// </summary> |
| 30 | 30 | public DateTime? kdrq { get; set; } |
| 31 | - | |
| 31 | + | |
| 32 | 32 | /// <summary> |
| 33 | 33 | /// 顾客类型 |
| 34 | 34 | /// </summary> |
| 35 | 35 | public string gjlx { get; set; } |
| 36 | - | |
| 36 | + | |
| 37 | 37 | /// <summary> |
| 38 | 38 | /// 合作机构 |
| 39 | 39 | /// </summary> |
| 40 | 40 | public string hgjg { get; set; } |
| 41 | - | |
| 41 | + | |
| 42 | 42 | /// <summary> |
| 43 | 43 | /// 整单业绩 |
| 44 | 44 | /// </summary> |
| 45 | 45 | public decimal zdyj { get; set; } |
| 46 | - | |
| 46 | + | |
| 47 | 47 | /// <summary> |
| 48 | 48 | /// 实付业绩 |
| 49 | 49 | /// </summary> |
| 50 | 50 | public decimal sfyj { get; set; } |
| 51 | - | |
| 51 | + | |
| 52 | 52 | /// <summary> |
| 53 | 53 | /// 欠款 |
| 54 | 54 | /// </summary> |
| 55 | 55 | public decimal qk { get; set; } |
| 56 | - | |
| 56 | + | |
| 57 | 57 | /// <summary> |
| 58 | 58 | /// 储扣方式 |
| 59 | 59 | /// </summary> |
| 60 | 60 | public string ckfs { get; set; } |
| 61 | - | |
| 61 | + | |
| 62 | 62 | /// <summary> |
| 63 | 63 | /// 储扣明细 |
| 64 | 64 | /// </summary> |
| 65 | 65 | public string ckmx { get; set; } |
| 66 | - | |
| 66 | + | |
| 67 | 67 | /// <summary> |
| 68 | 68 | /// 付款方式 |
| 69 | 69 | /// </summary> |
| 70 | 70 | public string fkfs { get; set; } |
| 71 | - | |
| 71 | + | |
| 72 | 72 | /// <summary> |
| 73 | 73 | /// 付款医院 |
| 74 | 74 | /// </summary> |
| 75 | 75 | public string fkyy { get; set; } |
| 76 | - | |
| 76 | + | |
| 77 | 77 | /// <summary> |
| 78 | 78 | /// 付款判断 |
| 79 | 79 | /// </summary> |
| 80 | 80 | public string fkpd { get; set; } |
| 81 | - | |
| 81 | + | |
| 82 | 82 | /// <summary> |
| 83 | 83 | /// 客户来源 |
| 84 | 84 | /// </summary> |
| 85 | 85 | public string khly { get; set; } |
| 86 | - | |
| 86 | + | |
| 87 | 87 | /// <summary> |
| 88 | 88 | /// 推荐人 |
| 89 | 89 | /// </summary> |
| 90 | 90 | public string tjr { get; set; } |
| 91 | - | |
| 91 | + | |
| 92 | 92 | /// <summary> |
| 93 | 93 | /// 是否首开订单 |
| 94 | 94 | /// </summary> |
| 95 | 95 | public string sfskdd { get; set; } |
| 96 | - | |
| 96 | + | |
| 97 | 97 | /// <summary> |
| 98 | 98 | /// 简介 |
| 99 | 99 | /// </summary> |
| 100 | 100 | public string jj { get; set; } |
| 101 | - | |
| 101 | + | |
| 102 | 102 | /// <summary> |
| 103 | 103 | /// 上传文件 |
| 104 | 104 | /// </summary> |
| 105 | 105 | public List<FileControlsModel> scwj { get; set; } |
| 106 | - | |
| 106 | + | |
| 107 | 107 | /// <summary> |
| 108 | 108 | /// 会员签字 |
| 109 | 109 | /// </summary> |
| 110 | 110 | public List<FileControlsModel> hyqz { get; set; } |
| 111 | - | |
| 111 | + | |
| 112 | 112 | /// <summary> |
| 113 | 113 | /// 备注 |
| 114 | 114 | /// </summary> |
| 115 | 115 | public string bz { get; set; } |
| 116 | - | |
| 116 | + | |
| 117 | 117 | /// <summary> |
| 118 | 118 | /// 开单会员 |
| 119 | 119 | /// </summary> |
| 120 | 120 | public string kdhy { get; set; } |
| 121 | - | |
| 121 | + | |
| 122 | 122 | /// <summary> |
| 123 | 123 | /// 开单会员名称 |
| 124 | 124 | /// </summary> |
| 125 | 125 | public string kdhyc { get; set; } |
| 126 | - | |
| 126 | + | |
| 127 | 127 | /// <summary> |
| 128 | 128 | /// 开单会员手机号 |
| 129 | 129 | /// </summary> |
| 130 | 130 | public string kdhysjh { get; set; } |
| 131 | - | |
| 131 | + | |
| 132 | 132 | /// <summary> |
| 133 | 133 | /// 健康师业绩 |
| 134 | 134 | /// </summary> |
| 135 | 135 | public string jksyj { get; set; } |
| 136 | - | |
| 136 | + | |
| 137 | 137 | /// <summary> |
| 138 | 138 | /// 科技部老师业绩 |
| 139 | 139 | /// </summary> |
| 140 | 140 | public string kjblsyj { get; set; } |
| 141 | - | |
| 141 | + | |
| 142 | 142 | /// <summary> |
| 143 | 143 | /// 品项信息 |
| 144 | 144 | /// </summary> |
| 145 | 145 | public string pxxx { get; set; } |
| 146 | - | |
| 146 | + | |
| 147 | 147 | /// <summary> |
| 148 | 148 | /// 方案其他 |
| 149 | 149 | /// </summary> |
| 150 | 150 | public string F_FIleUrl { get; set; } |
| 151 | - | |
| 151 | + | |
| 152 | 152 | /// <summary> |
| 153 | 153 | /// 开单_品项明细 |
| 154 | 154 | /// </summary> |
| 155 | 155 | public List<LqKdPxmxCrInput> lqKdPxmxList { get; set; } |
| 156 | - | |
| 157 | 156 | } |
| 158 | 157 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdPxmx/LqKdPxmxCrInput.cs
| ... | ... | @@ -34,6 +34,11 @@ namespace NCC.Extend.Entitys.Dto.LqKdKdjlb |
| 34 | 34 | public decimal pxjg { get; set; } |
| 35 | 35 | |
| 36 | 36 | /// <summary> |
| 37 | + /// 实付金额 | |
| 38 | + /// </summary> | |
| 39 | + public decimal actualPrice { get; set; } | |
| 40 | + | |
| 41 | + /// <summary> | |
| 37 | 42 | /// 会员id |
| 38 | 43 | /// </summary> |
| 39 | 44 | public string memberId { get; set; } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKhxx/LqKhxxInfoOutput.cs
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKhxx/LqKhxxListOutput.cs
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKhxx/LqKhxxOrderTypeOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqKhxx | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 客户订单类型输出 | |
| 7 | + /// </summary> | |
| 8 | + public class LqKhxxOrderTypeOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 客户ID | |
| 12 | + /// </summary> | |
| 13 | + public string CustomerId { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 订单类型 (first_order: 首单, repeat_order: 升单) | |
| 17 | + /// </summary> | |
| 18 | + public string OrderType { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 是否有开单记录 | |
| 22 | + /// </summary> | |
| 23 | + public bool HasOrderRecord { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 开单记录数量 | |
| 27 | + /// </summary> | |
| 28 | + public int OrderCount { get; set; } | |
| 29 | + } | |
| 30 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkjlb/LqTkjlbCrInput.cs
| ... | ... | @@ -12,56 +12,50 @@ namespace NCC.Extend.Entitys.Dto.LqTkjlb |
| 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 DateTime? tksj { get; set; } |
| 20 | - | |
| 21 | - /// <summary> | |
| 22 | - /// 拓客人员 | |
| 23 | - /// </summary> | |
| 24 | - public string tkry { get; set; } | |
| 25 | - | |
| 20 | + | |
| 26 | 21 | /// <summary> |
| 27 | 22 | /// 顾客姓名 |
| 28 | 23 | /// </summary> |
| 29 | 24 | public string gkxm { get; set; } |
| 30 | - | |
| 25 | + | |
| 31 | 26 | /// <summary> |
| 32 | 27 | /// 电话号码 |
| 33 | 28 | /// </summary> |
| 34 | 29 | public string dhhm { get; set; } |
| 35 | - | |
| 30 | + | |
| 36 | 31 | /// <summary> |
| 37 | 32 | /// 购买张数 |
| 38 | 33 | /// </summary> |
| 39 | 34 | public int? gmzs { get; set; } |
| 40 | - | |
| 35 | + | |
| 41 | 36 | /// <summary> |
| 42 | 37 | /// 支付方式 |
| 43 | 38 | /// </summary> |
| 44 | 39 | public string zffs { get; set; } |
| 45 | - | |
| 40 | + | |
| 46 | 41 | /// <summary> |
| 47 | 42 | /// 是否加微信 |
| 48 | 43 | /// </summary> |
| 49 | 44 | public string sfjwx { get; set; } |
| 50 | - | |
| 45 | + | |
| 51 | 46 | /// <summary> |
| 52 | 47 | /// 备注 |
| 53 | 48 | /// </summary> |
| 54 | 49 | public string bz { get; set; } |
| 55 | - | |
| 50 | + | |
| 56 | 51 | /// <summary> |
| 57 | - /// 所属门店 | |
| 52 | + /// 拓客人员 | |
| 58 | 53 | /// </summary> |
| 59 | - public string ssmd { get; set; } | |
| 60 | - | |
| 54 | + public string tkry { get; set; } | |
| 55 | + | |
| 61 | 56 | /// <summary> |
| 62 | - /// 所属战队 | |
| 57 | + /// 拓客活动id | |
| 63 | 58 | /// </summary> |
| 64 | - public string sszd { get; set; } | |
| 65 | - | |
| 59 | + public string eventId { get; set; } | |
| 66 | 60 | } |
| 67 | 61 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_kd_kdjlb/LqKdKdjlbEntity.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_kd_kdjlb |
| 6 | 6 | { |
| ... | ... | @@ -16,174 +16,173 @@ namespace NCC.Extend.Entitys.lq_kd_kdjlb |
| 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 = "djmd")] | |
| 23 | + [SugarColumn(ColumnName = "djmd")] | |
| 24 | 24 | public string Djmd { get; set; } |
| 25 | - | |
| 25 | + | |
| 26 | 26 | /// <summary> |
| 27 | 27 | /// 金三角 |
| 28 | 28 | /// </summary> |
| 29 | - [SugarColumn(ColumnName = "jsj")] | |
| 29 | + [SugarColumn(ColumnName = "jsj")] | |
| 30 | 30 | public string Jsj { get; set; } |
| 31 | - | |
| 31 | + | |
| 32 | 32 | /// <summary> |
| 33 | 33 | /// 开单日期 |
| 34 | 34 | /// </summary> |
| 35 | - [SugarColumn(ColumnName = "kdrq")] | |
| 35 | + [SugarColumn(ColumnName = "kdrq")] | |
| 36 | 36 | public DateTime? Kdrq { get; set; } |
| 37 | - | |
| 37 | + | |
| 38 | 38 | /// <summary> |
| 39 | 39 | /// 顾客类型 |
| 40 | 40 | /// </summary> |
| 41 | - [SugarColumn(ColumnName = "gjlx")] | |
| 41 | + [SugarColumn(ColumnName = "gjlx")] | |
| 42 | 42 | public string Gjlx { get; set; } |
| 43 | - | |
| 43 | + | |
| 44 | 44 | /// <summary> |
| 45 | 45 | /// 合作机构 |
| 46 | 46 | /// </summary> |
| 47 | - [SugarColumn(ColumnName = "hgjg")] | |
| 47 | + [SugarColumn(ColumnName = "hgjg")] | |
| 48 | 48 | public string Hgjg { get; set; } |
| 49 | - | |
| 49 | + | |
| 50 | 50 | /// <summary> |
| 51 | 51 | /// 整单业绩 |
| 52 | 52 | /// </summary> |
| 53 | - [SugarColumn(ColumnName = "zdyj")] | |
| 53 | + [SugarColumn(ColumnName = "zdyj")] | |
| 54 | 54 | public decimal Zdyj { get; set; } |
| 55 | - | |
| 55 | + | |
| 56 | 56 | /// <summary> |
| 57 | 57 | /// 实付业绩 |
| 58 | 58 | /// </summary> |
| 59 | - [SugarColumn(ColumnName = "sfyj")] | |
| 59 | + [SugarColumn(ColumnName = "sfyj")] | |
| 60 | 60 | public decimal Sfyj { get; set; } |
| 61 | - | |
| 61 | + | |
| 62 | 62 | /// <summary> |
| 63 | 63 | /// 欠款 |
| 64 | 64 | /// </summary> |
| 65 | - [SugarColumn(ColumnName = "qk")] | |
| 65 | + [SugarColumn(ColumnName = "qk")] | |
| 66 | 66 | public decimal Qk { get; set; } |
| 67 | - | |
| 67 | + | |
| 68 | 68 | /// <summary> |
| 69 | 69 | /// 储扣方式 |
| 70 | 70 | /// </summary> |
| 71 | - [SugarColumn(ColumnName = "ckfs")] | |
| 71 | + [SugarColumn(ColumnName = "ckfs")] | |
| 72 | 72 | public string Ckfs { get; set; } |
| 73 | - | |
| 73 | + | |
| 74 | 74 | /// <summary> |
| 75 | 75 | /// 储扣明细 |
| 76 | 76 | /// </summary> |
| 77 | - [SugarColumn(ColumnName = "ckmx")] | |
| 77 | + [SugarColumn(ColumnName = "ckmx")] | |
| 78 | 78 | public string Ckmx { get; set; } |
| 79 | - | |
| 79 | + | |
| 80 | 80 | /// <summary> |
| 81 | 81 | /// 付款方式 |
| 82 | 82 | /// </summary> |
| 83 | - [SugarColumn(ColumnName = "fkfs")] | |
| 83 | + [SugarColumn(ColumnName = "fkfs")] | |
| 84 | 84 | public string Fkfs { get; set; } |
| 85 | - | |
| 85 | + | |
| 86 | 86 | /// <summary> |
| 87 | 87 | /// 付款医院 |
| 88 | 88 | /// </summary> |
| 89 | - [SugarColumn(ColumnName = "fkyy")] | |
| 89 | + [SugarColumn(ColumnName = "fkyy")] | |
| 90 | 90 | public string Fkyy { get; set; } |
| 91 | - | |
| 91 | + | |
| 92 | 92 | /// <summary> |
| 93 | 93 | /// 付款判断 |
| 94 | 94 | /// </summary> |
| 95 | - [SugarColumn(ColumnName = "fkpd")] | |
| 95 | + [SugarColumn(ColumnName = "fkpd")] | |
| 96 | 96 | public string Fkpd { get; set; } |
| 97 | - | |
| 97 | + | |
| 98 | 98 | /// <summary> |
| 99 | 99 | /// 客户来源 |
| 100 | 100 | /// </summary> |
| 101 | - [SugarColumn(ColumnName = "khly")] | |
| 101 | + [SugarColumn(ColumnName = "khly")] | |
| 102 | 102 | public string Khly { get; set; } |
| 103 | - | |
| 103 | + | |
| 104 | 104 | /// <summary> |
| 105 | 105 | /// 推荐人 |
| 106 | 106 | /// </summary> |
| 107 | - [SugarColumn(ColumnName = "tjr")] | |
| 107 | + [SugarColumn(ColumnName = "tjr")] | |
| 108 | 108 | public string Tjr { get; set; } |
| 109 | - | |
| 109 | + | |
| 110 | 110 | /// <summary> |
| 111 | 111 | /// 是否首开订单 |
| 112 | 112 | /// </summary> |
| 113 | - [SugarColumn(ColumnName = "sfskdd")] | |
| 113 | + [SugarColumn(ColumnName = "sfskdd")] | |
| 114 | 114 | public string Sfskdd { get; set; } |
| 115 | - | |
| 115 | + | |
| 116 | 116 | /// <summary> |
| 117 | 117 | /// 简介 |
| 118 | 118 | /// </summary> |
| 119 | - [SugarColumn(ColumnName = "jj")] | |
| 119 | + [SugarColumn(ColumnName = "jj")] | |
| 120 | 120 | public string Jj { get; set; } |
| 121 | - | |
| 121 | + | |
| 122 | 122 | /// <summary> |
| 123 | 123 | /// 上传文件 |
| 124 | 124 | /// </summary> |
| 125 | - [SugarColumn(ColumnName = "scwj")] | |
| 125 | + [SugarColumn(ColumnName = "scwj")] | |
| 126 | 126 | public string Scwj { get; set; } |
| 127 | - | |
| 127 | + | |
| 128 | 128 | /// <summary> |
| 129 | 129 | /// 会员签字 |
| 130 | 130 | /// </summary> |
| 131 | - [SugarColumn(ColumnName = "hyqz")] | |
| 131 | + [SugarColumn(ColumnName = "hyqz")] | |
| 132 | 132 | public string Hyqz { get; set; } |
| 133 | - | |
| 133 | + | |
| 134 | 134 | /// <summary> |
| 135 | 135 | /// 备注 |
| 136 | 136 | /// </summary> |
| 137 | - [SugarColumn(ColumnName = "bz")] | |
| 137 | + [SugarColumn(ColumnName = "bz")] | |
| 138 | 138 | public string Bz { get; set; } |
| 139 | - | |
| 139 | + | |
| 140 | 140 | /// <summary> |
| 141 | 141 | /// 开单会员 |
| 142 | 142 | /// </summary> |
| 143 | - [SugarColumn(ColumnName = "kdhy")] | |
| 143 | + [SugarColumn(ColumnName = "kdhy")] | |
| 144 | 144 | public string Kdhy { get; set; } |
| 145 | - | |
| 145 | + | |
| 146 | 146 | /// <summary> |
| 147 | 147 | /// 开单会员名称 |
| 148 | 148 | /// </summary> |
| 149 | - [SugarColumn(ColumnName = "kdhyc")] | |
| 149 | + [SugarColumn(ColumnName = "kdhyc")] | |
| 150 | 150 | public string Kdhyc { get; set; } |
| 151 | - | |
| 151 | + | |
| 152 | 152 | /// <summary> |
| 153 | 153 | /// 开单会员手机号 |
| 154 | 154 | /// </summary> |
| 155 | - [SugarColumn(ColumnName = "kdhysjh")] | |
| 155 | + [SugarColumn(ColumnName = "kdhysjh")] | |
| 156 | 156 | public string Kdhysjh { get; set; } |
| 157 | - | |
| 157 | + | |
| 158 | 158 | /// <summary> |
| 159 | 159 | /// 健康师业绩 |
| 160 | 160 | /// </summary> |
| 161 | - [SugarColumn(ColumnName = "jksyj")] | |
| 161 | + [SugarColumn(ColumnName = "jksyj")] | |
| 162 | 162 | public string Jksyj { get; set; } |
| 163 | - | |
| 163 | + | |
| 164 | 164 | /// <summary> |
| 165 | 165 | /// 科技部老师业绩 |
| 166 | 166 | /// </summary> |
| 167 | - [SugarColumn(ColumnName = "kjblsyj")] | |
| 167 | + [SugarColumn(ColumnName = "kjblsyj")] | |
| 168 | 168 | public string Kjblsyj { get; set; } |
| 169 | - | |
| 169 | + | |
| 170 | 170 | /// <summary> |
| 171 | 171 | /// 品项信息 |
| 172 | 172 | /// </summary> |
| 173 | - [SugarColumn(ColumnName = "pxxx")] | |
| 173 | + [SugarColumn(ColumnName = "pxxx")] | |
| 174 | 174 | public string Pxxx { get; set; } |
| 175 | 175 | |
| 176 | 176 | /// <summary> |
| 177 | 177 | /// 开单用户 |
| 178 | 178 | /// </summary> |
| 179 | - [SugarColumn(ColumnName = "F_CreateUser")] | |
| 179 | + [SugarColumn(ColumnName = "F_CreateUser")] | |
| 180 | 180 | public string CreateUser { get; set; } |
| 181 | - | |
| 181 | + | |
| 182 | 182 | /// <summary> |
| 183 | 183 | /// 方案其他 |
| 184 | 184 | /// </summary> |
| 185 | - [SugarColumn(ColumnName = "F_FIleUrl")] | |
| 185 | + [SugarColumn(ColumnName = "F_FIleUrl")] | |
| 186 | 186 | public string F_FIleUrl { get; set; } |
| 187 | - | |
| 188 | 187 | } |
| 189 | -} | |
| 190 | 188 | \ No newline at end of file |
| 189 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_kd_pxmx/LqKdPxmxEntity.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_kd_pxmx |
| 6 | 6 | { |
| ... | ... | @@ -16,68 +16,71 @@ namespace NCC.Extend.Entitys.lq_kd_pxmx |
| 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 = "glkdbh")] | |
| 23 | + [SugarColumn(ColumnName = "glkdbh")] | |
| 24 | 24 | public string Glkdbh { get; set; } |
| 25 | - | |
| 25 | + | |
| 26 | 26 | /// <summary> |
| 27 | 27 | /// 品项 |
| 28 | 28 | /// </summary> |
| 29 | - [SugarColumn(ColumnName = "px")] | |
| 29 | + [SugarColumn(ColumnName = "px")] | |
| 30 | 30 | public string Px { get; set; } |
| 31 | - | |
| 31 | + | |
| 32 | 32 | /// <summary> |
| 33 | 33 | /// 品项名称 |
| 34 | 34 | /// </summary> |
| 35 | - [SugarColumn(ColumnName = "pxmc")] | |
| 35 | + [SugarColumn(ColumnName = "pxmc")] | |
| 36 | 36 | public string Pxmc { get; set; } |
| 37 | - | |
| 37 | + | |
| 38 | 38 | /// <summary> |
| 39 | 39 | /// 品项价格 |
| 40 | 40 | /// </summary> |
| 41 | - [SugarColumn(ColumnName = "pxjg")] | |
| 41 | + [SugarColumn(ColumnName = "pxjg")] | |
| 42 | 42 | public decimal Pxjg { get; set; } |
| 43 | 43 | |
| 44 | 44 | /// <summary> |
| 45 | 45 | /// 会员id |
| 46 | 46 | /// </summary> |
| 47 | - [SugarColumn(ColumnName = "F_MemberId")] | |
| 47 | + [SugarColumn(ColumnName = "F_MemberId")] | |
| 48 | 48 | public string MemberId { get; set; } |
| 49 | 49 | |
| 50 | 50 | /// <summary> |
| 51 | 51 | /// 创建时间 |
| 52 | 52 | /// </summary> |
| 53 | - [SugarColumn(ColumnName = "F_CreateTIme")] | |
| 53 | + [SugarColumn(ColumnName = "F_CreateTIme")] | |
| 54 | 54 | public DateTime? CreateTIme { get; set; } |
| 55 | 55 | |
| 56 | 56 | /// <summary> |
| 57 | 57 | /// 项目次数 |
| 58 | 58 | /// </summary> |
| 59 | - [SugarColumn(ColumnName = "F_ProjectNumber")] | |
| 59 | + [SugarColumn(ColumnName = "F_ProjectNumber")] | |
| 60 | 60 | public int? ProjectNumber { get; set; } |
| 61 | 61 | |
| 62 | 62 | /// <summary> |
| 63 | 63 | /// 是否有效 |
| 64 | 64 | /// </summary> |
| 65 | - [SugarColumn(ColumnName = "F_IsEnabled")] | |
| 65 | + [SugarColumn(ColumnName = "F_IsEnabled")] | |
| 66 | 66 | public int? IsEnabled { get; set; } |
| 67 | 67 | |
| 68 | - | |
| 69 | 68 | /// <summary> |
| 70 | 69 | /// 来源类型 |
| 71 | 70 | /// </summary> |
| 72 | - [SugarColumn(ColumnName = "F_SourceType")] | |
| 71 | + [SugarColumn(ColumnName = "F_SourceType")] | |
| 73 | 72 | public string SourceType { get; set; } |
| 74 | 73 | |
| 75 | - | |
| 76 | 74 | /// <summary> |
| 77 | 75 | /// 金额合计 |
| 78 | 76 | /// </summary> |
| 79 | - [SugarColumn(ColumnName = "F_TotalPrice")] | |
| 77 | + [SugarColumn(ColumnName = "F_TotalPrice")] | |
| 80 | 78 | public decimal TotalPrice { get; set; } |
| 81 | - | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 实付金额 | |
| 82 | + /// </summary> | |
| 83 | + [SugarColumn(ColumnName = "F_ActualPrice")] | |
| 84 | + public decimal ActualPrice { get; set; } | |
| 82 | 85 | } |
| 83 | -} | |
| 84 | 86 | \ No newline at end of file |
| 87 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_khxx/LqKhxxEntity.cs
| ... | ... | @@ -160,5 +160,11 @@ namespace NCC.Extend.Entitys.lq_khxx |
| 160 | 160 | /// </summary> |
| 161 | 161 | [SugarColumn(ColumnName = "ml")] |
| 162 | 162 | public string Ml { get; set; } |
| 163 | + | |
| 164 | + /// <summary> | |
| 165 | + /// 添加时间 | |
| 166 | + /// </summary> | |
| 167 | + [SugarColumn(ColumnName = "F_CreateTime")] | |
| 168 | + public string CreateTime { get; set; } | |
| 163 | 169 | } |
| 164 | 170 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_tkjlb/LqTkjlbEntity.cs
| ... | ... | @@ -64,7 +64,13 @@ namespace NCC.Extend.Entitys.lq_tkjlb |
| 64 | 64 | public string Bz { get; set; } |
| 65 | 65 | |
| 66 | 66 | /// <summary> |
| 67 | - /// 所属门店 | |
| 67 | + /// 拓客活动id | |
| 68 | + /// </summary> | |
| 69 | + [SugarColumn(ColumnName = "F_EventId")] | |
| 70 | + public string EventId { get; set; } | |
| 71 | + | |
| 72 | + /// <summary> | |
| 73 | + /// 所属组织 | |
| 68 | 74 | /// </summary> |
| 69 | 75 | [SugarColumn(ColumnName = "ssmd")] |
| 70 | 76 | public string Ssmd { get; set; } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqKhxxService.cs
| 1 | -namespace NCC.Extend.Interfaces.LqKhxx | |
| 1 | +using System.Threading.Tasks; | |
| 2 | +using NCC.Common.Filter; | |
| 3 | +using NCC.Extend.Entitys.Dto.LqKhxx; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Interfaces.LqKhxx | |
| 2 | 6 | { |
| 3 | 7 | public interface ILqKhxxService |
| 4 | 8 | { |
| 9 | + /// <summary> | |
| 10 | + /// 获取线索池客户列表 | |
| 11 | + /// </summary> | |
| 12 | + /// <param name="input">查询参数</param> | |
| 13 | + /// <returns>线索池客户列表</returns> | |
| 14 | + Task<PageResult<LqKhxxListOutput>> GetLeadsPoolList(LqKhxxListQueryInput input); | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// 获取客户订单类型(首单/升单) | |
| 18 | + /// </summary> | |
| 19 | + /// <param name="customerId">客户ID</param> | |
| 20 | + /// <returns>客户订单类型信息</returns> | |
| 21 | + Task<LqKhxxOrderTypeOutput> GetCustomerOrderType(string customerId); | |
| 5 | 22 | } |
| 6 | -} | |
| 7 | 23 | \ No newline at end of file |
| 24 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
netcore/src/Modularity/Extend/NCC.Extend/LqKhxxService.cs
| ... | ... | @@ -130,6 +130,7 @@ namespace NCC.Extend.LqKhxx |
| 130 | 130 | yanglsr = it.Yanglsr, |
| 131 | 131 | yinlsr = it.Yinlsr, |
| 132 | 132 | ml = it.Ml, |
| 133 | + createTime = it.CreateTime, | |
| 133 | 134 | }) |
| 134 | 135 | .MergeTable() |
| 135 | 136 | .OrderBy(sidx + " " + input.sort) |
| ... | ... | @@ -148,6 +149,12 @@ namespace NCC.Extend.LqKhxx |
| 148 | 149 | public async Task Create([FromBody] LqKhxxCrInput input) |
| 149 | 150 | { |
| 150 | 151 | var userInfo = await _userManager.GetUserInfo(); |
| 152 | + //判断手机号是否存在 | |
| 153 | + var user = _db.Queryable<LqKhxxEntity>().Where(u => u.Sjh == input.sjh).Any(); | |
| 154 | + if (user) | |
| 155 | + { | |
| 156 | + throw NCCException.Oh("该会员已存在"); | |
| 157 | + } | |
| 151 | 158 | var entity = input.Adapt<LqKhxxEntity>(); |
| 152 | 159 | entity.Id = YitIdHelper.NextId().ToString(); |
| 153 | 160 | var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); |
| ... | ... | @@ -235,6 +242,7 @@ namespace NCC.Extend.LqKhxx |
| 235 | 242 | yanglsr = it.Yanglsr, |
| 236 | 243 | yinlsr = it.Yinlsr, |
| 237 | 244 | ml = it.Ml, |
| 245 | + createTime = it.CreateTime, | |
| 238 | 246 | }) |
| 239 | 247 | .MergeTable() |
| 240 | 248 | .OrderBy(sidx + " " + input.sort) |
| ... | ... | @@ -243,6 +251,132 @@ namespace NCC.Extend.LqKhxx |
| 243 | 251 | } |
| 244 | 252 | #endregion |
| 245 | 253 | |
| 254 | + #region 获取线索池客户列表 | |
| 255 | + /// <summary> | |
| 256 | + /// 获取线索池客户列表 | |
| 257 | + /// </summary> | |
| 258 | + /// <param name="input">查询参数</param> | |
| 259 | + /// <returns>线索池客户列表</returns> | |
| 260 | + [HttpGet("leads-pool")] | |
| 261 | + public async Task<PageResult<LqKhxxListOutput>> GetLeadsPoolList([FromQuery] LqKhxxListQueryInput input) | |
| 262 | + { | |
| 263 | + var sidx = input.sidx == null ? "id" : input.sidx; | |
| 264 | + List<string> queryZjdlsj = input.zjdlsj != null ? input.zjdlsj.Split(',').ToObeject<List<string>>() : null; | |
| 265 | + DateTime? startZjdlsj = queryZjdlsj != null ? Ext.GetDateTime(queryZjdlsj.First()) : null; | |
| 266 | + DateTime? endZjdlsj = queryZjdlsj != null ? Ext.GetDateTime(queryZjdlsj.Last()) : null; | |
| 267 | + List<string> queryZcsj = input.zcsj != null ? input.zcsj.Split(',').ToObeject<List<string>>() : null; | |
| 268 | + DateTime? startZcsj = queryZcsj != null ? Ext.GetDateTime(queryZcsj.First()) : null; | |
| 269 | + DateTime? endZcsj = queryZcsj != null ? Ext.GetDateTime(queryZcsj.Last()) : null; | |
| 270 | + List<string> queryYanglsr = input.yanglsr != null ? input.yanglsr.Split(',').ToObeject<List<string>>() : null; | |
| 271 | + DateTime? startYanglsr = queryYanglsr != null ? Ext.GetDateTime(queryYanglsr.First()) : null; | |
| 272 | + DateTime? endYanglsr = queryYanglsr != null ? Ext.GetDateTime(queryYanglsr.Last()) : null; | |
| 273 | + List<string> queryYinlsr = input.yinlsr != null ? input.yinlsr.Split(',').ToObeject<List<string>>() : null; | |
| 274 | + DateTime? startYinlsr = queryYinlsr != null ? Ext.GetDateTime(queryYinlsr.First()) : null; | |
| 275 | + DateTime? endYinlsr = queryYinlsr != null ? Ext.GetDateTime(queryYinlsr.Last()) : null; | |
| 276 | + | |
| 277 | + var data = await _db.Queryable<LqKhxxEntity>() | |
| 278 | + .Where(p => p.Khmqgs == "线索池") // 固定查询线索池客户 | |
| 279 | + .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id)) | |
| 280 | + .WhereIF(!string.IsNullOrEmpty(input.khmc), p => p.Khmc.Contains(input.khmc)) | |
| 281 | + .WhereIF(!string.IsNullOrEmpty(input.sjh), p => p.Sjh.Contains(input.sjh)) | |
| 282 | + .WhereIF(!string.IsNullOrEmpty(input.dah), p => p.Dah.Contains(input.dah)) | |
| 283 | + .WhereIF(!string.IsNullOrEmpty(input.xb), p => p.Xb.Equals(input.xb)) | |
| 284 | + .WhereIF(!string.IsNullOrEmpty(input.gzhzt), p => p.Gzhzt.Equals(input.gzhzt)) | |
| 285 | + .WhereIF(!string.IsNullOrEmpty(input.wxnc), p => p.Wxnc.Contains(input.wxnc)) | |
| 286 | + .WhereIF(!string.IsNullOrEmpty(input.wxxcxzt), p => p.Wxxcxzt.Equals(input.wxxcxzt)) | |
| 287 | + .WhereIF(!string.IsNullOrEmpty(input.khmqgs), p => p.Khmqgs.Equals(input.khmqgs)) | |
| 288 | + .WhereIF(!string.IsNullOrEmpty(input.gsmd), p => p.Gsmd.Contains(input.gsmd)) | |
| 289 | + .WhereIF(queryZcsj != null, p => p.Zcsj >= new DateTime(startZcsj.ToDate().Year, startZcsj.ToDate().Month, startZcsj.ToDate().Day, 0, 0, 0)) | |
| 290 | + .WhereIF(queryZcsj != null, p => p.Zcsj <= new DateTime(endZcsj.ToDate().Year, endZcsj.ToDate().Month, endZcsj.ToDate().Day, 23, 59, 59)) | |
| 291 | + .WhereIF(!string.IsNullOrEmpty(input.khlx), p => p.Khlx.Equals(input.khlx)) | |
| 292 | + .WhereIF(!string.IsNullOrEmpty(input.khjd), p => p.Khjd.Equals(input.khjd)) | |
| 293 | + .WhereIF(!string.IsNullOrEmpty(input.khxf), p => p.Khxf.Contains(input.khxf)) | |
| 294 | + .WhereIF(!string.IsNullOrEmpty(input.xfpc), p => p.Xfpc.Equals(input.xfpc)) | |
| 295 | + .WhereIF(!string.IsNullOrEmpty(input.tjr), p => p.Tjr.Contains(input.tjr)) | |
| 296 | + .WhereIF(!string.IsNullOrEmpty(input.fzgw), p => p.Fzgw.Contains(input.fzgw)) | |
| 297 | + .WhereIF(!string.IsNullOrEmpty(input.mrs), p => p.Mrs.Contains(input.mrs)) | |
| 298 | + .WhereIF(!string.IsNullOrEmpty(input.jdqd), p => p.Jdqd.Contains(input.jdqd)) | |
| 299 | + .WhereIF(!string.IsNullOrEmpty(input.lxdz), p => p.Lxdz.Contains(input.lxdz)) | |
| 300 | + .WhereIF(!string.IsNullOrEmpty(input.bz), p => p.Bz.Contains(input.bz)) | |
| 301 | + .WhereIF(queryYanglsr != null, p => p.Yanglsr >= new DateTime(startYanglsr.ToDate().Year, startYanglsr.ToDate().Month, startYanglsr.ToDate().Day, 0, 0, 0)) | |
| 302 | + .WhereIF(queryYanglsr != null, p => p.Yanglsr <= new DateTime(endYanglsr.ToDate().Year, endYanglsr.ToDate().Month, endYanglsr.ToDate().Day, 23, 59, 59)) | |
| 303 | + .WhereIF(queryYinlsr != null, p => p.Yinlsr >= new DateTime(startYinlsr.ToDate().Year, startYinlsr.ToDate().Month, startYinlsr.ToDate().Day, 0, 0, 0)) | |
| 304 | + .WhereIF(queryYinlsr != null, p => p.Yinlsr <= new DateTime(endYinlsr.ToDate().Year, endYinlsr.ToDate().Month, endYinlsr.ToDate().Day, 23, 59, 59)) | |
| 305 | + .WhereIF(!string.IsNullOrEmpty(input.ml), p => p.Ml.Contains(input.ml)) | |
| 306 | + .Select(it => new LqKhxxListOutput | |
| 307 | + { | |
| 308 | + id = it.Id, | |
| 309 | + khmc = it.Khmc, | |
| 310 | + sjh = it.Sjh, | |
| 311 | + dah = it.Dah, | |
| 312 | + xb = it.Xb, | |
| 313 | + gzhzt = it.Gzhzt, | |
| 314 | + wxnc = it.Wxnc, | |
| 315 | + wxxcxzt = it.Wxxcxzt, | |
| 316 | + zjdlsj = it.Zjdlsj, | |
| 317 | + khmqgs = it.Khmqgs, | |
| 318 | + gsmd = it.Gsmd, | |
| 319 | + zcsj = it.Zcsj, | |
| 320 | + khlx = it.Khlx, | |
| 321 | + khjd = it.Khjd, | |
| 322 | + khxf = it.Khxf, | |
| 323 | + xfpc = it.Xfpc, | |
| 324 | + tjr = it.Tjr, | |
| 325 | + fzgw = it.Fzgw, | |
| 326 | + mrs = it.Mrs, | |
| 327 | + jdqd = it.Jdqd, | |
| 328 | + lxdz = it.Lxdz, | |
| 329 | + bz = it.Bz, | |
| 330 | + yanglsr = it.Yanglsr, | |
| 331 | + yinlsr = it.Yinlsr, | |
| 332 | + ml = it.Ml, | |
| 333 | + createTime = it.CreateTime, | |
| 334 | + }) | |
| 335 | + .MergeTable() | |
| 336 | + .OrderBy(sidx + " " + input.sort) | |
| 337 | + .ToPagedListAsync(input.currentPage, input.pageSize); | |
| 338 | + return PageResult<LqKhxxListOutput>.SqlSugarPageResult(data); | |
| 339 | + } | |
| 340 | + #endregion | |
| 341 | + | |
| 342 | + #region 获取客户订单类型(首单/升单) | |
| 343 | + /// <summary> | |
| 344 | + /// 获取客户订单类型(首单/升单) | |
| 345 | + /// </summary> | |
| 346 | + /// <param name="customerId">客户ID</param> | |
| 347 | + /// <returns>客户订单类型信息</returns> | |
| 348 | + [HttpGet("order-type/{customerId}")] | |
| 349 | + public async Task<LqKhxxOrderTypeOutput> GetCustomerOrderType(string customerId) | |
| 350 | + { | |
| 351 | + if (string.IsNullOrEmpty(customerId)) | |
| 352 | + { | |
| 353 | + throw NCCException.Oh("客户ID不能为空"); | |
| 354 | + } | |
| 355 | + | |
| 356 | + // 查询客户是否存在 | |
| 357 | + var customerExists = await _db.Queryable<LqKhxxEntity>().Where(c => c.Id == customerId).AnyAsync(); | |
| 358 | + | |
| 359 | + if (!customerExists) | |
| 360 | + { | |
| 361 | + throw NCCException.Oh("客户不存在"); | |
| 362 | + } | |
| 363 | + | |
| 364 | + // 查询开单记录数量 | |
| 365 | + var orderCount = await _db.Queryable<LqKdKdjlbEntity>().Where(o => o.Kdhy == customerId).CountAsync(); | |
| 366 | + | |
| 367 | + var hasOrderRecord = orderCount > 0; | |
| 368 | + var orderType = hasOrderRecord ? "repeat_order" : "first_order"; | |
| 369 | + | |
| 370 | + return new LqKhxxOrderTypeOutput | |
| 371 | + { | |
| 372 | + CustomerId = customerId, | |
| 373 | + OrderType = orderType, | |
| 374 | + HasOrderRecord = hasOrderRecord, | |
| 375 | + OrderCount = orderCount, | |
| 376 | + }; | |
| 377 | + } | |
| 378 | + #endregion | |
| 379 | + | |
| 246 | 380 | #region 导出客户资料 |
| 247 | 381 | /// <summary> |
| 248 | 382 | /// 导出客户资料 | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqTkjlbService.cs
| ... | ... | @@ -16,6 +16,8 @@ using NCC.DataEncryption; |
| 16 | 16 | using NCC.Dependency; |
| 17 | 17 | using NCC.DynamicApiController; |
| 18 | 18 | using NCC.Extend.Entitys.Dto.LqTkjlb; |
| 19 | +using NCC.Extend.Entitys.lq_eventuser; | |
| 20 | +using NCC.Extend.Entitys.lq_khxx; | |
| 19 | 21 | using NCC.Extend.Entitys.lq_ryzl; |
| 20 | 22 | using NCC.Extend.Entitys.lq_tkjlb; |
| 21 | 23 | using NCC.Extend.Interfaces.LqTkjlb; |
| ... | ... | @@ -123,19 +125,41 @@ namespace NCC.Extend.LqTkjlb |
| 123 | 125 | public async Task Create([FromBody] LqTkjlbCrInput input) |
| 124 | 126 | { |
| 125 | 127 | var userInfo = await _userManager.GetUserInfo(); |
| 126 | - var entity = input.Adapt<LqTkjlbEntity>(); | |
| 127 | - entity.Id = YitIdHelper.NextId().ToString(); | |
| 128 | - string mobile = _db.Queryable<UserEntity>().Where(u => u.Id == input.tkry).Select(u => u.MobilePhone).First(); | |
| 129 | - var ry = _db.Queryable<LqRyzlEntity>().Where(u => u.Sjh == mobile).First(); | |
| 130 | - if (ry != null) | |
| 128 | + //通过input.dhhm去查询用户信息 | |
| 129 | + var user = _db.Queryable<LqKhxxEntity>().Where(u => u.Sjh == input.dhhm).Any(); | |
| 130 | + if (user) | |
| 131 | 131 | { |
| 132 | - entity.Ssmd = ry.Dm == null ? "" : ry.Dm; | |
| 133 | - entity.Sszd = ry.Zd == null ? "" : ry.Zd; | |
| 132 | + throw NCCException.Oh("该手机号码已存在于会员或线索池中"); | |
| 134 | 133 | } |
| 134 | + // 使用事务确保数据一致性 | |
| 135 | + var result = await _db.Ado.UseTranAsync(async () => | |
| 136 | + { | |
| 137 | + //通过input.eventId去查询拓客活动信息 | |
| 138 | + var eventUserInfo = await _db.Queryable<LqEventUserEntity>().Where(u => u.EventId == input.eventId && u.UserId == input.tkry).FirstAsync(); | |
| 139 | + // 创建拓客记录 | |
| 140 | + var entity = input.Adapt<LqTkjlbEntity>(); | |
| 141 | + entity.Id = YitIdHelper.NextId().ToString(); | |
| 142 | + entity.Sszd = eventUserInfo.TeamName; | |
| 143 | + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); | |
| 144 | + if (!(isOk > 0)) | |
| 145 | + throw NCCException.Oh("创建拓客记录失败"); | |
| 146 | + // 创建客户信息 | |
| 147 | + LqKhxxEntity MemberInfo = new LqKhxxEntity(); | |
| 148 | + MemberInfo.Id = YitIdHelper.NextId().ToString(); | |
| 149 | + MemberInfo.Khmc = entity.Gkxm; | |
| 150 | + MemberInfo.Sjh = input.dhhm; // 设置手机号 | |
| 151 | + MemberInfo.Khmqgs = "线索池"; | |
| 152 | + MemberInfo.Dah = "GK" + DateTime.Now.ToString("yyyyMMddHHmmss"); | |
| 153 | + var memberResult = await _db.Insertable(MemberInfo).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); | |
| 154 | + if (!(memberResult > 0)) | |
| 155 | + throw NCCException.Oh("创建客户信息失败"); | |
| 156 | + return true; | |
| 157 | + }); | |
| 135 | 158 | |
| 136 | - var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); | |
| 137 | - if (!(isOk > 0)) | |
| 138 | - throw NCCException.Oh(ErrorCode.COM1000); | |
| 159 | + if (!result.IsSuccess) | |
| 160 | + { | |
| 161 | + throw NCCException.Oh($"创建拓客记录失败:{result.ErrorMessage}"); | |
| 162 | + } | |
| 139 | 163 | } |
| 140 | 164 | #endregion |
| 141 | 165 | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqYcsdJsjService.cs
| 1 | -using NCC.Common.Core.Manager; | |
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using System.Globalization; | |
| 4 | +using System.Linq; | |
| 5 | +using System.Threading.Tasks; | |
| 6 | +using Mapster; | |
| 7 | +using Microsoft.AspNetCore.Mvc; | |
| 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.LqYcsdJsj; | |
| 9 | -using Mapster; | |
| 10 | -using Microsoft.AspNetCore.Mvc; | |
| 11 | -using SqlSugar; | |
| 12 | -using System; | |
| 13 | -using System.Collections.Generic; | |
| 14 | -using System.Globalization; | |
| 15 | -using System.Linq; | |
| 16 | -using System.Threading.Tasks; | |
| 17 | -using NCC.Extend.Entitys.lq_ycsd_jsj; | |
| 19 | +using NCC.Extend.Entitys.Dto.LqYcsdJsj; | |
| 18 | 20 | using NCC.Extend.Entitys.lq_jinsanjiao_user; |
| 19 | -using NCC.Extend.Entitys.lq_mdxx; | |
| 20 | 21 | using NCC.Extend.Entitys.lq_kd_jksyj; |
| 21 | -using NCC.Extend.Entitys.Dto.LqYcsdJsj; | |
| 22 | -using Yitter.IdGenerator; | |
| 23 | -using NCC.Common.Helper; | |
| 22 | +using NCC.Extend.Entitys.lq_mdxx; | |
| 23 | +using NCC.Extend.Entitys.lq_ycsd_jsj; | |
| 24 | +using NCC.Extend.Interfaces.LqYcsdJsj; | |
| 25 | +using NCC.FriendlyException; | |
| 24 | 26 | using NCC.JsonSerialization; |
| 25 | -using NCC.Common.Model.NPOI; | |
| 26 | -using NCC.Common.Configuration; | |
| 27 | -using NCC.DataEncryption; | |
| 28 | -using NCC.ClayObject; | |
| 27 | +using SqlSugar; | |
| 28 | +using Yitter.IdGenerator; | |
| 29 | 29 | |
| 30 | 30 | namespace NCC.Extend.LqYcsdJsj |
| 31 | 31 | { |
| ... | ... | @@ -43,7 +43,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 43 | 43 | /// <summary> |
| 44 | 44 | /// 初始化一个<see cref="LqYcsdJsjService"/>类型的新实例 |
| 45 | 45 | /// </summary> |
| 46 | - public LqYcsdJsjService(ISqlSugarRepository<LqYcsdJsjEntity> lqYcsdJsjRepository,IUserManager userManager) | |
| 46 | + public LqYcsdJsjService(ISqlSugarRepository<LqYcsdJsjEntity> lqYcsdJsjRepository, IUserManager userManager) | |
| 47 | 47 | { |
| 48 | 48 | _lqYcsdJsjRepository = lqYcsdJsjRepository; |
| 49 | 49 | _db = _lqYcsdJsjRepository.Context; |
| ... | ... | @@ -75,7 +75,8 @@ namespace NCC.Extend.LqYcsdJsj |
| 75 | 75 | public async Task<dynamic> GetDetail(string id) |
| 76 | 76 | { |
| 77 | 77 | var entity = await _db.Queryable<LqYcsdJsjEntity>().FirstAsync(p => p.Id == id); |
| 78 | - if (entity == null) throw NCCException.Oh(ErrorCode.COM1005); | |
| 78 | + if (entity == null) | |
| 79 | + throw NCCException.Oh(ErrorCode.COM1005); | |
| 79 | 80 | |
| 80 | 81 | var output = entity.Adapt<LqYcsdJsjInfoOutput>(); |
| 81 | 82 | |
| ... | ... | @@ -90,24 +91,20 @@ namespace NCC.Extend.LqYcsdJsj |
| 90 | 91 | userName = x.UserName, |
| 91 | 92 | isLeader = x.IsLeader, |
| 92 | 93 | sortOrder = x.SortOrder, |
| 93 | - status = x.Status | |
| 94 | + status = x.Status, | |
| 94 | 95 | }) |
| 95 | 96 | .ToListAsync(); |
| 96 | 97 | |
| 97 | - return new | |
| 98 | - { | |
| 99 | - jsj = output, | |
| 100 | - members = members | |
| 101 | - }; | |
| 98 | + return new { jsj = output, members = members }; | |
| 102 | 99 | } |
| 103 | 100 | #endregion |
| 104 | 101 | |
| 105 | 102 | #region 获取金三角设定列表 |
| 106 | 103 | /// <summary> |
| 107 | - /// 获取金三角设定列表 | |
| 108 | - /// </summary> | |
| 109 | - /// <param name="input">请求参数</param> | |
| 110 | - /// <returns></returns> | |
| 104 | + /// 获取金三角设定列表 | |
| 105 | + /// </summary> | |
| 106 | + /// <param name="input">请求参数</param> | |
| 107 | + /// <returns></returns> | |
| 111 | 108 | [HttpGet("")] |
| 112 | 109 | public async Task<dynamic> GetList([FromQuery] LqYcsdJsjListQueryInput input) |
| 113 | 110 | { |
| ... | ... | @@ -122,8 +119,11 @@ namespace NCC.Extend.LqYcsdJsj |
| 122 | 119 | id = it.Id, |
| 123 | 120 | yf = it.Yf, |
| 124 | 121 | md = it.Md, |
| 125 | - jsj = it.Jsj | |
| 126 | - }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 122 | + jsj = it.Jsj, | |
| 123 | + }) | |
| 124 | + .MergeTable() | |
| 125 | + .OrderBy(sidx + " " + input.sort) | |
| 126 | + .ToPagedListAsync(input.currentPage, input.pageSize); | |
| 127 | 127 | return PageResult<LqYcsdJsjListOutput>.SqlSugarPageResult(data); |
| 128 | 128 | } |
| 129 | 129 | #endregion |
| ... | ... | @@ -143,8 +143,10 @@ namespace NCC.Extend.LqYcsdJsj |
| 143 | 143 | id = it.Id, |
| 144 | 144 | yf = it.Yf, |
| 145 | 145 | md = it.Md, |
| 146 | - jsj = it.Jsj | |
| 147 | - }).MergeTable().ToListAsync(); | |
| 146 | + jsj = it.Jsj, | |
| 147 | + }) | |
| 148 | + .MergeTable() | |
| 149 | + .ToListAsync(); | |
| 148 | 150 | return data; |
| 149 | 151 | } |
| 150 | 152 | #endregion |
| ... | ... | @@ -168,15 +170,15 @@ namespace NCC.Extend.LqYcsdJsj |
| 168 | 170 | if (jsjUser == null) |
| 169 | 171 | { |
| 170 | 172 | return null; |
| 171 | - } | |
| 173 | + } | |
| 172 | 174 | // 查询金三角信息 |
| 173 | - var jsj = await _db.Queryable<LqYcsdJsjEntity>().Where(x => x.Id == jsjUser.JsjId && x.Yf == currentMonth).FirstAsync(); | |
| 175 | + var jsj = await _db.Queryable<LqYcsdJsjEntity>().Where(x => x.Id == jsjUser.JsjId && x.Yf == currentMonth).FirstAsync(); | |
| 174 | 176 | if (jsj == null) |
| 175 | 177 | { |
| 176 | 178 | return null; |
| 177 | 179 | } |
| 178 | 180 | // 查询门店信息 |
| 179 | - var store = await _db.Queryable<LqMdxxEntity>() .Where(x => x.Id == jsj.Md).FirstAsync(); | |
| 181 | + var store = await _db.Queryable<LqMdxxEntity>().Where(x => x.Id == jsj.Md).FirstAsync(); | |
| 180 | 182 | return new |
| 181 | 183 | { |
| 182 | 184 | jsjId = jsj.Id, |
| ... | ... | @@ -187,7 +189,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 187 | 189 | userName = jsjUser.UserName, |
| 188 | 190 | isLeader = jsjUser.IsLeader, |
| 189 | 191 | status = jsjUser.Status, |
| 190 | - sortOrder = jsjUser.SortOrder | |
| 192 | + sortOrder = jsjUser.SortOrder, | |
| 191 | 193 | }; |
| 192 | 194 | } |
| 193 | 195 | #endregion |
| ... | ... | @@ -228,9 +230,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 228 | 230 | } |
| 229 | 231 | |
| 230 | 232 | // 验证金三角名称是否已存在 |
| 231 | - var existingJsj = await _db.Queryable<LqYcsdJsjEntity>() | |
| 232 | - .Where(x => x.Yf == input.yf && x.Md == input.md && x.Jsj == input.jsj) | |
| 233 | - .FirstAsync(); | |
| 233 | + var existingJsj = await _db.Queryable<LqYcsdJsjEntity>().Where(x => x.Yf == input.yf && x.Md == input.md && x.Jsj == input.jsj).FirstAsync(); | |
| 234 | 234 | if (existingJsj != null) |
| 235 | 235 | { |
| 236 | 236 | throw NCCException.Oh(ErrorCode.COM1000, "该门店该月份已存在同名金三角"); |
| ... | ... | @@ -239,19 +239,18 @@ namespace NCC.Extend.LqYcsdJsj |
| 239 | 239 | { |
| 240 | 240 | // 开启事务 |
| 241 | 241 | _db.BeginTran(); |
| 242 | - // 1. 创建门店T区(如果不存在) | |
| 243 | - await CreateOrUpdateStoreTArea(input.yf, input.md, userInfo.userId); | |
| 244 | - // 2. 创建金三角基础信息 | |
| 242 | + // 1. 创建金三角基础信息 | |
| 245 | 243 | var entity = input.Adapt<LqYcsdJsjEntity>(); |
| 246 | 244 | entity.Id = YitIdHelper.NextId().ToString(); |
| 247 | 245 | var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); |
| 248 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 249 | - // 3. 创建金三角成员绑定关系 | |
| 246 | + if (!(isOk > 0)) | |
| 247 | + throw NCCException.Oh(ErrorCode.COM1000); | |
| 248 | + // 2 创建金三角成员绑定关系 | |
| 250 | 249 | if (input.members != null && input.members.Count > 0) |
| 251 | 250 | { |
| 252 | 251 | await CreateJsjMembers(entity.Id, input.members, userInfo.userId); |
| 253 | 252 | } |
| 254 | - // 4. 创建站点战队T区(如果金三角不是T区且不是单人) | |
| 253 | + // 3. 创建站点战队T区(如果金三角不是T区且不是单人) | |
| 255 | 254 | if (!input.jsj.EndsWith("T区") && input.members != null && input.members.Count > 1) |
| 256 | 255 | { |
| 257 | 256 | await CreateOrUpdateTeamTArea(input.yf, input.jsj, input.md, userInfo.userId); |
| ... | ... | @@ -270,10 +269,10 @@ namespace NCC.Extend.LqYcsdJsj |
| 270 | 269 | |
| 271 | 270 | #region 获取金三角设定无分页列表 |
| 272 | 271 | /// <summary> |
| 273 | - /// 获取金三角设定无分页列表 | |
| 274 | - /// </summary> | |
| 275 | - /// <param name="input">请求参数</param> | |
| 276 | - /// <returns></returns> | |
| 272 | + /// 获取金三角设定无分页列表 | |
| 273 | + /// </summary> | |
| 274 | + /// <param name="input">请求参数</param> | |
| 275 | + /// <returns></returns> | |
| 277 | 276 | [NonAction] |
| 278 | 277 | public async Task<dynamic> GetNoPagingList([FromQuery] LqYcsdJsjListQueryInput input) |
| 279 | 278 | { |
| ... | ... | @@ -288,18 +287,21 @@ namespace NCC.Extend.LqYcsdJsj |
| 288 | 287 | id = it.Id, |
| 289 | 288 | yf = it.Yf, |
| 290 | 289 | md = it.Md, |
| 291 | - jsj = it.Jsj | |
| 292 | - }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync(); | |
| 290 | + jsj = it.Jsj, | |
| 291 | + }) | |
| 292 | + .MergeTable() | |
| 293 | + .OrderBy(sidx + " " + input.sort) | |
| 294 | + .ToListAsync(); | |
| 293 | 295 | return data; |
| 294 | 296 | } |
| 295 | 297 | #endregion |
| 296 | 298 | |
| 297 | 299 | #region 导出金三角设定 |
| 298 | 300 | /// <summary> |
| 299 | - /// 导出金三角设定 | |
| 300 | - /// </summary> | |
| 301 | - /// <param name="input">请求参数</param> | |
| 302 | - /// <returns></returns> | |
| 301 | + /// 导出金三角设定 | |
| 302 | + /// </summary> | |
| 303 | + /// <param name="input">请求参数</param> | |
| 304 | + /// <returns></returns> | |
| 303 | 305 | [HttpGet("Actions/Export")] |
| 304 | 306 | public async Task<dynamic> Export([FromQuery] LqYcsdJsjListQueryInput input) |
| 305 | 307 | { |
| ... | ... | @@ -314,7 +316,8 @@ namespace NCC.Extend.LqYcsdJsj |
| 314 | 316 | { |
| 315 | 317 | exportData = await this.GetNoPagingList(input); |
| 316 | 318 | } |
| 317 | - List<ParamsModel> paramList = "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"月份\",\"field\":\"yf\"},{\"value\":\"门店\",\"field\":\"md\"},{\"value\":\"金三角\",\"field\":\"jsj\"}]".ToList<ParamsModel>(); | |
| 319 | + List<ParamsModel> paramList = | |
| 320 | + "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"月份\",\"field\":\"yf\"},{\"value\":\"门店\",\"field\":\"md\"},{\"value\":\"金三角\",\"field\":\"jsj\"}]".ToList<ParamsModel>(); | |
| 318 | 321 | ExcelConfig excelconfig = new ExcelConfig(); |
| 319 | 322 | excelconfig.FileName = "金三角设定.xls"; |
| 320 | 323 | excelconfig.HeadFont = "微软雅黑"; |
| ... | ... | @@ -333,11 +336,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 333 | 336 | var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; |
| 334 | 337 | ExcelExportHelper<LqYcsdJsjListOutput>.Export(exportData, excelconfig, addPath); |
| 335 | 338 | var fileName = _userManager.UserId + "|" + addPath + "|xls"; |
| 336 | - var output = new | |
| 337 | - { | |
| 338 | - name = excelconfig.FileName, | |
| 339 | - url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") | |
| 340 | - }; | |
| 339 | + var output = new { name = excelconfig.FileName, url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") }; | |
| 341 | 340 | return output; |
| 342 | 341 | } |
| 343 | 342 | #endregion |
| ... | ... | @@ -385,10 +384,11 @@ namespace NCC.Extend.LqYcsdJsj |
| 385 | 384 | { |
| 386 | 385 | var entity = input.Adapt<LqYcsdJsjEntity>(); |
| 387 | 386 | var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| 388 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); | |
| 387 | + if (!(isOk > 0)) | |
| 388 | + throw NCCException.Oh(ErrorCode.COM1001); | |
| 389 | 389 | } |
| 390 | 390 | #endregion |
| 391 | - | |
| 391 | + | |
| 392 | 392 | #region 删除金三角设定 |
| 393 | 393 | /// <summary> |
| 394 | 394 | /// 删除金三角设定 |
| ... | ... | @@ -400,7 +400,8 @@ namespace NCC.Extend.LqYcsdJsj |
| 400 | 400 | var entity = await _db.Queryable<LqYcsdJsjEntity>().FirstAsync(p => p.Id == id); |
| 401 | 401 | _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); |
| 402 | 402 | var isOk = await _db.Deleteable<LqYcsdJsjEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); |
| 403 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); | |
| 403 | + if (!(isOk > 0)) | |
| 404 | + throw NCCException.Oh(ErrorCode.COM1002); | |
| 404 | 405 | } |
| 405 | 406 | #endregion |
| 406 | 407 | |
| ... | ... | @@ -424,20 +425,33 @@ namespace NCC.Extend.LqYcsdJsj |
| 424 | 425 | .WhereIF(!string.IsNullOrEmpty(month), (jsj, jksyj, md) => jsj.Yf == month) |
| 425 | 426 | .WhereIF(!string.IsNullOrEmpty(jsjId), (jsj, jksyj, md) => jsj.Id == jsjId) |
| 426 | 427 | .WhereIF(!string.IsNullOrEmpty(storeId), (jsj, jksyj, md) => jsj.Md == storeId) |
| 427 | - .GroupBy((jsj, jksyj, md) => new { jsj.Id, jsj.Jsj, jsj.Yf, jsj.Md, md.Dm }) | |
| 428 | - .Select((jsj, jksyj, md) => new | |
| 429 | - { | |
| 430 | - jsjId = jsj.Id, | |
| 431 | - jsjName = jsj.Jsj, | |
| 432 | - month = jsj.Yf, | |
| 433 | - storeId = jsj.Md, | |
| 434 | - storeName = md.Dm, | |
| 435 | - totalPerformance = SqlFunc.AggregateSum(SqlFunc.ToDecimal(jksyj.Jksyj)), | |
| 436 | - orderCount = SqlFunc.AggregateCount(jksyj.Id), | |
| 437 | - avgPerformance = SqlFunc.AggregateAvg(SqlFunc.ToDecimal(jksyj.Jksyj)), | |
| 438 | - lastOrderDate = SqlFunc.AggregateMax(jksyj.Yjsj), | |
| 439 | - firstOrderDate = SqlFunc.AggregateMin(jksyj.Yjsj) | |
| 440 | - }) | |
| 428 | + .GroupBy( | |
| 429 | + (jsj, jksyj, md) => | |
| 430 | + new | |
| 431 | + { | |
| 432 | + jsj.Id, | |
| 433 | + jsj.Jsj, | |
| 434 | + jsj.Yf, | |
| 435 | + jsj.Md, | |
| 436 | + md.Dm, | |
| 437 | + } | |
| 438 | + ) | |
| 439 | + .Select( | |
| 440 | + (jsj, jksyj, md) => | |
| 441 | + new | |
| 442 | + { | |
| 443 | + jsjId = jsj.Id, | |
| 444 | + jsjName = jsj.Jsj, | |
| 445 | + month = jsj.Yf, | |
| 446 | + storeId = jsj.Md, | |
| 447 | + storeName = md.Dm, | |
| 448 | + totalPerformance = SqlFunc.AggregateSum(SqlFunc.ToDecimal(jksyj.Jksyj)), | |
| 449 | + orderCount = SqlFunc.AggregateCount(jksyj.Id), | |
| 450 | + avgPerformance = SqlFunc.AggregateAvg(SqlFunc.ToDecimal(jksyj.Jksyj)), | |
| 451 | + lastOrderDate = SqlFunc.AggregateMax(jksyj.Yjsj), | |
| 452 | + firstOrderDate = SqlFunc.AggregateMin(jksyj.Yjsj), | |
| 453 | + } | |
| 454 | + ) | |
| 441 | 455 | .OrderBy(jsj => jsj.month, OrderByType.Desc) |
| 442 | 456 | .OrderBy(jsj => jsj.totalPerformance, OrderByType.Desc); |
| 443 | 457 | |
| ... | ... | @@ -465,35 +479,53 @@ namespace NCC.Extend.LqYcsdJsj |
| 465 | 479 | .Where((jsj, jksyj, md) => jsj.Yf == month) |
| 466 | 480 | .Where((jsj, jksyj, md) => jksyj.Yjsj != null) |
| 467 | 481 | .Where((jsj, jksyj, md) => jksyj.Jksyj != null && jksyj.Jksyj != "" && jksyj.Jksyj != "0") |
| 468 | - .GroupBy((jsj, jksyj, md) => new { jsj.Id, jsj.Jsj, jsj.Yf, jsj.Md, md.Dm }) | |
| 469 | - .Select((jsj, jksyj, md) => new | |
| 470 | - { | |
| 471 | - jsjId = jsj.Id, | |
| 472 | - jsjName = jsj.Jsj, | |
| 473 | - month = jsj.Yf, | |
| 474 | - storeId = jsj.Md, | |
| 475 | - storeName = md.Dm, | |
| 476 | - totalPerformance = SqlFunc.AggregateSum(SqlFunc.ToDecimal(jksyj.Jksyj)), | |
| 477 | - orderCount = SqlFunc.AggregateCount(jksyj.Id), | |
| 478 | - ranking = 0 // 排名将在后续计算 | |
| 479 | - }) | |
| 482 | + .GroupBy( | |
| 483 | + (jsj, jksyj, md) => | |
| 484 | + new | |
| 485 | + { | |
| 486 | + jsj.Id, | |
| 487 | + jsj.Jsj, | |
| 488 | + jsj.Yf, | |
| 489 | + jsj.Md, | |
| 490 | + md.Dm, | |
| 491 | + } | |
| 492 | + ) | |
| 493 | + .Select( | |
| 494 | + (jsj, jksyj, md) => | |
| 495 | + new | |
| 496 | + { | |
| 497 | + jsjId = jsj.Id, | |
| 498 | + jsjName = jsj.Jsj, | |
| 499 | + month = jsj.Yf, | |
| 500 | + storeId = jsj.Md, | |
| 501 | + storeName = md.Dm, | |
| 502 | + totalPerformance = SqlFunc.AggregateSum(SqlFunc.ToDecimal(jksyj.Jksyj)), | |
| 503 | + orderCount = SqlFunc.AggregateCount(jksyj.Id), | |
| 504 | + ranking = 0, // 排名将在后续计算 | |
| 505 | + } | |
| 506 | + ) | |
| 480 | 507 | .OrderBy(jsj => jsj.totalPerformance, OrderByType.Desc) |
| 481 | 508 | .Take(topCount); |
| 482 | 509 | |
| 483 | 510 | var result = await query.ToListAsync(); |
| 484 | - | |
| 511 | + | |
| 485 | 512 | // 创建包含排名的结果 |
| 486 | - var rankedResult = result.Select((item, index) => new | |
| 487 | - { | |
| 488 | - item.jsjId, | |
| 489 | - item.jsjName, | |
| 490 | - item.month, | |
| 491 | - item.storeId, | |
| 492 | - item.storeName, | |
| 493 | - item.totalPerformance, | |
| 494 | - item.orderCount, | |
| 495 | - ranking = index + 1 | |
| 496 | - }).ToList(); | |
| 513 | + var rankedResult = result | |
| 514 | + .Select( | |
| 515 | + (item, index) => | |
| 516 | + new | |
| 517 | + { | |
| 518 | + item.jsjId, | |
| 519 | + item.jsjName, | |
| 520 | + item.month, | |
| 521 | + item.storeId, | |
| 522 | + item.storeName, | |
| 523 | + item.totalPerformance, | |
| 524 | + item.orderCount, | |
| 525 | + ranking = index + 1, | |
| 526 | + } | |
| 527 | + ) | |
| 528 | + .ToList(); | |
| 497 | 529 | |
| 498 | 530 | return rankedResult; |
| 499 | 531 | } |
| ... | ... | @@ -515,9 +547,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 515 | 547 | var tAreaName = $"{storeName}T区"; |
| 516 | 548 | |
| 517 | 549 | // 检查该门店该月份是否已有T区 |
| 518 | - var existingTArea = await _db.Queryable<LqYcsdJsjEntity>() | |
| 519 | - .Where(x => x.Yf == yf && x.Md == mdId && x.Jsj == tAreaName) | |
| 520 | - .FirstAsync(); | |
| 550 | + var existingTArea = await _db.Queryable<LqYcsdJsjEntity>().Where(x => x.Yf == yf && x.Md == mdId && x.Jsj == tAreaName).FirstAsync(); | |
| 521 | 551 | |
| 522 | 552 | if (existingTArea == null) |
| 523 | 553 | { |
| ... | ... | @@ -527,7 +557,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 527 | 557 | Id = YitIdHelper.NextId().ToString(), |
| 528 | 558 | Yf = yf, |
| 529 | 559 | Md = mdId, |
| 530 | - Jsj = tAreaName | |
| 560 | + Jsj = tAreaName, | |
| 531 | 561 | }; |
| 532 | 562 | |
| 533 | 563 | await _db.Insertable(tAreaEntity).ExecuteCommandAsync(); |
| ... | ... | @@ -547,9 +577,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 547 | 577 | var tAreaName = $"{teamName}T区"; |
| 548 | 578 | |
| 549 | 579 | // 检查该战队该月份是否已有T区 |
| 550 | - var existingTArea = await _db.Queryable<LqYcsdJsjEntity>() | |
| 551 | - .Where(x => x.Yf == yf && x.Md == mdId && x.Jsj == tAreaName) | |
| 552 | - .FirstAsync(); | |
| 580 | + var existingTArea = await _db.Queryable<LqYcsdJsjEntity>().Where(x => x.Yf == yf && x.Md == mdId && x.Jsj == tAreaName).FirstAsync(); | |
| 553 | 581 | |
| 554 | 582 | if (existingTArea == null) |
| 555 | 583 | { |
| ... | ... | @@ -559,7 +587,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 559 | 587 | Id = YitIdHelper.NextId().ToString(), |
| 560 | 588 | Yf = yf, |
| 561 | 589 | Md = mdId, |
| 562 | - Jsj = tAreaName | |
| 590 | + Jsj = tAreaName, | |
| 563 | 591 | }; |
| 564 | 592 | |
| 565 | 593 | await _db.Insertable(tAreaEntity).ExecuteCommandAsync(); |
| ... | ... | @@ -592,7 +620,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 592 | 620 | CreatorTime = DateTime.Now, |
| 593 | 621 | CreatorUserId = creatorUserId, |
| 594 | 622 | DeleteMark = 0, |
| 595 | - Month = DateTime.Now.ToString("yyyyMM") | |
| 623 | + Month = DateTime.Now.ToString("yyyyMM"), | |
| 596 | 624 | }; |
| 597 | 625 | |
| 598 | 626 | memberEntities.Add(memberEntity); |
| ... | ... | @@ -613,10 +641,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 613 | 641 | { |
| 614 | 642 | try |
| 615 | 643 | { |
| 616 | - var storeName = await _db.Queryable<LqMdxxEntity>() | |
| 617 | - .Where(x => x.Id == mdId) | |
| 618 | - .Select(x => x.Dm) | |
| 619 | - .FirstAsync(); | |
| 644 | + var storeName = await _db.Queryable<LqMdxxEntity>().Where(x => x.Id == mdId).Select(x => x.Dm).FirstAsync(); | |
| 620 | 645 | return string.IsNullOrEmpty(storeName) ? "未知门店" : storeName; |
| 621 | 646 | } |
| 622 | 647 | catch | ... | ... |