Commit 2ce7c3cb9ee0f25fde733e892f218337d2ea2332
1 parent
87c8adf4
更新门店目标设定相关功能,新增字段以支持门店目标信息,删除不再使用的会员管理相关代码,优化项目结构和文件管理,确保代码整洁和功能完整性。
Showing
58 changed files
with
2469 additions
and
2566 deletions
.DS_Store
No preview for this file type
README.md
| ... | ... | @@ -67,7 +67,6 @@ lvqianmeiye_ERP/ |
| 67 | 67 | #### 📋 基础管理类 |
| 68 | 68 | - `LqBmzbService` - 部门管理服务 |
| 69 | 69 | - `LqCpxxService` - 产品信息管理服务 |
| 70 | -- `LqHyglService` - 会员管理服务 | |
| 71 | 70 | - `LqKhxxService` - 客户信息管理服务 |
| 72 | 71 | - `LqRyzlService` - 人员资料管理服务 |
| 73 | 72 | |
| ... | ... | @@ -176,7 +175,6 @@ npm run dev |
| 176 | 175 | ### 📋 基础管理模块 |
| 177 | 176 | - **部门管理** (`LqBmzbService`) - 组织架构管理,部门分类维护 |
| 178 | 177 | - **产品信息** (`LqCpxxService`) - 产品档案管理,产品分类维护 |
| 179 | -- **会员管理** (`LqHyglService`) - 客户信息管理,会员等级维护 | |
| 180 | 178 | - **客户信息** (`LqKhxxService`) - 客户档案管理,客户关系维护 |
| 181 | 179 | - **人员资料** (`LqRyzlService`) - 员工信息管理,人员档案维护 |
| 182 | 180 | ... | ... |
antis-ncc-admin/.DS_Store
No preview for this file type
antis-ncc-admin/.env.development
antis-ncc-admin/src/api/extend/lqZjlMdsmxsz.js
| ... | ... | @@ -45,14 +45,33 @@ export const lqZjlMdsmxszApi = { |
| 45 | 45 | */ |
| 46 | 46 | getZjlUserList(params) { |
| 47 | 47 | return request({ |
| 48 | - url: '/api/Extend/User', | |
| 48 | + url: '/api/Extend/User/ManagerSelector', | |
| 49 | + method: 'GET' | |
| 50 | + }) | |
| 51 | + }, | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 获取所有总经理门店生命线设置数据(分页查询) | |
| 55 | + * @param {Object} params 查询参数 | |
| 56 | + */ | |
| 57 | + getPageList(params) { | |
| 58 | + return request({ | |
| 59 | + url: '/api/Extend/LqZjlMdsmxsz/GetPageList', | |
| 49 | 60 | method: 'GET', |
| 50 | - data: { | |
| 51 | - gw: '总经理', | |
| 52 | - pageNum: 1, | |
| 53 | - pageSize: 1000, | |
| 54 | - ...params | |
| 55 | - } | |
| 61 | + params: params | |
| 62 | + }) | |
| 63 | + }, | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 更新总经理门店生命线设置 | |
| 67 | + * @param {string} id 记录ID | |
| 68 | + * @param {Object} data 更新数据 | |
| 69 | + */ | |
| 70 | + update(id, data) { | |
| 71 | + return request({ | |
| 72 | + url: `/api/Extend/LqZjlMdsmxsz/${id}`, | |
| 73 | + method: 'PUT', | |
| 74 | + data | |
| 56 | 75 | }) |
| 57 | 76 | } |
| 58 | 77 | } | ... | ... |
antis-ncc-admin/src/views/lqHygl/Form.vue deleted
| 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="600px"> | |
| 3 | - <el-row :gutter="15" class="" > | |
| 4 | - <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | - <el-col :span="24" v-if="false" > | |
| 6 | - <el-form-item label="会员编号" prop="id"> | |
| 7 | - <el-input v-model="dataForm.id" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 8 | - </el-input> | |
| 9 | - </el-form-item> | |
| 10 | - </el-col> | |
| 11 | - <el-col :span="24"> | |
| 12 | - <el-form-item label="姓名" prop="xm"> | |
| 13 | - <el-input v-model="dataForm.xm" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | - </el-input> | |
| 15 | - </el-form-item> | |
| 16 | - </el-col> | |
| 17 | - <el-col :span="24"> | |
| 18 | - <el-form-item label="性别" prop="xb"> | |
| 19 | - <el-select v-model="dataForm.xb" placeholder="请选择" clearable :style='{"width":"100%"}' > | |
| 20 | - <el-option v-for="(item, index) in xbOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option> | |
| 21 | - </el-select> | |
| 22 | - </el-form-item> | |
| 23 | - </el-col> | |
| 24 | - <el-col :span="24"> | |
| 25 | - <el-form-item label="手机号" prop="sjh"> | |
| 26 | - <el-input v-model="dataForm.sjh" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 27 | - </el-input> | |
| 28 | - </el-form-item> | |
| 29 | - </el-col> | |
| 30 | - <el-col :span="24"> | |
| 31 | - <el-form-item label="职业" prop="zy"> | |
| 32 | - <el-input v-model="dataForm.zy" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 33 | - </el-input> | |
| 34 | - </el-form-item> | |
| 35 | - </el-col> | |
| 36 | - <el-col :span="24"> | |
| 37 | - <el-form-item label="进店渠道" prop="jdqd"> | |
| 38 | - <el-select v-model="dataForm.jdqd" placeholder="请选择" clearable :style='{"width":"100%"}' > | |
| 39 | - <el-option v-for="(item, index) in jdqdOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option> | |
| 40 | - </el-select> | |
| 41 | - </el-form-item> | |
| 42 | - </el-col> | |
| 43 | - <el-col :span="24"> | |
| 44 | - <el-form-item label="年龄" prop="nl"> | |
| 45 | - <el-input v-model="dataForm.nl" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 46 | - </el-input> | |
| 47 | - </el-form-item> | |
| 48 | - </el-col> | |
| 49 | - <el-col :span="24"> | |
| 50 | - <el-form-item label="阴历生日" prop="yin"> | |
| 51 | - <el-date-picker v-model="dataForm.yin" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 52 | - </el-date-picker> | |
| 53 | - </el-form-item> | |
| 54 | - </el-col> | |
| 55 | - <el-col :span="24"> | |
| 56 | - <el-form-item label="阳历生日" prop="yang"> | |
| 57 | - <el-date-picker v-model="dataForm.yang" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 58 | - </el-date-picker> | |
| 59 | - </el-form-item> | |
| 60 | - </el-col> | |
| 61 | - <el-col :span="24"> | |
| 62 | - <el-form-item label="推荐人" prop="tjr"> | |
| 63 | - <el-input v-model="dataForm.tjr" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 64 | - </el-input> | |
| 65 | - </el-form-item> | |
| 66 | - </el-col> | |
| 67 | - <el-col :span="24"> | |
| 68 | - <el-form-item label="健康师" prop="jks"> | |
| 69 | - <el-input v-model="dataForm.jks" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 70 | - </el-input> | |
| 71 | - </el-form-item> | |
| 72 | - </el-col> | |
| 73 | - <el-col :span="24"> | |
| 74 | - <el-form-item label="会员顾问" prop="hygw"> | |
| 75 | - <el-input v-model="dataForm.hygw" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 76 | - </el-input> | |
| 77 | - </el-form-item> | |
| 78 | - </el-col> | |
| 79 | - <el-col :span="24"> | |
| 80 | - <el-form-item label="标签" prop="bq"> | |
| 81 | - <el-input v-model="dataForm.bq" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 82 | - </el-input> | |
| 83 | - </el-form-item> | |
| 84 | - </el-col> | |
| 85 | - <el-col :span="24"> | |
| 86 | - <el-form-item label="爱好" prop="ah"> | |
| 87 | - <el-input v-model="dataForm.ah" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 88 | - </el-input> | |
| 89 | - </el-form-item> | |
| 90 | - </el-col> | |
| 91 | - <el-col :span="24"> | |
| 92 | - <el-form-item label="其它" prop="qt"> | |
| 93 | - <el-input v-model="dataForm.qt" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 94 | - </el-input> | |
| 95 | - </el-form-item> | |
| 96 | - </el-col> | |
| 97 | - </el-form> | |
| 98 | - </el-row> | |
| 99 | - <span slot="footer" class="dialog-footer"> | |
| 100 | - <el-button @click="visible = false">取 消</el-button> | |
| 101 | - <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 102 | - </span> | |
| 103 | - </el-dialog> | |
| 104 | -</template> | |
| 105 | -<script> | |
| 106 | - import request from '@/utils/request' | |
| 107 | - import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 108 | - import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 109 | - export default { | |
| 110 | - components: {}, | |
| 111 | - props: [], | |
| 112 | - data() { | |
| 113 | - return { | |
| 114 | - loading: false, | |
| 115 | - visible: false, | |
| 116 | - isDetail: false, | |
| 117 | - dataForm: { | |
| 118 | - id:'', | |
| 119 | - id:undefined, | |
| 120 | - xm:undefined, | |
| 121 | - xb:undefined, | |
| 122 | - sjh:undefined, | |
| 123 | - zy:undefined, | |
| 124 | - jdqd:undefined, | |
| 125 | - nl:undefined, | |
| 126 | - yin:undefined, | |
| 127 | - yang:undefined, | |
| 128 | - tjr:undefined, | |
| 129 | - jks:undefined, | |
| 130 | - hygw:undefined, | |
| 131 | - bq:undefined, | |
| 132 | - ah:undefined, | |
| 133 | - qt:undefined, | |
| 134 | - }, | |
| 135 | - rules: { | |
| 136 | - }, | |
| 137 | - xbOptions:[{"fullName":"男","id":"男"},{"fullName":"女","id":"女"}], | |
| 138 | - jdqdOptions:[{"fullName":"进店渠道1","id":"进店渠道1"}], | |
| 139 | - } | |
| 140 | - }, | |
| 141 | - computed: {}, | |
| 142 | - watch: {}, | |
| 143 | - created() { | |
| 144 | - }, | |
| 145 | - mounted() { | |
| 146 | - }, | |
| 147 | - methods: { | |
| 148 | - goBack() { | |
| 149 | - this.$emit('refresh') | |
| 150 | - }, | |
| 151 | - init(id, isDetail) { | |
| 152 | - this.dataForm.id = id || 0; | |
| 153 | - this.visible = true; | |
| 154 | - this.isDetail = isDetail || false; | |
| 155 | - this.$nextTick(() => { | |
| 156 | - this.$refs['elForm'].resetFields(); | |
| 157 | - if (this.dataForm.id) { | |
| 158 | - request({ | |
| 159 | - url: '/api/Extend/LqHygl/' + this.dataForm.id, | |
| 160 | - method: 'get' | |
| 161 | - }).then(res =>{ | |
| 162 | - this.dataForm = res.data; | |
| 163 | - }) | |
| 164 | - } | |
| 165 | - }) | |
| 166 | - }, | |
| 167 | - dataFormSubmit() { | |
| 168 | - this.$refs['elForm'].validate((valid) => { | |
| 169 | - if (valid) { | |
| 170 | - if (!this.dataForm.id) { | |
| 171 | - request({ | |
| 172 | - url: `/api/Extend/LqHygl`, | |
| 173 | - method: 'post', | |
| 174 | - data: this.dataForm, | |
| 175 | - }).then((res) => { | |
| 176 | - this.$message({ | |
| 177 | - message: res.msg, | |
| 178 | - type: 'success', | |
| 179 | - duration: 1000, | |
| 180 | - onClose: () => { | |
| 181 | - this.visible = false, | |
| 182 | - this.$emit('refresh', true) | |
| 183 | - } | |
| 184 | - }) | |
| 185 | - }) | |
| 186 | - } else { | |
| 187 | - request({ | |
| 188 | - url: '/api/Extend/LqHygl/' + this.dataForm.id, | |
| 189 | - method: 'PUT', | |
| 190 | - data: this.dataForm | |
| 191 | - }).then((res) => { | |
| 192 | - this.$message({ | |
| 193 | - message: res.msg, | |
| 194 | - type: 'success', | |
| 195 | - duration: 1000, | |
| 196 | - onClose: () => { | |
| 197 | - this.visible = false | |
| 198 | - this.$emit('refresh', true) | |
| 199 | - } | |
| 200 | - }) | |
| 201 | - }) | |
| 202 | - } | |
| 203 | - } | |
| 204 | - }) | |
| 205 | - }, | |
| 206 | - } | |
| 207 | - } | |
| 208 | -</script> |
antis-ncc-admin/src/views/lqHygl/index.vue deleted
| 1 | -<template> | |
| 2 | - <div class="NCC-common-layout"> | |
| 3 | - <div class="NCC-common-layout-center"> | |
| 4 | - <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | - <el-form @submit.native.prevent> | |
| 6 | - <el-col :span="6"> | |
| 7 | - <el-form-item label="会员编号"> | |
| 8 | - <el-input v-model="query.id" placeholder="会员编号" clearable /> | |
| 9 | - </el-form-item> | |
| 10 | - </el-col> | |
| 11 | - <el-col :span="6"> | |
| 12 | - <el-form-item label="姓名"> | |
| 13 | - <el-input v-model="query.xm" placeholder="姓名" clearable /> | |
| 14 | - </el-form-item> | |
| 15 | - </el-col> | |
| 16 | - <el-col :span="6"> | |
| 17 | - <el-form-item label="性别"> | |
| 18 | - <el-select v-model="query.xb" placeholder="性别" clearable > | |
| 19 | - <el-option v-for="(item, index) in xbOptions" :key="index" :label="item.fullName" :value="item.id" /> | |
| 20 | - </el-select> | |
| 21 | - </el-form-item> | |
| 22 | - </el-col> | |
| 23 | - <template v-if="showAll"> | |
| 24 | - <el-col :span="6"> | |
| 25 | - <el-form-item label="手机号"> | |
| 26 | - <el-input v-model="query.sjh" placeholder="手机号" clearable /> | |
| 27 | - </el-form-item> | |
| 28 | - </el-col> | |
| 29 | - <el-col :span="6"> | |
| 30 | - <el-form-item label="职业"> | |
| 31 | - <el-input v-model="query.zy" placeholder="职业" clearable /> | |
| 32 | - </el-form-item> | |
| 33 | - </el-col> | |
| 34 | - <el-col :span="6"> | |
| 35 | - <el-form-item label="进店渠道"> | |
| 36 | - <el-select v-model="query.jdqd" placeholder="进店渠道" clearable > | |
| 37 | - <el-option v-for="(item, index) in jdqdOptions" :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.nl" placeholder="年龄" clearable /> | |
| 44 | - </el-form-item> | |
| 45 | - </el-col> | |
| 46 | - <el-col :span="6"> | |
| 47 | - <el-form-item label="阴历生日"> | |
| 48 | - <el-date-picker v-model="query.yin" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 49 | - </el-date-picker> | |
| 50 | - </el-form-item> | |
| 51 | - </el-col> | |
| 52 | - <el-col :span="6"> | |
| 53 | - <el-form-item label="阳历生日"> | |
| 54 | - <el-date-picker v-model="query.yang" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 55 | - </el-date-picker> | |
| 56 | - </el-form-item> | |
| 57 | - </el-col> | |
| 58 | - <el-col :span="6"> | |
| 59 | - <el-form-item label="推荐人"> | |
| 60 | - <el-input v-model="query.tjr" placeholder="推荐人" clearable /> | |
| 61 | - </el-form-item> | |
| 62 | - </el-col> | |
| 63 | - <el-col :span="6"> | |
| 64 | - <el-form-item label="健康师"> | |
| 65 | - <el-input v-model="query.jks" placeholder="健康师" clearable /> | |
| 66 | - </el-form-item> | |
| 67 | - </el-col> | |
| 68 | - <el-col :span="6"> | |
| 69 | - <el-form-item label="会员顾问"> | |
| 70 | - <el-input v-model="query.hygw" placeholder="会员顾问" clearable /> | |
| 71 | - </el-form-item> | |
| 72 | - </el-col> | |
| 73 | - <el-col :span="6"> | |
| 74 | - <el-form-item label="标签"> | |
| 75 | - <el-input v-model="query.bq" placeholder="标签" clearable /> | |
| 76 | - </el-form-item> | |
| 77 | - </el-col> | |
| 78 | - <el-col :span="6"> | |
| 79 | - <el-form-item label="爱好"> | |
| 80 | - <el-input v-model="query.ah" placeholder="爱好" clearable /> | |
| 81 | - </el-form-item> | |
| 82 | - </el-col> | |
| 83 | - <el-col :span="6"> | |
| 84 | - <el-form-item label="其它"> | |
| 85 | - <el-input v-model="query.qt" placeholder="其它" /> | |
| 86 | - </el-form-item> | |
| 87 | - </el-col> | |
| 88 | - </template> | |
| 89 | - <el-col :span="6"> | |
| 90 | - <el-form-item> | |
| 91 | - <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 92 | - <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 93 | - <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 94 | - <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> | |
| 95 | - </el-form-item> | |
| 96 | - </el-col> | |
| 97 | - </el-form> | |
| 98 | - </el-row> | |
| 99 | - <div class="NCC-common-layout-main NCC-flex-main"> | |
| 100 | - <div class="NCC-common-head"> | |
| 101 | - <div> | |
| 102 | - <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 103 | - <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 104 | - <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 105 | - </div> | |
| 106 | - <div class="NCC-common-head-right"> | |
| 107 | - <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 108 | - <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 109 | - </el-tooltip> | |
| 110 | - <screenfull isContainer /> | |
| 111 | - </div> | |
| 112 | - </div> | |
| 113 | - <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 114 | - <el-table-column prop="id" label="会员编号" align="left" /> | |
| 115 | - <el-table-column prop="xm" label="姓名" align="left" /> | |
| 116 | - <el-table-column label="性别" prop="xb" align="left"> | |
| 117 | - <template slot-scope="scope">{{ scope.row.xb | dynamicText(xbOptions) }}</template> | |
| 118 | - </el-table-column> | |
| 119 | - <el-table-column prop="sjh" label="手机号" align="left" /> | |
| 120 | - <el-table-column prop="zy" label="职业" align="left" /> | |
| 121 | - <el-table-column label="进店渠道" prop="jdqd" align="left"> | |
| 122 | - <template slot-scope="scope">{{ scope.row.jdqd | dynamicText(jdqdOptions) }}</template> | |
| 123 | - </el-table-column> | |
| 124 | - <el-table-column prop="nl" label="年龄" align="left" /> | |
| 125 | - <el-table-column prop="yin" label="阴历生日" align="left" /> | |
| 126 | - <el-table-column prop="yang" label="阳历生日" align="left" /> | |
| 127 | - <el-table-column prop="tjr" label="推荐人" align="left" /> | |
| 128 | - <el-table-column prop="jks" label="健康师" align="left" /> | |
| 129 | - <el-table-column prop="hygw" label="会员顾问" align="left" /> | |
| 130 | - <el-table-column prop="bq" label="标签" align="left" /> | |
| 131 | - <el-table-column prop="ah" label="爱好" align="left" /> | |
| 132 | - <el-table-column prop="qt" label="其它" align="left" /> | |
| 133 | - <el-table-column label="操作" fixed="right" width="100"> | |
| 134 | - <template slot-scope="scope"> | |
| 135 | - <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 136 | - <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 137 | - </template> | |
| 138 | - </el-table-column> | |
| 139 | - </NCC-table> | |
| 140 | - <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 141 | - </div> | |
| 142 | - </div> | |
| 143 | - <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 144 | - <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 145 | - </div> | |
| 146 | -</template> | |
| 147 | -<script> | |
| 148 | - import request from '@/utils/request' | |
| 149 | - import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 150 | - import NCCForm from './Form' | |
| 151 | - import ExportBox from './ExportBox' | |
| 152 | - import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 153 | - export default { | |
| 154 | - components: { NCCForm, ExportBox }, | |
| 155 | - data() { | |
| 156 | - return { | |
| 157 | - showAll: false, | |
| 158 | - query: { | |
| 159 | - id:undefined, | |
| 160 | - xm:undefined, | |
| 161 | - xb:undefined, | |
| 162 | - sjh:undefined, | |
| 163 | - zy:undefined, | |
| 164 | - jdqd:undefined, | |
| 165 | - nl:undefined, | |
| 166 | - yin:undefined, | |
| 167 | - yang:undefined, | |
| 168 | - tjr:undefined, | |
| 169 | - jks:undefined, | |
| 170 | - hygw:undefined, | |
| 171 | - bq:undefined, | |
| 172 | - ah:undefined, | |
| 173 | - qt:undefined, | |
| 174 | - }, | |
| 175 | - list: [], | |
| 176 | - listLoading: true, | |
| 177 | - multipleSelection: [], total: 0, | |
| 178 | - listQuery: { | |
| 179 | - currentPage: 1, | |
| 180 | - pageSize: 20, | |
| 181 | - sort: "desc", | |
| 182 | - sidx: "", | |
| 183 | - }, | |
| 184 | - formVisible: false, | |
| 185 | - exportBoxVisible: false, | |
| 186 | - columnList: [ | |
| 187 | - { prop: 'id', label: '会员编号' }, | |
| 188 | - { prop: 'xm', label: '姓名' }, | |
| 189 | - { prop: 'xb', label: '性别' }, | |
| 190 | - { prop: 'sjh', label: '手机号' }, | |
| 191 | - { prop: 'zy', label: '职业' }, | |
| 192 | - { prop: 'jdqd', label: '进店渠道' }, | |
| 193 | - { prop: 'nl', label: '年龄' }, | |
| 194 | - { prop: 'yin', label: '阴历生日' }, | |
| 195 | - { prop: 'yang', label: '阳历生日' }, | |
| 196 | - { prop: 'tjr', label: '推荐人' }, | |
| 197 | - { prop: 'jks', label: '健康师' }, | |
| 198 | - { prop: 'hygw', label: '会员顾问' }, | |
| 199 | - { prop: 'bq', label: '标签' }, | |
| 200 | - { prop: 'ah', label: '爱好' }, | |
| 201 | - { prop: 'qt', label: '其它' }, | |
| 202 | - ], | |
| 203 | - xbOptions:[{"fullName":"男","id":"男"},{"fullName":"女","id":"女"}], | |
| 204 | - jdqdOptions:[{"fullName":"进店渠道1","id":"进店渠道1"}], | |
| 205 | - } | |
| 206 | - }, | |
| 207 | - computed: {}, | |
| 208 | - created() { | |
| 209 | - this.initData() | |
| 210 | - }, | |
| 211 | - methods: { | |
| 212 | - initData() { | |
| 213 | - this.listLoading = true; | |
| 214 | - let _query = { | |
| 215 | - ...this.listQuery, | |
| 216 | - ...this.query | |
| 217 | - }; | |
| 218 | - let query = {} | |
| 219 | - for (let key in _query) { | |
| 220 | - if (Array.isArray(_query[key])) { | |
| 221 | - query[key] = _query[key].join() | |
| 222 | - } else { | |
| 223 | - query[key] = _query[key] | |
| 224 | - } | |
| 225 | - } | |
| 226 | - request({ | |
| 227 | - url: `/api/Extend/LqHygl`, | |
| 228 | - method: 'GET', | |
| 229 | - data: query | |
| 230 | - }).then(res => { | |
| 231 | - this.list = res.data.list | |
| 232 | - this.total = res.data.pagination.total | |
| 233 | - this.listLoading = false | |
| 234 | - }) | |
| 235 | - }, | |
| 236 | - handleDel(id) { | |
| 237 | - this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 238 | - type: 'warning' | |
| 239 | - }).then(() => { | |
| 240 | - request({ | |
| 241 | - url: `/api/Extend/LqHygl/${id}`, | |
| 242 | - method: 'DELETE' | |
| 243 | - }).then(res => { | |
| 244 | - this.$message({ | |
| 245 | - type: 'success', | |
| 246 | - message: res.msg, | |
| 247 | - onClose: () => { | |
| 248 | - this.initData() | |
| 249 | - } | |
| 250 | - }); | |
| 251 | - }) | |
| 252 | - }).catch(() => { | |
| 253 | - }); | |
| 254 | - }, | |
| 255 | - handleSelectionChange(val) { | |
| 256 | - const res = val.map(item => item.id) | |
| 257 | - this.multipleSelection = res | |
| 258 | - }, | |
| 259 | - handleBatchRemoveDel() { | |
| 260 | - if (!this.multipleSelection.length) { | |
| 261 | - this.$message({ | |
| 262 | - type: 'error', | |
| 263 | - message: '请选择一条数据', | |
| 264 | - duration: 1500, | |
| 265 | - }) | |
| 266 | - return | |
| 267 | - } | |
| 268 | - const ids = this.multipleSelection | |
| 269 | - this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 270 | - type: 'warning' | |
| 271 | - }).then(() => { | |
| 272 | - request({ | |
| 273 | - url: `/api/Extend/LqHygl/batchRemove`, | |
| 274 | - method: 'POST', | |
| 275 | - data: ids , | |
| 276 | - }).then(res => { | |
| 277 | - this.$message({ | |
| 278 | - type: 'success', | |
| 279 | - message: res.msg, | |
| 280 | - onClose: () => { | |
| 281 | - this.initData() | |
| 282 | - } | |
| 283 | - }); | |
| 284 | - }) | |
| 285 | - }).catch(() => { }) | |
| 286 | - }, | |
| 287 | - addOrUpdateHandle(id, isDetail) { | |
| 288 | - this.formVisible = true | |
| 289 | - this.$nextTick(() => { | |
| 290 | - this.$refs.NCCForm.init(id, isDetail) | |
| 291 | - }) | |
| 292 | - }, | |
| 293 | - exportData() { | |
| 294 | - this.exportBoxVisible = true | |
| 295 | - this.$nextTick(() => { | |
| 296 | - this.$refs.ExportBox.init(this.columnList) | |
| 297 | - }) | |
| 298 | - }, | |
| 299 | - download(data) { | |
| 300 | - let query = { ...data, ...this.listQuery, ...this.query } | |
| 301 | - request({ | |
| 302 | - url: `/api/Extend/LqHygl/Actions/Export`, | |
| 303 | - method: 'GET', | |
| 304 | - data: query | |
| 305 | - }).then(res => { | |
| 306 | - if (!res.data.url) return | |
| 307 | - window.location.href = this.define.comUrl + res.data.url | |
| 308 | - this.$refs.ExportBox.visible = false | |
| 309 | - this.exportBoxVisible = false | |
| 310 | - }) | |
| 311 | - }, | |
| 312 | - search() { | |
| 313 | - this.listQuery = { | |
| 314 | - currentPage: 1, | |
| 315 | - pageSize: 20, | |
| 316 | - sort: "desc", | |
| 317 | - sidx: "", | |
| 318 | - } | |
| 319 | - this.initData() | |
| 320 | - }, | |
| 321 | - refresh(isrRefresh) { | |
| 322 | - this.formVisible = false | |
| 323 | - if (isrRefresh) this.reset() | |
| 324 | - }, | |
| 325 | - reset() { | |
| 326 | - for (let key in this.query) { | |
| 327 | - this.query[key] = undefined | |
| 328 | - } | |
| 329 | - this.listQuery = { | |
| 330 | - currentPage: 1, | |
| 331 | - pageSize: 20, | |
| 332 | - sort: "desc", | |
| 333 | - sidx: "", | |
| 334 | - } | |
| 335 | - this.initData() | |
| 336 | - } | |
| 337 | - } | |
| 338 | - } | |
| 339 | -</script> | |
| 340 | 0 | \ No newline at end of file |
antis-ncc-admin/src/views/lqKdKdjlb/index.vue
| ... | ... | @@ -175,56 +175,284 @@ |
| 175 | 175 | <screenfull isContainer /> |
| 176 | 176 | </div> |
| 177 | 177 | </div> |
| 178 | - <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 179 | - <el-table-column prop="id" label="开单编号" align="left" /> | |
| 180 | - <el-table-column label="开单会员" prop="kdhy" align="left"> | |
| 181 | - <template slot-scope="scope">{{ scope.row.kdhy | dynamicText(kdhyOptions) }}</template> | |
| 178 | + <NCC-table | |
| 179 | + v-loading="listLoading" | |
| 180 | + :data="list" | |
| 181 | + has-c | |
| 182 | + @selection-change="handleSelectionChange" | |
| 183 | + :header-cell-style="{ background: '#f5f7fa', color: '#606266' }" | |
| 184 | + > | |
| 185 | + <!-- 开单编号 --> | |
| 186 | + <el-table-column label="开单编号" width="180" align="center"> | |
| 187 | + <template slot-scope="scope"> | |
| 188 | + <div class="order-info"> | |
| 189 | + <i class="el-icon-document order-icon"></i> | |
| 190 | + <span class="text-nowrap">{{ scope.row.id || '无' }}</span> | |
| 191 | + </div> | |
| 192 | + </template> | |
| 193 | + </el-table-column> | |
| 194 | + | |
| 195 | + <!-- 开单会员 --> | |
| 196 | + <el-table-column label="开单会员" width="100" align="center"> | |
| 197 | + <template slot-scope="scope"> | |
| 198 | + <div class="member-info"> | |
| 199 | + <i class="el-icon-user member-icon"></i> | |
| 200 | + <span class="text-nowrap">{{ scope.row.kdhy | dynamicText(kdhyOptions) || '无' }}</span> | |
| 201 | + </div> | |
| 202 | + </template> | |
| 203 | + </el-table-column> | |
| 204 | + | |
| 205 | + <!-- 开单会员名称 --> | |
| 206 | + <el-table-column label="开单会员名称" width="100" align="center"> | |
| 207 | + <template slot-scope="scope"> | |
| 208 | + <div class="member-name"> | |
| 209 | + <i class="el-icon-user-solid member-name-icon"></i> | |
| 210 | + <span class="text-nowrap">{{ scope.row.kdhyc || '无' }}</span> | |
| 211 | + </div> | |
| 212 | + </template> | |
| 213 | + </el-table-column> | |
| 214 | + | |
| 215 | + <!-- 会员手机号 --> | |
| 216 | + <el-table-column label="会员手机号" width="120" align="center"> | |
| 217 | + <template slot-scope="scope"> | |
| 218 | + <div class="phone-info"> | |
| 219 | + <i class="el-icon-phone phone-icon"></i> | |
| 220 | + <span class="text-nowrap">{{ scope.row.kdhysjh || '无' }}</span> | |
| 221 | + </div> | |
| 222 | + </template> | |
| 223 | + </el-table-column> | |
| 224 | + | |
| 225 | + <!-- 单据门店 --> | |
| 226 | + <el-table-column label="单据门店" width="120" align="center"> | |
| 227 | + <template slot-scope="scope"> | |
| 228 | + <div class="store-info"> | |
| 229 | + <i class="el-icon-office-building store-icon"></i> | |
| 230 | + <span class="text-nowrap">{{ scope.row.djmd | dynamicText(djmdOptions) || '无' }}</span> | |
| 231 | + </div> | |
| 232 | + </template> | |
| 233 | + </el-table-column> | |
| 234 | + | |
| 235 | + <!-- 金三角 --> | |
| 236 | + <el-table-column label="金三角" width="120" align="center"> | |
| 237 | + <template slot-scope="scope"> | |
| 238 | + <div class="jsj-info"> | |
| 239 | + <i class="el-icon-star-on jsj-icon"></i> | |
| 240 | + <span class="text-nowrap">{{ scope.row.jsj | dynamicText(jsjOptions) || '无' }}</span> | |
| 241 | + </div> | |
| 242 | + </template> | |
| 243 | + </el-table-column> | |
| 244 | + | |
| 245 | + <!-- 开单日期 --> | |
| 246 | + <el-table-column label="开单日期" width="120" align="center"> | |
| 247 | + <template slot-scope="scope"> | |
| 248 | + <div class="date-info"> | |
| 249 | + <i class="el-icon-date date-icon"></i> | |
| 250 | + <span class="text-nowrap">{{ formatDate(scope.row.kdrq) }}</span> | |
| 251 | + </div> | |
| 252 | + </template> | |
| 253 | + </el-table-column> | |
| 254 | + | |
| 255 | + <!-- 顾客类型 --> | |
| 256 | + <el-table-column label="顾客类型" width="120" align="center"> | |
| 257 | + <template slot-scope="scope"> | |
| 258 | + <div class="customer-type-info"> | |
| 259 | + <i class="el-icon-user customer-type-icon"></i> | |
| 260 | + <span class="text-nowrap">{{ scope.row.gjlx | dynamicText(gjlxOptions) || '无' }}</span> | |
| 261 | + </div> | |
| 262 | + </template> | |
| 263 | + </el-table-column> | |
| 264 | + | |
| 265 | + <!-- 合作机构 --> | |
| 266 | + <el-table-column label="合作机构" width="120" align="center"> | |
| 267 | + <template slot-scope="scope"> | |
| 268 | + <div class="cooperation-info"> | |
| 269 | + <i class="el-icon-office-building cooperation-icon"></i> | |
| 270 | + <span class="text-nowrap">{{ scope.row.hgjg | dynamicText(hgjgOptions) || '无' }}</span> | |
| 271 | + </div> | |
| 272 | + </template> | |
| 273 | + </el-table-column> | |
| 274 | + | |
| 275 | + <!-- 整单业绩 --> | |
| 276 | + <el-table-column label="整单业绩" width="120" align="center"> | |
| 277 | + <template slot-scope="scope"> | |
| 278 | + <div class="amount-info"> | |
| 279 | + <i class="el-icon-money amount-icon"></i> | |
| 280 | + <span class="text-nowrap">{{ scope.row.zdyj || '无' }}</span> | |
| 281 | + </div> | |
| 282 | + </template> | |
| 283 | + </el-table-column> | |
| 284 | + | |
| 285 | + <!-- 实付业绩 --> | |
| 286 | + <el-table-column label="实付业绩" width="120" align="center"> | |
| 287 | + <template slot-scope="scope"> | |
| 288 | + <div class="paid-amount-info"> | |
| 289 | + <i class="el-icon-coin paid-amount-icon"></i> | |
| 290 | + <span class="text-nowrap">{{ scope.row.sfyj || '无' }}</span> | |
| 291 | + </div> | |
| 292 | + </template> | |
| 293 | + </el-table-column> | |
| 294 | + | |
| 295 | + <!-- 欠款 --> | |
| 296 | + <el-table-column label="欠款" width="100" align="center"> | |
| 297 | + <template slot-scope="scope"> | |
| 298 | + <div class="debt-info"> | |
| 299 | + <i class="el-icon-warning debt-icon"></i> | |
| 300 | + <span class="text-nowrap">{{ scope.row.qk || '无' }}</span> | |
| 301 | + </div> | |
| 302 | + </template> | |
| 303 | + </el-table-column> | |
| 304 | + | |
| 305 | + <!-- 储扣方式 --> | |
| 306 | + <el-table-column label="储扣方式" width="120" align="center"> | |
| 307 | + <template slot-scope="scope"> | |
| 308 | + <div class="storage-info"> | |
| 309 | + <i class="el-icon-coin storage-icon"></i> | |
| 310 | + <span class="text-nowrap">{{ scope.row.ckfs | dynamicText(ckfsOptions) || '无' }}</span> | |
| 311 | + </div> | |
| 312 | + </template> | |
| 182 | 313 | </el-table-column> |
| 183 | - <el-table-column prop="kdhyc" label="开单会员名称" align="left" /> | |
| 184 | - <el-table-column prop="kdhysjh" label="会员手机号" align="left" /> | |
| 185 | - <el-table-column label="单据门店" prop="djmd" align="left"> | |
| 186 | - <template slot-scope="scope">{{ scope.row.djmd | dynamicText(djmdOptions) }}</template> | |
| 314 | + | |
| 315 | + <!-- 储扣明细 --> | |
| 316 | + <el-table-column label="储扣明细" width="120" align="center"> | |
| 317 | + <template slot-scope="scope"> | |
| 318 | + <div class="storage-detail-info"> | |
| 319 | + <i class="el-icon-document storage-detail-icon"></i> | |
| 320 | + <span class="text-nowrap">{{ scope.row.ckmx || '无' }}</span> | |
| 321 | + </div> | |
| 322 | + </template> | |
| 323 | + </el-table-column> | |
| 324 | + | |
| 325 | + <!-- 付款方式 --> | |
| 326 | + <el-table-column label="付款方式" width="120" align="center"> | |
| 327 | + <template slot-scope="scope"> | |
| 328 | + <div class="payment-info"> | |
| 329 | + <i class="el-icon-credit-card payment-icon"></i> | |
| 330 | + <span class="text-nowrap">{{ scope.row.fkfs | dynamicText(fkfsOptions) || '无' }}</span> | |
| 331 | + </div> | |
| 332 | + </template> | |
| 187 | 333 | </el-table-column> |
| 188 | - <el-table-column label="金三角" prop="jsj" align="left"> | |
| 189 | - <template slot-scope="scope">{{ scope.row.jsj | dynamicText(jsjOptions) }}</template> | |
| 334 | + | |
| 335 | + <!-- 付款医院 --> | |
| 336 | + <el-table-column label="付款医院" width="120" align="center"> | |
| 337 | + <template slot-scope="scope"> | |
| 338 | + <div class="hospital-info"> | |
| 339 | + <i class="el-icon-office-building hospital-icon"></i> | |
| 340 | + <span class="text-nowrap">{{ scope.row.fkyy | dynamicText(fkyyOptions) || '无' }}</span> | |
| 341 | + </div> | |
| 342 | + </template> | |
| 343 | + </el-table-column> | |
| 344 | + | |
| 345 | + <!-- 付款判断 --> | |
| 346 | + <el-table-column label="付款判断" width="120" align="center"> | |
| 347 | + <template slot-scope="scope"> | |
| 348 | + <div class="payment-judge-info"> | |
| 349 | + <i class="el-icon-check payment-judge-icon"></i> | |
| 350 | + <span class="text-nowrap">{{ scope.row.fkpd || '无' }}</span> | |
| 351 | + </div> | |
| 352 | + </template> | |
| 353 | + </el-table-column> | |
| 354 | + | |
| 355 | + <!-- 客户来源 --> | |
| 356 | + <el-table-column label="客户来源" width="120" align="center"> | |
| 357 | + <template slot-scope="scope"> | |
| 358 | + <div class="source-info"> | |
| 359 | + <i class="el-icon-connection source-icon"></i> | |
| 360 | + <span class="text-nowrap">{{ scope.row.khly | dynamicText(khlyOptions) || '无' }}</span> | |
| 361 | + </div> | |
| 362 | + </template> | |
| 190 | 363 | </el-table-column> |
| 191 | - <el-table-column prop="kdrq" label="开单日期" align="left" /> | |
| 192 | - <el-table-column label="顾客类型" prop="gjlx" align="left"> | |
| 193 | - <template slot-scope="scope">{{ scope.row.gjlx | dynamicText(gjlxOptions) }}</template> | |
| 364 | + | |
| 365 | + <!-- 推荐人 --> | |
| 366 | + <el-table-column label="推荐人" width="100" align="center"> | |
| 367 | + <template slot-scope="scope"> | |
| 368 | + <div class="referrer-info"> | |
| 369 | + <i class="el-icon-user referrer-icon"></i> | |
| 370 | + <span class="text-nowrap">{{ scope.row.tjr || '无' }}</span> | |
| 371 | + </div> | |
| 372 | + </template> | |
| 194 | 373 | </el-table-column> |
| 195 | - <el-table-column label="合作机构" prop="hgjg" align="left"> | |
| 196 | - <template slot-scope="scope">{{ scope.row.hgjg | dynamicText(hgjgOptions) }}</template> | |
| 374 | + | |
| 375 | + <!-- 是否首开订单 --> | |
| 376 | + <el-table-column label="是否首开订单" width="140" align="center"> | |
| 377 | + <template slot-scope="scope"> | |
| 378 | + <div class="first-order-info"> | |
| 379 | + <i class="el-icon-star-on first-order-icon"></i> | |
| 380 | + <span class="text-nowrap">{{ scope.row.sfskdd | dynamicText(sfskddOptions) || '无' }}</span> | |
| 381 | + </div> | |
| 382 | + </template> | |
| 197 | 383 | </el-table-column> |
| 198 | - <el-table-column prop="zdyj" label="整单业绩" align="left" /> | |
| 199 | - <el-table-column prop="sfyj" label="实付业绩" align="left" /> | |
| 200 | - <el-table-column prop="qk" label="欠款" align="left" /> | |
| 201 | - <el-table-column label="储扣方式" prop="ckfs" align="left"> | |
| 202 | - <template slot-scope="scope">{{ scope.row.ckfs | dynamicText(ckfsOptions) }}</template> | |
| 384 | + | |
| 385 | + <!-- 简介 --> | |
| 386 | + <el-table-column label="简介" width="120" align="center"> | |
| 387 | + <template slot-scope="scope"> | |
| 388 | + <div class="intro-info"> | |
| 389 | + <i class="el-icon-document intro-icon"></i> | |
| 390 | + <span class="text-nowrap">{{ scope.row.jj || '无' }}</span> | |
| 391 | + </div> | |
| 392 | + </template> | |
| 203 | 393 | </el-table-column> |
| 204 | - <el-table-column prop="ckmx" label="储扣明细" align="left" /> | |
| 205 | - <el-table-column label="付款方式" prop="fkfs" align="left"> | |
| 206 | - <template slot-scope="scope">{{ scope.row.fkfs | dynamicText(fkfsOptions) }}</template> | |
| 394 | + | |
| 395 | + <!-- 备注 --> | |
| 396 | + <el-table-column label="备注" min-width="150" show-overflow-tooltip> | |
| 397 | + <template slot-scope="scope"> | |
| 398 | + <div class="remark-info"> | |
| 399 | + <i class="el-icon-document remark-icon"></i> | |
| 400 | + <span class="text-nowrap">{{ scope.row.bz || '无' }}</span> | |
| 401 | + </div> | |
| 402 | + </template> | |
| 207 | 403 | </el-table-column> |
| 208 | - <el-table-column label="付款医院" prop="fkyy" align="left"> | |
| 209 | - <template slot-scope="scope">{{ scope.row.fkyy | dynamicText(fkyyOptions) }}</template> | |
| 404 | + | |
| 405 | + <!-- 健康师业绩 --> | |
| 406 | + <el-table-column label="健康师业绩" width="130" align="center"> | |
| 407 | + <template slot-scope="scope"> | |
| 408 | + <div class="jks-amount-info"> | |
| 409 | + <i class="el-icon-medicine-box jks-amount-icon"></i> | |
| 410 | + <span class="text-nowrap">{{ scope.row.jksyj || '无' }}</span> | |
| 411 | + </div> | |
| 412 | + </template> | |
| 210 | 413 | </el-table-column> |
| 211 | - <el-table-column prop="fkpd" label="付款判断" align="left" /> | |
| 212 | - <el-table-column label="客户来源" prop="khly" align="left"> | |
| 213 | - <template slot-scope="scope">{{ scope.row.khly | dynamicText(khlyOptions) }}</template> | |
| 414 | + | |
| 415 | + <!-- 科技部老师业绩 --> | |
| 416 | + <el-table-column label="科技部老师业绩" width="150" align="center"> | |
| 417 | + <template slot-scope="scope"> | |
| 418 | + <div class="kjb-amount-info"> | |
| 419 | + <i class="el-icon-cpu kjb-amount-icon"></i> | |
| 420 | + <span class="text-nowrap">{{ scope.row.kjblsyj || '无' }}</span> | |
| 421 | + </div> | |
| 422 | + </template> | |
| 214 | 423 | </el-table-column> |
| 215 | - <el-table-column prop="tjr" label="推荐人" align="left" /> | |
| 216 | - <el-table-column label="是否首开订单" prop="sfskdd" align="left"> | |
| 217 | - <template slot-scope="scope">{{ scope.row.sfskdd | dynamicText(sfskddOptions) }}</template> | |
| 424 | + | |
| 425 | + <!-- 品项信息 --> | |
| 426 | + <el-table-column label="品项信息" width="120" align="center"> | |
| 427 | + <template slot-scope="scope"> | |
| 428 | + <div class="product-info"> | |
| 429 | + <i class="el-icon-goods product-icon"></i> | |
| 430 | + <span class="text-nowrap">{{ scope.row.pxxx || '无' }}</span> | |
| 431 | + </div> | |
| 432 | + </template> | |
| 218 | 433 | </el-table-column> |
| 219 | - <el-table-column prop="jj" label="简介" align="left" /> | |
| 220 | - <el-table-column prop="bz" label="备注" align="left" /> | |
| 221 | - <el-table-column prop="jksyj" label="健康师业绩" align="left" /> | |
| 222 | - <el-table-column prop="kjblsyj" label="科技部老师业绩" align="left" /> | |
| 223 | - <el-table-column prop="pxxx" label="品项信息" align="left" /> | |
| 224 | - <el-table-column label="操作" fixed="right" width="100"> | |
| 225 | - <template slot-scope="scope"> | |
| 226 | - <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 227 | - <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 434 | + | |
| 435 | + <!-- 操作 --> | |
| 436 | + <el-table-column label="操作" width="160" align="left" fixed="right"> | |
| 437 | + <template slot-scope="scope"> | |
| 438 | + <div class="action-buttons"> | |
| 439 | + <el-button | |
| 440 | + type="text" | |
| 441 | + icon="el-icon-edit" | |
| 442 | + @click="addOrUpdateHandle(scope.row.id)" | |
| 443 | + class="edit-btn" | |
| 444 | + > | |
| 445 | + 编辑 | |
| 446 | + </el-button> | |
| 447 | + <el-button | |
| 448 | + type="text" | |
| 449 | + icon="el-icon-delete" | |
| 450 | + @click="handleDel(scope.row.id)" | |
| 451 | + class="delete-btn" | |
| 452 | + > | |
| 453 | + 删除 | |
| 454 | + </el-button> | |
| 455 | + </div> | |
| 228 | 456 | </template> |
| 229 | 457 | </el-table-column> |
| 230 | 458 | </NCC-table> |
| ... | ... | @@ -482,7 +710,427 @@ |
| 482 | 710 | sidx: "", |
| 483 | 711 | } |
| 484 | 712 | this.initData() |
| 713 | + }, | |
| 714 | + // 格式化日期 | |
| 715 | + formatDate(date) { | |
| 716 | + if (!date) return '无' | |
| 717 | + const d = new Date(date) | |
| 718 | + if (isNaN(d.getTime())) return '无' | |
| 719 | + return d.toLocaleDateString('zh-CN', { | |
| 720 | + year: 'numeric', | |
| 721 | + month: '2-digit', | |
| 722 | + day: '2-digit' | |
| 723 | + }) | |
| 485 | 724 | } |
| 486 | 725 | } |
| 487 | 726 | } |
| 488 | -</script> | |
| 489 | 727 | \ No newline at end of file |
| 728 | +</script> | |
| 729 | + | |
| 730 | +<style lang="scss" scoped> | |
| 731 | +// 通用文本不换行样式 | |
| 732 | +.text-nowrap { | |
| 733 | + white-space: nowrap; | |
| 734 | + overflow: hidden; | |
| 735 | + text-overflow: ellipsis; | |
| 736 | + max-width: 100%; | |
| 737 | +} | |
| 738 | + | |
| 739 | +// 开单编号样式 | |
| 740 | +.order-info { | |
| 741 | + display: flex; | |
| 742 | + align-items: center; | |
| 743 | + justify-content: center; | |
| 744 | + gap: 6px; | |
| 745 | + | |
| 746 | + .order-icon { | |
| 747 | + color: #409EFF; | |
| 748 | + font-size: 16px; | |
| 749 | + } | |
| 750 | + | |
| 751 | + span { | |
| 752 | + font-weight: 500; | |
| 753 | + color: #303133; | |
| 754 | + } | |
| 755 | +} | |
| 756 | + | |
| 757 | +// 会员信息样式 | |
| 758 | +.member-info, .member-name { | |
| 759 | + display: flex; | |
| 760 | + align-items: center; | |
| 761 | + justify-content: center; | |
| 762 | + gap: 6px; | |
| 763 | + | |
| 764 | + .member-icon, .member-name-icon { | |
| 765 | + color: #67C23A; | |
| 766 | + font-size: 16px; | |
| 767 | + } | |
| 768 | + | |
| 769 | + span { | |
| 770 | + font-weight: 500; | |
| 771 | + color: #303133; | |
| 772 | + } | |
| 773 | +} | |
| 774 | + | |
| 775 | +// 手机号样式 | |
| 776 | +.phone-info { | |
| 777 | + display: flex; | |
| 778 | + align-items: center; | |
| 779 | + justify-content: center; | |
| 780 | + gap: 6px; | |
| 781 | + | |
| 782 | + .phone-icon { | |
| 783 | + color: #409EFF; | |
| 784 | + font-size: 16px; | |
| 785 | + } | |
| 786 | + | |
| 787 | + span { | |
| 788 | + font-weight: 500; | |
| 789 | + color: #303133; | |
| 790 | + } | |
| 791 | +} | |
| 792 | + | |
| 793 | +// 门店信息样式 | |
| 794 | +.store-info { | |
| 795 | + display: flex; | |
| 796 | + align-items: center; | |
| 797 | + justify-content: center; | |
| 798 | + gap: 6px; | |
| 799 | + | |
| 800 | + .store-icon { | |
| 801 | + color: #67C23A; | |
| 802 | + font-size: 16px; | |
| 803 | + } | |
| 804 | + | |
| 805 | + span { | |
| 806 | + font-weight: 500; | |
| 807 | + color: #303133; | |
| 808 | + } | |
| 809 | +} | |
| 810 | + | |
| 811 | +// 金三角样式 | |
| 812 | +.jsj-info { | |
| 813 | + display: flex; | |
| 814 | + align-items: center; | |
| 815 | + justify-content: center; | |
| 816 | + gap: 6px; | |
| 817 | + | |
| 818 | + .jsj-icon { | |
| 819 | + color: #E6A23C; | |
| 820 | + font-size: 16px; | |
| 821 | + } | |
| 822 | + | |
| 823 | + span { | |
| 824 | + font-weight: 500; | |
| 825 | + color: #303133; | |
| 826 | + } | |
| 827 | +} | |
| 828 | + | |
| 829 | +// 日期样式 | |
| 830 | +.date-info { | |
| 831 | + display: flex; | |
| 832 | + align-items: center; | |
| 833 | + justify-content: center; | |
| 834 | + gap: 6px; | |
| 835 | + | |
| 836 | + .date-icon { | |
| 837 | + color: #909399; | |
| 838 | + font-size: 16px; | |
| 839 | + } | |
| 840 | + | |
| 841 | + span { | |
| 842 | + font-weight: 500; | |
| 843 | + color: #303133; | |
| 844 | + } | |
| 845 | +} | |
| 846 | + | |
| 847 | +// 金额相关样式 | |
| 848 | +.amount-info, .paid-amount-info, .jks-amount-info, .kjb-amount-info { | |
| 849 | + display: flex; | |
| 850 | + align-items: center; | |
| 851 | + justify-content: center; | |
| 852 | + gap: 6px; | |
| 853 | + | |
| 854 | + .amount-icon, .paid-amount-icon, .jks-amount-icon, .kjb-amount-icon { | |
| 855 | + color: #409EFF; | |
| 856 | + font-size: 16px; | |
| 857 | + } | |
| 858 | + | |
| 859 | + span { | |
| 860 | + font-weight: 600; | |
| 861 | + color: #409EFF; | |
| 862 | + } | |
| 863 | +} | |
| 864 | + | |
| 865 | +// 欠款样式 | |
| 866 | +.debt-info { | |
| 867 | + display: flex; | |
| 868 | + align-items: center; | |
| 869 | + justify-content: center; | |
| 870 | + gap: 6px; | |
| 871 | + | |
| 872 | + .debt-icon { | |
| 873 | + color: #F56C6C; | |
| 874 | + font-size: 16px; | |
| 875 | + } | |
| 876 | + | |
| 877 | + span { | |
| 878 | + font-weight: 500; | |
| 879 | + color: #F56C6C; | |
| 880 | + } | |
| 881 | +} | |
| 882 | + | |
| 883 | +// 付款方式样式 | |
| 884 | +.payment-info { | |
| 885 | + display: flex; | |
| 886 | + align-items: center; | |
| 887 | + justify-content: center; | |
| 888 | + gap: 6px; | |
| 889 | + | |
| 890 | + .payment-icon { | |
| 891 | + color: #67C23A; | |
| 892 | + font-size: 16px; | |
| 893 | + } | |
| 894 | + | |
| 895 | + span { | |
| 896 | + font-weight: 500; | |
| 897 | + color: #303133; | |
| 898 | + } | |
| 899 | +} | |
| 900 | + | |
| 901 | +// 客户来源样式 | |
| 902 | +.source-info { | |
| 903 | + display: flex; | |
| 904 | + align-items: center; | |
| 905 | + justify-content: center; | |
| 906 | + gap: 6px; | |
| 907 | + | |
| 908 | + .source-icon { | |
| 909 | + color: #909399; | |
| 910 | + font-size: 16px; | |
| 911 | + } | |
| 912 | + | |
| 913 | + span { | |
| 914 | + font-weight: 500; | |
| 915 | + color: #303133; | |
| 916 | + } | |
| 917 | +} | |
| 918 | + | |
| 919 | +// 推荐人样式 | |
| 920 | +.referrer-info { | |
| 921 | + display: flex; | |
| 922 | + align-items: center; | |
| 923 | + justify-content: center; | |
| 924 | + gap: 6px; | |
| 925 | + | |
| 926 | + .referrer-icon { | |
| 927 | + color: #67C23A; | |
| 928 | + font-size: 16px; | |
| 929 | + } | |
| 930 | + | |
| 931 | + span { | |
| 932 | + font-weight: 500; | |
| 933 | + color: #303133; | |
| 934 | + } | |
| 935 | +} | |
| 936 | + | |
| 937 | +// 备注样式 | |
| 938 | +.remark-info { | |
| 939 | + display: flex; | |
| 940 | + align-items: center; | |
| 941 | + gap: 6px; | |
| 942 | + | |
| 943 | + .remark-icon { | |
| 944 | + color: #909399; | |
| 945 | + font-size: 14px; | |
| 946 | + } | |
| 947 | + | |
| 948 | + span { | |
| 949 | + color: #606266; | |
| 950 | + } | |
| 951 | +} | |
| 952 | + | |
| 953 | +// 顾客类型样式 | |
| 954 | +.customer-type-info { | |
| 955 | + display: flex; | |
| 956 | + align-items: center; | |
| 957 | + justify-content: center; | |
| 958 | + gap: 6px; | |
| 959 | + | |
| 960 | + .customer-type-icon { | |
| 961 | + color: #67C23A; | |
| 962 | + font-size: 16px; | |
| 963 | + } | |
| 964 | + | |
| 965 | + span { | |
| 966 | + font-weight: 500; | |
| 967 | + color: #303133; | |
| 968 | + } | |
| 969 | +} | |
| 970 | + | |
| 971 | +// 合作机构样式 | |
| 972 | +.cooperation-info { | |
| 973 | + display: flex; | |
| 974 | + align-items: center; | |
| 975 | + justify-content: center; | |
| 976 | + gap: 6px; | |
| 977 | + | |
| 978 | + .cooperation-icon { | |
| 979 | + color: #909399; | |
| 980 | + font-size: 16px; | |
| 981 | + } | |
| 982 | + | |
| 983 | + span { | |
| 984 | + font-weight: 500; | |
| 985 | + color: #303133; | |
| 986 | + } | |
| 987 | +} | |
| 988 | + | |
| 989 | +// 储扣方式样式 | |
| 990 | +.storage-info { | |
| 991 | + display: flex; | |
| 992 | + align-items: center; | |
| 993 | + justify-content: center; | |
| 994 | + gap: 6px; | |
| 995 | + | |
| 996 | + .storage-icon { | |
| 997 | + color: #E6A23C; | |
| 998 | + font-size: 16px; | |
| 999 | + } | |
| 1000 | + | |
| 1001 | + span { | |
| 1002 | + font-weight: 500; | |
| 1003 | + color: #303133; | |
| 1004 | + } | |
| 1005 | +} | |
| 1006 | + | |
| 1007 | +// 储扣明细样式 | |
| 1008 | +.storage-detail-info { | |
| 1009 | + display: flex; | |
| 1010 | + align-items: center; | |
| 1011 | + justify-content: center; | |
| 1012 | + gap: 6px; | |
| 1013 | + | |
| 1014 | + .storage-detail-icon { | |
| 1015 | + color: #909399; | |
| 1016 | + font-size: 16px; | |
| 1017 | + } | |
| 1018 | + | |
| 1019 | + span { | |
| 1020 | + font-weight: 500; | |
| 1021 | + color: #303133; | |
| 1022 | + } | |
| 1023 | +} | |
| 1024 | + | |
| 1025 | +// 付款医院样式 | |
| 1026 | +.hospital-info { | |
| 1027 | + display: flex; | |
| 1028 | + align-items: center; | |
| 1029 | + justify-content: center; | |
| 1030 | + gap: 6px; | |
| 1031 | + | |
| 1032 | + .hospital-icon { | |
| 1033 | + color: #67C23A; | |
| 1034 | + font-size: 16px; | |
| 1035 | + } | |
| 1036 | + | |
| 1037 | + span { | |
| 1038 | + font-weight: 500; | |
| 1039 | + color: #303133; | |
| 1040 | + } | |
| 1041 | +} | |
| 1042 | + | |
| 1043 | +// 付款判断样式 | |
| 1044 | +.payment-judge-info { | |
| 1045 | + display: flex; | |
| 1046 | + align-items: center; | |
| 1047 | + justify-content: center; | |
| 1048 | + gap: 6px; | |
| 1049 | + | |
| 1050 | + .payment-judge-icon { | |
| 1051 | + color: #409EFF; | |
| 1052 | + font-size: 16px; | |
| 1053 | + } | |
| 1054 | + | |
| 1055 | + span { | |
| 1056 | + font-weight: 500; | |
| 1057 | + color: #303133; | |
| 1058 | + } | |
| 1059 | +} | |
| 1060 | + | |
| 1061 | +// 是否首开订单样式 | |
| 1062 | +.first-order-info { | |
| 1063 | + display: flex; | |
| 1064 | + align-items: center; | |
| 1065 | + justify-content: center; | |
| 1066 | + gap: 6px; | |
| 1067 | + | |
| 1068 | + .first-order-icon { | |
| 1069 | + color: #E6A23C; | |
| 1070 | + font-size: 16px; | |
| 1071 | + } | |
| 1072 | + | |
| 1073 | + span { | |
| 1074 | + font-weight: 500; | |
| 1075 | + color: #303133; | |
| 1076 | + } | |
| 1077 | +} | |
| 1078 | + | |
| 1079 | +// 简介样式 | |
| 1080 | +.intro-info { | |
| 1081 | + display: flex; | |
| 1082 | + align-items: center; | |
| 1083 | + justify-content: center; | |
| 1084 | + gap: 6px; | |
| 1085 | + | |
| 1086 | + .intro-icon { | |
| 1087 | + color: #909399; | |
| 1088 | + font-size: 16px; | |
| 1089 | + } | |
| 1090 | + | |
| 1091 | + span { | |
| 1092 | + font-weight: 500; | |
| 1093 | + color: #303133; | |
| 1094 | + } | |
| 1095 | +} | |
| 1096 | + | |
| 1097 | +// 品项信息样式 | |
| 1098 | +.product-info { | |
| 1099 | + display: flex; | |
| 1100 | + align-items: center; | |
| 1101 | + justify-content: center; | |
| 1102 | + gap: 6px; | |
| 1103 | + | |
| 1104 | + .product-icon { | |
| 1105 | + color: #67C23A; | |
| 1106 | + font-size: 16px; | |
| 1107 | + } | |
| 1108 | + | |
| 1109 | + span { | |
| 1110 | + font-weight: 500; | |
| 1111 | + color: #303133; | |
| 1112 | + } | |
| 1113 | +} | |
| 1114 | + | |
| 1115 | +// 操作按钮样式 | |
| 1116 | +.action-buttons { | |
| 1117 | + display: flex; | |
| 1118 | + align-items: center; | |
| 1119 | + gap: 8px; | |
| 1120 | + | |
| 1121 | + .edit-btn { | |
| 1122 | + color: #409EFF; | |
| 1123 | + | |
| 1124 | + &:hover { | |
| 1125 | + color: #66b1ff; | |
| 1126 | + } | |
| 1127 | + } | |
| 1128 | + | |
| 1129 | + .delete-btn { | |
| 1130 | + color: #F56C6C; | |
| 1131 | + | |
| 1132 | + &:hover { | |
| 1133 | + color: #f78989; | |
| 1134 | + } | |
| 1135 | + } | |
| 1136 | +} | |
| 1137 | +</style> | |
| 490 | 1138 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/lqYcsdMdmbsd/components/TargetSettingDialog.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog | |
| 3 | + :title="dialogTitle" | |
| 4 | + :visible.sync="dialogVisible" | |
| 5 | + width="800px" | |
| 6 | + :close-on-click-modal="false" | |
| 7 | + :before-close="handleClose" | |
| 8 | + class="target-dialog" | |
| 9 | + > | |
| 10 | + <div class="dialog-header"> | |
| 11 | + <div class="store-info"> | |
| 12 | + <i class="el-icon-office-building"></i> | |
| 13 | + <span class="store-name">{{ formData.dm }}</span> | |
| 14 | + <el-tag size="small" type="primary">{{ formData.mdbm }}</el-tag> | |
| 15 | + </div> | |
| 16 | + </div> | |
| 17 | + <el-form :model="formData" :rules="formRules" ref="form" label-width="120px" class="edit-form"> | |
| 18 | + <el-row :gutter="20"> | |
| 19 | + <el-col :span="12"> | |
| 20 | + <el-form-item label="固定-生命线" prop="xsyj"> | |
| 21 | + <el-input | |
| 22 | + v-model="formData.xsyj" | |
| 23 | + placeholder="请输入固定-生命线目标" | |
| 24 | + type="number" | |
| 25 | + step="0.01" | |
| 26 | + > | |
| 27 | + <template slot="append">元</template> | |
| 28 | + </el-input> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="12"> | |
| 32 | + <el-form-item label="固定-消耗业绩" prop="xhyj"> | |
| 33 | + <el-input | |
| 34 | + v-model="formData.xhyj" | |
| 35 | + placeholder="请输入固定-消耗业绩目标" | |
| 36 | + type="number" | |
| 37 | + step="0.01" | |
| 38 | + > | |
| 39 | + <template slot="append">元</template> | |
| 40 | + </el-input> | |
| 41 | + </el-form-item> | |
| 42 | + </el-col> | |
| 43 | + </el-row> | |
| 44 | + <el-row :gutter="20"> | |
| 45 | + <el-col :span="12"> | |
| 46 | + <el-form-item label="固定-项目数" prop="xms"> | |
| 47 | + <el-input | |
| 48 | + v-model="formData.xms" | |
| 49 | + placeholder="请输入固定-项目数目标" | |
| 50 | + type="number" | |
| 51 | + > | |
| 52 | + <template slot="append">个</template> | |
| 53 | + </el-input> | |
| 54 | + </el-form-item> | |
| 55 | + </el-col> | |
| 56 | + <el-col :span="12"> | |
| 57 | + <el-form-item label="固定-人头" prop="rc"> | |
| 58 | + <el-input | |
| 59 | + v-model="formData.rc" | |
| 60 | + placeholder="请输入固定-人头目标" | |
| 61 | + type="number" | |
| 62 | + > | |
| 63 | + <template slot="append">次</template> | |
| 64 | + </el-input> | |
| 65 | + </el-form-item> | |
| 66 | + </el-col> | |
| 67 | + </el-row> | |
| 68 | + <el-row :gutter="20"> | |
| 69 | + <el-col :span="12"> | |
| 70 | + <el-form-item label="阶段一人头" prop="rt1"> | |
| 71 | + <el-input | |
| 72 | + v-model="formData.rt1" | |
| 73 | + placeholder="请输入阶段一人头目标" | |
| 74 | + type="number" | |
| 75 | + > | |
| 76 | + <template slot="append">人</template> | |
| 77 | + </el-input> | |
| 78 | + </el-form-item> | |
| 79 | + </el-col> | |
| 80 | + <el-col :span="12"> | |
| 81 | + <el-form-item label="阶段二人头" prop="rt2"> | |
| 82 | + <el-input | |
| 83 | + v-model="formData.rt2" | |
| 84 | + placeholder="请输入阶段二人头目标" | |
| 85 | + type="number" | |
| 86 | + > | |
| 87 | + <template slot="append">人</template> | |
| 88 | + </el-input> | |
| 89 | + </el-form-item> | |
| 90 | + </el-col> | |
| 91 | + </el-row> | |
| 92 | + </el-form> | |
| 93 | + <div slot="footer" class="dialog-footer"> | |
| 94 | + <el-button @click="handleClose" :disabled="saveLoading">取消</el-button> | |
| 95 | + <el-button type="primary" @click="saveData" :loading="saveLoading"> | |
| 96 | + <i class="el-icon-check"></i> 保存 | |
| 97 | + </el-button> | |
| 98 | + </div> | |
| 99 | + </el-dialog> | |
| 100 | +</template> | |
| 101 | + | |
| 102 | +<script> | |
| 103 | +import request from '@/utils/request' | |
| 104 | + | |
| 105 | +export default { | |
| 106 | + name: 'TargetSettingDialog', | |
| 107 | + props: { | |
| 108 | + visible: { | |
| 109 | + type: Boolean, | |
| 110 | + default: false | |
| 111 | + }, | |
| 112 | + storeData: { | |
| 113 | + type: Object, | |
| 114 | + default: () => ({}) | |
| 115 | + } | |
| 116 | + }, | |
| 117 | + data() { | |
| 118 | + return { | |
| 119 | + dialogVisible: false, | |
| 120 | + saveLoading: false, | |
| 121 | + formData: { | |
| 122 | + id: '', | |
| 123 | + mdbm: '', | |
| 124 | + dm: '', | |
| 125 | + xsyj: '', | |
| 126 | + xhyj: '', | |
| 127 | + xms: '', | |
| 128 | + rc: '', | |
| 129 | + rt1: '', | |
| 130 | + rt2: '' | |
| 131 | + }, | |
| 132 | + formRules: { | |
| 133 | + xsyj: [{ required: false, message: '请输入固定-生命线目标', trigger: 'blur' }], | |
| 134 | + xhyj: [{ required: false, message: '请输入固定-消耗业绩目标', trigger: 'blur' }], | |
| 135 | + xms: [{ required: false, message: '请输入固定-项目数目标', trigger: 'blur' }], | |
| 136 | + rc: [{ required: false, message: '请输入固定-人头目标', trigger: 'blur' }], | |
| 137 | + rt1: [{ required: false, message: '请输入阶段一人头目标', trigger: 'blur' }], | |
| 138 | + rt2: [{ required: false, message: '请输入阶段二人头目标', trigger: 'blur' }] | |
| 139 | + } | |
| 140 | + } | |
| 141 | + }, | |
| 142 | + computed: { | |
| 143 | + dialogTitle() { | |
| 144 | + return '设置门店目标' | |
| 145 | + } | |
| 146 | + }, | |
| 147 | + watch: { | |
| 148 | + visible: { | |
| 149 | + handler(newVal) { | |
| 150 | + this.dialogVisible = newVal | |
| 151 | + if (newVal && this.storeData.id) { | |
| 152 | + this.initForm() | |
| 153 | + } | |
| 154 | + }, | |
| 155 | + immediate: true | |
| 156 | + }, | |
| 157 | + dialogVisible(newVal) { | |
| 158 | + this.$emit('update:visible', newVal) | |
| 159 | + } | |
| 160 | + }, | |
| 161 | + methods: { | |
| 162 | + // 初始化表单数据 | |
| 163 | + initForm() { | |
| 164 | + this.formData = { | |
| 165 | + id: this.storeData.id || '', | |
| 166 | + mdbm: this.storeData.mdbm || '', | |
| 167 | + dm: this.storeData.dm || '', | |
| 168 | + xsyj: this.storeData.xsyj || '', | |
| 169 | + xhyj: this.storeData.xhyj || '', | |
| 170 | + xms: this.storeData.xms || '', | |
| 171 | + rc: this.storeData.rc || '', | |
| 172 | + rt1: this.storeData.rt1 || '', | |
| 173 | + rt2: this.storeData.rt2 || '' | |
| 174 | + } | |
| 175 | + }, | |
| 176 | + | |
| 177 | + // 保存数据 | |
| 178 | + saveData() { | |
| 179 | + this.$refs.form.validate((valid) => { | |
| 180 | + if (valid) { | |
| 181 | + this.saveLoading = true | |
| 182 | + | |
| 183 | + // 准备目标字段更新数据 | |
| 184 | + const updateData = { | |
| 185 | + xsyj: this.formData.xsyj ? parseFloat(this.formData.xsyj) : null, | |
| 186 | + xhyj: this.formData.xhyj ? parseFloat(this.formData.xhyj) : null, | |
| 187 | + xms: this.formData.xms ? parseInt(this.formData.xms) : null, | |
| 188 | + rc: this.formData.rc ? parseInt(this.formData.rc) : null, | |
| 189 | + rt1: this.formData.rt1 ? parseInt(this.formData.rt1) : null, | |
| 190 | + rt2: this.formData.rt2 ? parseInt(this.formData.rt2) : null | |
| 191 | + } | |
| 192 | + | |
| 193 | + // 调用专门的目标更新接口 | |
| 194 | + request({ | |
| 195 | + url: `/api/Extend/LqMdxx/${this.formData.id}/targets`, | |
| 196 | + method: 'PUT', | |
| 197 | + data: updateData | |
| 198 | + }).then(res => { | |
| 199 | + this.$message.success('保存成功') | |
| 200 | + this.handleClose() | |
| 201 | + this.$emit('refresh') | |
| 202 | + }).catch(() => { | |
| 203 | + this.$message.error('保存失败') | |
| 204 | + }).finally(() => { | |
| 205 | + this.saveLoading = false | |
| 206 | + }) | |
| 207 | + } | |
| 208 | + }) | |
| 209 | + }, | |
| 210 | + | |
| 211 | + // 关闭弹窗 | |
| 212 | + handleClose() { | |
| 213 | + if (this.saveLoading) { | |
| 214 | + this.$message.warning('正在保存中,请稍候...') | |
| 215 | + return | |
| 216 | + } | |
| 217 | + this.dialogVisible = false | |
| 218 | + this.$refs.form && this.$refs.form.resetFields() | |
| 219 | + } | |
| 220 | + } | |
| 221 | +} | |
| 222 | +</script> | |
| 223 | + | |
| 224 | +<style lang="scss" scoped> | |
| 225 | +// 弹窗样式 | |
| 226 | +.target-dialog { | |
| 227 | + .dialog-header { | |
| 228 | + padding: 16px 0; | |
| 229 | + border-bottom: 1px solid #EBEEF5; | |
| 230 | + margin-bottom: 20px; | |
| 231 | + | |
| 232 | + .store-info { | |
| 233 | + display: flex; | |
| 234 | + align-items: center; | |
| 235 | + gap: 12px; | |
| 236 | + | |
| 237 | + i { | |
| 238 | + font-size: 20px; | |
| 239 | + color: #409EFF; | |
| 240 | + } | |
| 241 | + | |
| 242 | + .store-name { | |
| 243 | + font-size: 16px; | |
| 244 | + font-weight: 600; | |
| 245 | + color: #303133; | |
| 246 | + } | |
| 247 | + } | |
| 248 | + } | |
| 249 | + | |
| 250 | + .edit-form { | |
| 251 | + .el-form-item { | |
| 252 | + margin-bottom: 20px; | |
| 253 | + } | |
| 254 | + } | |
| 255 | +} | |
| 256 | + | |
| 257 | +// 响应式设计 | |
| 258 | +@media (max-width: 768px) { | |
| 259 | + .target-dialog { | |
| 260 | + .el-dialog { | |
| 261 | + width: 95% !important; | |
| 262 | + margin: 0 auto; | |
| 263 | + } | |
| 264 | + } | |
| 265 | +} | |
| 266 | +</style> | ... | ... |
antis-ncc-admin/src/views/lqYcsdMdmbsd/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="NCC-common-layout"> |
| 3 | 3 | <div class="NCC-common-layout-center"> |
| 4 | + <!-- 搜索区域 --> | |
| 4 | 5 | <el-row class="NCC-common-search-box" :gutter="16"> |
| 5 | 6 | <el-form @submit.native.prevent> |
| 6 | - <el-col :span="6"> | |
| 7 | - <el-form-item label="目标编号"> | |
| 8 | - <el-input v-model="query.id" placeholder="目标编号" clearable /> | |
| 7 | + <el-col :span="5"> | |
| 8 | + <el-form-item label="门店编码"> | |
| 9 | + <el-input | |
| 10 | + v-model="query.mdbm" | |
| 11 | + placeholder="请输入门店编码" | |
| 12 | + clearable | |
| 13 | + prefix-icon="el-icon-search" | |
| 14 | + style="border-radius: 6px;" | |
| 15 | + /> | |
| 9 | 16 | </el-form-item> |
| 10 | 17 | </el-col> |
| 11 | - <el-col :span="6"> | |
| 12 | - <el-form-item label="销售业绩"> | |
| 13 | - <el-input v-model="query.xsyj" placeholder="销售业绩" clearable /> | |
| 18 | + <el-col :span="5"> | |
| 19 | + <el-form-item label="门店名称"> | |
| 20 | + <el-input | |
| 21 | + v-model="query.dm" | |
| 22 | + placeholder="请输入门店名称" | |
| 23 | + clearable | |
| 24 | + prefix-icon="el-icon-search" | |
| 25 | + style="border-radius: 6px;" | |
| 26 | + /> | |
| 14 | 27 | </el-form-item> |
| 15 | 28 | </el-col> |
| 16 | - <el-col :span="6"> | |
| 17 | - <el-form-item label="消耗业绩"> | |
| 18 | - <el-input v-model="query.xhyj" placeholder="消耗业绩" clearable /> | |
| 29 | + <el-col :span="5"> | |
| 30 | + <el-form-item label="单据门店"> | |
| 31 | + <el-input | |
| 32 | + v-model="query.djmd" | |
| 33 | + placeholder="请输入单据门店" | |
| 34 | + clearable | |
| 35 | + prefix-icon="el-icon-search" | |
| 36 | + style="border-radius: 6px;" | |
| 37 | + /> | |
| 19 | 38 | </el-form-item> |
| 20 | 39 | </el-col> |
| 21 | - <template v-if="showAll"> | |
| 22 | - <el-col :span="6"> | |
| 23 | - <el-form-item label="项目数"> | |
| 24 | - <el-input v-model="query.xms" placeholder="项目数" clearable /> | |
| 40 | + <el-col :span="5"> | |
| 41 | + <el-form-item label="城市"> | |
| 42 | + <el-input | |
| 43 | + v-model="query.cs" | |
| 44 | + placeholder="请输入城市" | |
| 45 | + clearable | |
| 46 | + prefix-icon="el-icon-search" | |
| 47 | + style="border-radius: 6px;" | |
| 48 | + /> | |
| 25 | 49 | </el-form-item> |
| 26 | 50 | </el-col> |
| 27 | - <el-col :span="6"> | |
| 28 | - <el-form-item label="人头"> | |
| 29 | - <el-input v-model="query.rt" placeholder="人头" clearable /> | |
| 30 | - </el-form-item> | |
| 31 | - </el-col> | |
| 32 | - <el-col :span="6"> | |
| 33 | - <el-form-item label="人次"> | |
| 34 | - <el-input v-model="query.rc" placeholder="人次" clearable /> | |
| 35 | - </el-form-item> | |
| 36 | - </el-col> | |
| 37 | - <el-col :span="6"> | |
| 38 | - <el-form-item label="目标分类"> | |
| 39 | - <el-input v-model="query.mbfl" placeholder="目标分类" clearable /> | |
| 40 | - </el-form-item> | |
| 41 | - </el-col> | |
| 42 | - <el-col :span="6"> | |
| 43 | - <el-form-item label="具体对应"> | |
| 44 | - <el-input v-model="query.jtdy" placeholder="具体对应" clearable /> | |
| 45 | - </el-form-item> | |
| 46 | - </el-col> | |
| 47 | - </template> | |
| 48 | - <el-col :span="6"> | |
| 51 | + <el-col :span="4"> | |
| 49 | 52 | <el-form-item> |
| 50 | - <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 51 | - <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 52 | - <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 53 | - <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> | |
| 53 | + <div class="search-buttons" style="height: 32px;"> | |
| 54 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 55 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 56 | + </div> | |
| 54 | 57 | </el-form-item> |
| 55 | 58 | </el-col> |
| 56 | 59 | </el-form> |
| 57 | 60 | </el-row> |
| 58 | 61 | <div class="NCC-common-layout-main NCC-flex-main"> |
| 59 | 62 | <div class="NCC-common-head"> |
| 60 | - <div> | |
| 61 | - <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 62 | - <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 63 | - <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 63 | + <div class="NCC-common-head-left"> | |
| 64 | + <h3 class="NCC-common-head-title"> | |
| 65 | + <i class="el-icon-target"></i> | |
| 66 | + 门店目标设置 | |
| 67 | + </h3> | |
| 64 | 68 | </div> |
| 65 | 69 | <div class="NCC-common-head-right"> |
| 66 | 70 | <el-tooltip effect="dark" content="刷新" placement="top"> |
| ... | ... | @@ -69,71 +73,120 @@ |
| 69 | 73 | <screenfull isContainer /> |
| 70 | 74 | </div> |
| 71 | 75 | </div> |
| 72 | - <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 73 | - <el-table-column prop="id" label="目标编号" align="left" /> | |
| 74 | - <el-table-column prop="xsyj" label="销售业绩" align="left" /> | |
| 75 | - <el-table-column prop="xhyj" label="消耗业绩" align="left" /> | |
| 76 | - <el-table-column prop="xms" label="项目数" align="left" /> | |
| 77 | - <el-table-column prop="rt" label="人头" align="left" /> | |
| 78 | - <el-table-column prop="rc" label="人次" align="left" /> | |
| 79 | - <el-table-column prop="mbfl" label="目标分类" align="left" /> | |
| 80 | - <el-table-column prop="jtdy" label="具体对应" align="left" /> | |
| 81 | - <el-table-column label="操作" fixed="right" width="100"> | |
| 82 | - <template slot-scope="scope"> | |
| 83 | - <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 84 | - <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 76 | + <NCC-table | |
| 77 | + v-loading="listLoading" | |
| 78 | + :data="list" | |
| 79 | + > | |
| 80 | + <el-table-column prop="mdbm" label="门店编码" align="left" width="120" show-overflow-tooltip> | |
| 81 | + <template slot-scope="scope"> | |
| 82 | + <el-tag size="small" type="primary">{{ scope.row.mdbm }}</el-tag> | |
| 83 | + </template> | |
| 84 | + </el-table-column> | |
| 85 | + <el-table-column prop="dm" label="门店名称" align="left" min-width="150" show-overflow-tooltip> | |
| 86 | + <template slot-scope="scope"> | |
| 87 | + <span class="store-name">{{ scope.row.dm }}</span> | |
| 88 | + </template> | |
| 89 | + </el-table-column> | |
| 90 | + <el-table-column prop="djmd" label="单据门店" align="left" width="150" show-overflow-tooltip /> | |
| 91 | + <el-table-column prop="cs" label="城市" align="left" width="100" show-overflow-tooltip /> | |
| 92 | + | |
| 93 | + <!-- 目标字段列 --> | |
| 94 | + <el-table-column label="固定-生命线" align="center" width="120"> | |
| 95 | + <template slot-scope="scope"> | |
| 96 | + <span v-if="scope.row.xsyj" class="target-value">{{ formatMoney(scope.row.xsyj) }}元</span> | |
| 97 | + <span v-else class="no-data">未设置</span> | |
| 98 | + </template> | |
| 99 | + </el-table-column> | |
| 100 | + | |
| 101 | + <el-table-column label="固定-消耗业绩" align="center" width="120"> | |
| 102 | + <template slot-scope="scope"> | |
| 103 | + <span v-if="scope.row.xhyj" class="target-value">{{ formatMoney(scope.row.xhyj) }}元</span> | |
| 104 | + <span v-else class="no-data">未设置</span> | |
| 105 | + </template> | |
| 106 | + </el-table-column> | |
| 107 | + | |
| 108 | + <el-table-column label="固定-项目数" align="center" width="100"> | |
| 109 | + <template slot-scope="scope"> | |
| 110 | + <span v-if="scope.row.xms" class="target-value">{{ scope.row.xms }}个</span> | |
| 111 | + <span v-else class="no-data">-</span> | |
| 112 | + </template> | |
| 113 | + </el-table-column> | |
| 114 | + | |
| 115 | + <el-table-column label="固定-人头" align="center" width="100"> | |
| 116 | + <template slot-scope="scope"> | |
| 117 | + <span v-if="scope.row.rc" class="target-value">{{ scope.row.rc }}次</span> | |
| 118 | + <span v-else class="no-data">-</span> | |
| 119 | + </template> | |
| 120 | + </el-table-column> | |
| 121 | + | |
| 122 | + <el-table-column label="阶段一人头" align="center" width="100"> | |
| 123 | + <template slot-scope="scope"> | |
| 124 | + <span v-if="scope.row.rt1" class="target-value">{{ scope.row.rt1 }}人</span> | |
| 125 | + <span v-else class="no-data">-</span> | |
| 126 | + </template> | |
| 127 | + </el-table-column> | |
| 128 | + | |
| 129 | + <el-table-column label="阶段二人头" align="center" width="100"> | |
| 130 | + <template slot-scope="scope"> | |
| 131 | + <span v-if="scope.row.rt2" class="target-value">{{ scope.row.rt2 }}人</span> | |
| 132 | + <span v-else class="no-data">-</span> | |
| 133 | + </template> | |
| 134 | + </el-table-column> | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + <el-table-column label="操作" fixed="right" width="120" align="center"> | |
| 139 | + <template slot-scope="scope"> | |
| 140 | + <el-button | |
| 141 | + type="text" | |
| 142 | + icon="el-icon-edit" | |
| 143 | + @click="editHandle(scope.row)" | |
| 144 | + class="action-btn" | |
| 145 | + > | |
| 146 | + 设置目标 | |
| 147 | + </el-button> | |
| 85 | 148 | </template> |
| 86 | 149 | </el-table-column> |
| 87 | 150 | </NCC-table> |
| 88 | 151 | <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> |
| 89 | 152 | </div> |
| 90 | 153 | </div> |
| 91 | - <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 92 | - <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 154 | + <!-- 目标设置弹窗 --> | |
| 155 | + <TargetSettingDialog | |
| 156 | + :visible.sync="dialogVisible" | |
| 157 | + :store-data="currentStoreData" | |
| 158 | + @refresh="initData" | |
| 159 | + /> | |
| 160 | + | |
| 93 | 161 | </div> |
| 94 | 162 | </template> |
| 95 | 163 | <script> |
| 96 | 164 | import request from '@/utils/request' |
| 97 | - import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 98 | - import NCCForm from './Form' | |
| 99 | - import ExportBox from './ExportBox' | |
| 100 | - import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 165 | + import TargetSettingDialog from './components/TargetSettingDialog.vue' | |
| 166 | + | |
| 101 | 167 | export default { |
| 102 | - components: { NCCForm, ExportBox }, | |
| 168 | + components: { | |
| 169 | + TargetSettingDialog | |
| 170 | + }, | |
| 103 | 171 | data() { |
| 104 | 172 | return { |
| 105 | - showAll: false, | |
| 106 | 173 | query: { |
| 107 | - id:undefined, | |
| 108 | - xsyj:undefined, | |
| 109 | - xhyj:undefined, | |
| 110 | - xms:undefined, | |
| 111 | - rt:undefined, | |
| 112 | - rc:undefined, | |
| 113 | - mbfl:undefined, | |
| 114 | - jtdy:undefined, | |
| 174 | + mdbm: undefined, | |
| 175 | + dm: undefined, | |
| 176 | + djmd: undefined, | |
| 177 | + cs: undefined | |
| 115 | 178 | }, |
| 116 | 179 | list: [], |
| 117 | 180 | listLoading: true, |
| 118 | - multipleSelection: [], total: 0, | |
| 181 | + total: 0, | |
| 119 | 182 | listQuery: { |
| 120 | 183 | currentPage: 1, |
| 121 | 184 | pageSize: 20, |
| 122 | 185 | sort: "desc", |
| 123 | 186 | sidx: "", |
| 124 | 187 | }, |
| 125 | - formVisible: false, | |
| 126 | - exportBoxVisible: false, | |
| 127 | - columnList: [ | |
| 128 | - { prop: 'id', label: '目标编号' }, | |
| 129 | - { prop: 'xsyj', label: '销售业绩' }, | |
| 130 | - { prop: 'xhyj', label: '消耗业绩' }, | |
| 131 | - { prop: 'xms', label: '项目数' }, | |
| 132 | - { prop: 'rt', label: '人头' }, | |
| 133 | - { prop: 'rc', label: '人次' }, | |
| 134 | - { prop: 'mbfl', label: '目标分类' }, | |
| 135 | - { prop: 'jtdy', label: '具体对应' }, | |
| 136 | - ], | |
| 188 | + dialogVisible: false, | |
| 189 | + currentStoreData: {} | |
| 137 | 190 | } |
| 138 | 191 | }, |
| 139 | 192 | computed: {}, |
| ... | ... | @@ -141,7 +194,19 @@ |
| 141 | 194 | this.initData() |
| 142 | 195 | }, |
| 143 | 196 | methods: { |
| 144 | - initData() { | |
| 197 | + // 格式化金额显示 | |
| 198 | + formatMoney(value) { | |
| 199 | + if (!value) return '0.00' | |
| 200 | + return parseFloat(value).toFixed(2) | |
| 201 | + }, | |
| 202 | + | |
| 203 | + // 编辑处理 | |
| 204 | + editHandle(row) { | |
| 205 | + this.currentStoreData = { ...row } | |
| 206 | + this.dialogVisible = true | |
| 207 | + }, | |
| 208 | + | |
| 209 | + async initData() { | |
| 145 | 210 | this.listLoading = true; |
| 146 | 211 | let _query = { |
| 147 | 212 | ...this.listQuery, |
| ... | ... | @@ -155,92 +220,24 @@ |
| 155 | 220 | query[key] = _query[key] |
| 156 | 221 | } |
| 157 | 222 | } |
| 158 | - request({ | |
| 159 | - url: `/api/Extend/LqYcsdMdmbsd`, | |
| 160 | - method: 'GET', | |
| 161 | - data: query | |
| 162 | - }).then(res => { | |
| 223 | + | |
| 224 | + try { | |
| 225 | + const res = await request({ | |
| 226 | + url: `/api/Extend/LqMdxx`, | |
| 227 | + method: 'GET', | |
| 228 | + data: query | |
| 229 | + }) | |
| 230 | + | |
| 163 | 231 | this.list = res.data.list |
| 164 | 232 | this.total = res.data.pagination.total |
| 233 | + | |
| 234 | + } catch (error) { | |
| 235 | + console.error('加载门店数据失败:', error) | |
| 236 | + } finally { | |
| 165 | 237 | this.listLoading = false |
| 166 | - }) | |
| 167 | - }, | |
| 168 | - handleDel(id) { | |
| 169 | - this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 170 | - type: 'warning' | |
| 171 | - }).then(() => { | |
| 172 | - request({ | |
| 173 | - url: `/api/Extend/LqYcsdMdmbsd/${id}`, | |
| 174 | - method: 'DELETE' | |
| 175 | - }).then(res => { | |
| 176 | - this.$message({ | |
| 177 | - type: 'success', | |
| 178 | - message: res.msg, | |
| 179 | - onClose: () => { | |
| 180 | - this.initData() | |
| 181 | - } | |
| 182 | - }); | |
| 183 | - }) | |
| 184 | - }).catch(() => { | |
| 185 | - }); | |
| 186 | - }, | |
| 187 | - handleSelectionChange(val) { | |
| 188 | - const res = val.map(item => item.id) | |
| 189 | - this.multipleSelection = res | |
| 190 | - }, | |
| 191 | - handleBatchRemoveDel() { | |
| 192 | - if (!this.multipleSelection.length) { | |
| 193 | - this.$message({ | |
| 194 | - type: 'error', | |
| 195 | - message: '请选择一条数据', | |
| 196 | - duration: 1500, | |
| 197 | - }) | |
| 198 | - return | |
| 199 | 238 | } |
| 200 | - const ids = this.multipleSelection | |
| 201 | - this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 202 | - type: 'warning' | |
| 203 | - }).then(() => { | |
| 204 | - request({ | |
| 205 | - url: `/api/Extend/LqYcsdMdmbsd/batchRemove`, | |
| 206 | - method: 'POST', | |
| 207 | - data: ids , | |
| 208 | - }).then(res => { | |
| 209 | - this.$message({ | |
| 210 | - type: 'success', | |
| 211 | - message: res.msg, | |
| 212 | - onClose: () => { | |
| 213 | - this.initData() | |
| 214 | - } | |
| 215 | - }); | |
| 216 | - }) | |
| 217 | - }).catch(() => { }) | |
| 218 | - }, | |
| 219 | - addOrUpdateHandle(id, isDetail) { | |
| 220 | - this.formVisible = true | |
| 221 | - this.$nextTick(() => { | |
| 222 | - this.$refs.NCCForm.init(id, isDetail) | |
| 223 | - }) | |
| 224 | - }, | |
| 225 | - exportData() { | |
| 226 | - this.exportBoxVisible = true | |
| 227 | - this.$nextTick(() => { | |
| 228 | - this.$refs.ExportBox.init(this.columnList) | |
| 229 | - }) | |
| 230 | - }, | |
| 231 | - download(data) { | |
| 232 | - let query = { ...data, ...this.listQuery, ...this.query } | |
| 233 | - request({ | |
| 234 | - url: `/api/Extend/LqYcsdMdmbsd/Actions/Export`, | |
| 235 | - method: 'GET', | |
| 236 | - data: query | |
| 237 | - }).then(res => { | |
| 238 | - if (!res.data.url) return | |
| 239 | - window.location.href = this.define.comUrl + res.data.url | |
| 240 | - this.$refs.ExportBox.visible = false | |
| 241 | - this.exportBoxVisible = false | |
| 242 | - }) | |
| 243 | 239 | }, |
| 240 | + | |
| 244 | 241 | search() { |
| 245 | 242 | this.listQuery = { |
| 246 | 243 | currentPage: 1, |
| ... | ... | @@ -250,10 +247,6 @@ |
| 250 | 247 | } |
| 251 | 248 | this.initData() |
| 252 | 249 | }, |
| 253 | - refresh(isrRefresh) { | |
| 254 | - this.formVisible = false | |
| 255 | - if (isrRefresh) this.reset() | |
| 256 | - }, | |
| 257 | 250 | reset() { |
| 258 | 251 | for (let key in this.query) { |
| 259 | 252 | this.query[key] = undefined |
| ... | ... | @@ -267,5 +260,90 @@ |
| 267 | 260 | this.initData() |
| 268 | 261 | } |
| 269 | 262 | } |
| 270 | - } | |
| 271 | -</script> | |
| 272 | 263 | \ No newline at end of file |
| 264 | + } | |
| 265 | +</script> | |
| 266 | + | |
| 267 | +<style lang="scss" scoped> | |
| 268 | + // 页面头部样式 | |
| 269 | + .NCC-common-head-left { | |
| 270 | + display: flex; | |
| 271 | + align-items: center; | |
| 272 | + gap: 12px; | |
| 273 | + } | |
| 274 | + | |
| 275 | + .NCC-common-head-title { | |
| 276 | + margin: 0; | |
| 277 | + font-size: 18px; | |
| 278 | + font-weight: 600; | |
| 279 | + color: #303133; | |
| 280 | + display: flex; | |
| 281 | + align-items: center; | |
| 282 | + gap: 8px; | |
| 283 | + | |
| 284 | + i { | |
| 285 | + color: #409EFF; | |
| 286 | + font-size: 20px; | |
| 287 | + } | |
| 288 | + } | |
| 289 | + | |
| 290 | + // 表格样式 | |
| 291 | + .store-name { | |
| 292 | + font-weight: 500; | |
| 293 | + color: #303133; | |
| 294 | + } | |
| 295 | + | |
| 296 | + .target-value { | |
| 297 | + font-weight: 500; | |
| 298 | + color: #67C23A; | |
| 299 | + } | |
| 300 | + | |
| 301 | + .no-data { | |
| 302 | + color: #C0C4CC; | |
| 303 | + font-style: italic; | |
| 304 | + } | |
| 305 | + | |
| 306 | + .action-btn { | |
| 307 | + padding: 4px 8px; | |
| 308 | + margin: 0 2px; | |
| 309 | + | |
| 310 | + &:hover { | |
| 311 | + background-color: #f5f7fa; | |
| 312 | + } | |
| 313 | + } | |
| 314 | + | |
| 315 | + | |
| 316 | + // 搜索区域样式 | |
| 317 | + .search-buttons { | |
| 318 | + display: flex; | |
| 319 | + align-items: center; | |
| 320 | + gap: 8px; | |
| 321 | + } | |
| 322 | + | |
| 323 | + // 响应式设计 | |
| 324 | + @media (max-width: 768px) { | |
| 325 | + .NCC-common-head { | |
| 326 | + flex-direction: column; | |
| 327 | + align-items: flex-start; | |
| 328 | + gap: 12px; | |
| 329 | + | |
| 330 | + .NCC-common-head-right { | |
| 331 | + width: 100%; | |
| 332 | + justify-content: flex-start; | |
| 333 | + } | |
| 334 | + } | |
| 335 | + | |
| 336 | + .el-col { | |
| 337 | + margin-bottom: 16px; | |
| 338 | + } | |
| 339 | + | |
| 340 | + } | |
| 341 | + | |
| 342 | + // 表格响应式 | |
| 343 | + @media (max-width: 1200px) { | |
| 344 | + .NCC-table { | |
| 345 | + .el-table { | |
| 346 | + font-size: 12px; | |
| 347 | + } | |
| 348 | + } | |
| 349 | + } | |
| 350 | +</style> | |
| 273 | 351 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/lqZjlMdsmxsz/components/BatchCreateDialog.vue
| ... | ... | @@ -19,12 +19,15 @@ |
| 19 | 19 | style="width: 300px" |
| 20 | 20 | @change="handleUserChange" |
| 21 | 21 | > |
| 22 | - <el-option | |
| 23 | - v-for="user in userList" | |
| 24 | - :key="user.id" | |
| 25 | - :label="user.realName" | |
| 26 | - :value="user.id" | |
| 27 | - /> | |
| 22 | + <el-option | |
| 23 | + v-for="user in userList" | |
| 24 | + :key="user.id" | |
| 25 | + :label="`${user.realName} (${user.gw || '无岗位'})`" | |
| 26 | + :value="user.id" | |
| 27 | + > | |
| 28 | + <span style="float: left">{{ user.realName }}</span> | |
| 29 | + <span style="float: right; color: #8492a6; font-size: 13px">{{ user.gw || '无岗位' }}</span> | |
| 30 | + </el-option> | |
| 28 | 31 | </el-select> |
| 29 | 32 | </el-form-item> |
| 30 | 33 | </el-form> |
| ... | ... | @@ -53,7 +56,7 @@ |
| 53 | 56 | min="0.01" |
| 54 | 57 | size="small" |
| 55 | 58 | > |
| 56 | - <template slot="prepend">¥</template> | |
| 59 | + <template slot="append">元</template> | |
| 57 | 60 | </el-input> |
| 58 | 61 | <el-input |
| 59 | 62 | v-model="scope.row.tcbl1" |
| ... | ... | @@ -82,7 +85,7 @@ |
| 82 | 85 | min="0.01" |
| 83 | 86 | size="small" |
| 84 | 87 | > |
| 85 | - <template slot="prepend">¥</template> | |
| 88 | + <template slot="append">元</template> | |
| 86 | 89 | </el-input> |
| 87 | 90 | <el-input |
| 88 | 91 | v-model="scope.row.tcbl2" |
| ... | ... | @@ -111,7 +114,7 @@ |
| 111 | 114 | min="0.01" |
| 112 | 115 | size="small" |
| 113 | 116 | > |
| 114 | - <template slot="prepend">¥</template> | |
| 117 | + <template slot="append">元</template> | |
| 115 | 118 | </el-input> |
| 116 | 119 | <el-input |
| 117 | 120 | v-model="scope.row.tcbl3" |
| ... | ... | @@ -143,7 +146,7 @@ |
| 143 | 146 | |
| 144 | 147 | <!-- 无门店提示 --> |
| 145 | 148 | <div class="form-section" v-if="formData.zjlUserid && managedStores.length === 0"> |
| 146 | - <el-empty description="该总经理暂无管理的门店" /> | |
| 149 | + <el-empty description="该经理暂无管理的门店" /> | |
| 147 | 150 | </div> |
| 148 | 151 | </div> |
| 149 | 152 | ... | ... |
antis-ncc-admin/src/views/lqZjlMdsmxsz/components/EditDialog.vue
| ... | ... | @@ -2,169 +2,157 @@ |
| 2 | 2 | <el-dialog |
| 3 | 3 | title="编辑生命线设置" |
| 4 | 4 | :visible.sync="dialogVisible" |
| 5 | - width="800px" | |
| 5 | + width="1200px" | |
| 6 | 6 | :close-on-click-modal="false" |
| 7 | 7 | @close="handleClose" |
| 8 | 8 | > |
| 9 | - <el-form | |
| 10 | - ref="form" | |
| 11 | - :model="formData" | |
| 12 | - :rules="rules" | |
| 13 | - label-width="120px" | |
| 14 | - class="edit-form" | |
| 15 | - > | |
| 16 | - <el-row :gutter="20"> | |
| 17 | - <el-col :span="12"> | |
| 18 | - <el-form-item label="总经理" prop="zjlUserid"> | |
| 9 | + <div class="dialog-content"> | |
| 10 | + <!-- 总经理选择 --> | |
| 11 | + <div class="form-section"> | |
| 12 | + <h3>选择总经理</h3> | |
| 13 | + <el-form :model="formData" label-width="100px"> | |
| 14 | + <el-form-item label="总经理" required> | |
| 19 | 15 | <el-select |
| 20 | 16 | v-model="formData.zjlUserid" |
| 21 | 17 | placeholder="请选择总经理" |
| 22 | 18 | filterable |
| 23 | - style="width: 100%" | |
| 19 | + style="width: 300px" | |
| 24 | 20 | disabled |
| 25 | 21 | > |
| 26 | - <el-option | |
| 27 | - v-for="user in userList" | |
| 28 | - :key="user.id" | |
| 29 | - :label="user.realName" | |
| 30 | - :value="user.id" | |
| 31 | - /> | |
| 32 | - </el-select> | |
| 33 | - </el-form-item> | |
| 34 | - </el-col> | |
| 35 | - | |
| 36 | - <el-col :span="12"> | |
| 37 | - <el-form-item label="门店" prop="mdId"> | |
| 38 | - <el-select | |
| 39 | - v-model="formData.mdId" | |
| 40 | - placeholder="请选择门店" | |
| 41 | - filterable | |
| 42 | - style="width: 100%" | |
| 43 | - disabled | |
| 22 | + <el-option | |
| 23 | + v-for="user in userList" | |
| 24 | + :key="user.id" | |
| 25 | + :label="`${user.realName} (${user.gw || '无岗位'})`" | |
| 26 | + :value="user.id" | |
| 44 | 27 | > |
| 45 | - <el-option | |
| 46 | - v-for="store in storeList" | |
| 47 | - :key="store.Id" | |
| 48 | - :label="store.Dm" | |
| 49 | - :value="store.Id" | |
| 50 | - /> | |
| 28 | + <span style="float: left">{{ user.realName }}</span> | |
| 29 | + <span style="float: right; color: #8492a6; font-size: 13px">{{ user.gw || '无岗位' }}</span> | |
| 30 | + </el-option> | |
| 51 | 31 | </el-select> |
| 52 | 32 | </el-form-item> |
| 53 | - </el-col> | |
| 54 | - </el-row> | |
| 33 | + </el-form> | |
| 34 | + </div> | |
| 55 | 35 | |
| 56 | - <!-- 生命线设置 --> | |
| 57 | - <div class="life-lines-section"> | |
| 58 | - <h4>生命线设置</h4> | |
| 59 | - | |
| 60 | - <el-row :gutter="20"> | |
| 36 | + <!-- 门店生命线设置表格 --> | |
| 37 | + <div class="form-section" v-if="formData.zjlUserid && managedStores.length > 0"> | |
| 38 | + <h3>门店生命线设置</h3> | |
| 39 | + <el-table | |
| 40 | + :data="managedStores" | |
| 41 | + border | |
| 42 | + stripe | |
| 43 | + style="width: 100%" | |
| 44 | + > | |
| 45 | + <el-table-column label="门店名称" width="200" align="center"> | |
| 46 | + <template slot-scope="scope"> | |
| 47 | + {{ getStoreName(scope.row.Id) }} | |
| 48 | + </template> | |
| 49 | + </el-table-column> | |
| 50 | + | |
| 61 | 51 | <!-- 生命线1 --> |
| 62 | - <el-col :span="8"> | |
| 63 | - <div class="life-line-group"> | |
| 64 | - <label class="life-line-label">生命线1 <span class="required">*</span></label> | |
| 52 | + <el-table-column label="生命线1" align="center" width="200"> | |
| 53 | + <template slot-scope="scope"> | |
| 65 | 54 | <div class="life-line-inputs"> |
| 66 | - <el-form-item prop="smx1"> | |
| 67 | - <el-input | |
| 68 | - v-model="formData.smx1" | |
| 69 | - placeholder="金额" | |
| 70 | - type="number" | |
| 71 | - step="0.01" | |
| 72 | - min="0.01" | |
| 73 | - > | |
| 74 | - <template slot="prepend">¥</template> | |
| 75 | - </el-input> | |
| 76 | - </el-form-item> | |
| 77 | - <el-form-item prop="tcbl1"> | |
| 78 | - <el-input | |
| 79 | - v-model="formData.tcbl1" | |
| 80 | - placeholder="提成比例" | |
| 81 | - type="number" | |
| 82 | - step="0.01" | |
| 83 | - min="0" | |
| 84 | - max="100" | |
| 85 | - > | |
| 86 | - <template slot="append">%</template> | |
| 87 | - </el-input> | |
| 88 | - </el-form-item> | |
| 55 | + <el-input | |
| 56 | + v-model="scope.row.smx1" | |
| 57 | + placeholder="金额" | |
| 58 | + type="number" | |
| 59 | + step="0.01" | |
| 60 | + min="0.01" | |
| 61 | + size="small" | |
| 62 | + > | |
| 63 | + <template slot="append">元</template> | |
| 64 | + </el-input> | |
| 65 | + <el-input | |
| 66 | + v-model="scope.row.tcbl1" | |
| 67 | + placeholder="提成比例" | |
| 68 | + type="number" | |
| 69 | + step="0.01" | |
| 70 | + min="0" | |
| 71 | + max="100" | |
| 72 | + size="small" | |
| 73 | + > | |
| 74 | + <template slot="append">%</template> | |
| 75 | + </el-input> | |
| 89 | 76 | </div> |
| 90 | - </div> | |
| 91 | - </el-col> | |
| 77 | + </template> | |
| 78 | + </el-table-column> | |
| 92 | 79 | |
| 93 | 80 | <!-- 生命线2 --> |
| 94 | - <el-col :span="8"> | |
| 95 | - <div class="life-line-group"> | |
| 96 | - <label class="life-line-label">生命线2</label> | |
| 81 | + <el-table-column label="生命线2" align="center" width="200"> | |
| 82 | + <template slot-scope="scope"> | |
| 97 | 83 | <div class="life-line-inputs"> |
| 98 | - <el-form-item prop="smx2"> | |
| 99 | - <el-input | |
| 100 | - v-model="formData.smx2" | |
| 101 | - placeholder="金额" | |
| 102 | - type="number" | |
| 103 | - step="0.01" | |
| 104 | - min="0.01" | |
| 105 | - > | |
| 106 | - <template slot="prepend">¥</template> | |
| 107 | - </el-input> | |
| 108 | - </el-form-item> | |
| 109 | - <el-form-item prop="tcbl2"> | |
| 110 | - <el-input | |
| 111 | - v-model="formData.tcbl2" | |
| 112 | - placeholder="提成比例" | |
| 113 | - type="number" | |
| 114 | - step="0.01" | |
| 115 | - min="0" | |
| 116 | - max="100" | |
| 117 | - > | |
| 118 | - <template slot="append">%</template> | |
| 119 | - </el-input> | |
| 120 | - </el-form-item> | |
| 84 | + <el-input | |
| 85 | + v-model="scope.row.smx2" | |
| 86 | + placeholder="金额" | |
| 87 | + type="number" | |
| 88 | + step="0.01" | |
| 89 | + min="0.01" | |
| 90 | + size="small" | |
| 91 | + > | |
| 92 | + <template slot="append">元</template> | |
| 93 | + </el-input> | |
| 94 | + <el-input | |
| 95 | + v-model="scope.row.tcbl2" | |
| 96 | + placeholder="提成比例" | |
| 97 | + type="number" | |
| 98 | + step="0.01" | |
| 99 | + min="0" | |
| 100 | + max="100" | |
| 101 | + size="small" | |
| 102 | + > | |
| 103 | + <template slot="append">%</template> | |
| 104 | + </el-input> | |
| 121 | 105 | </div> |
| 122 | - </div> | |
| 123 | - </el-col> | |
| 106 | + </template> | |
| 107 | + </el-table-column> | |
| 124 | 108 | |
| 125 | 109 | <!-- 生命线3 --> |
| 126 | - <el-col :span="8"> | |
| 127 | - <div class="life-line-group"> | |
| 128 | - <label class="life-line-label">生命线3</label> | |
| 110 | + <el-table-column label="生命线3" align="center" width="200"> | |
| 111 | + <template slot-scope="scope"> | |
| 129 | 112 | <div class="life-line-inputs"> |
| 130 | - <el-form-item prop="smx3"> | |
| 131 | - <el-input | |
| 132 | - v-model="formData.smx3" | |
| 133 | - placeholder="金额" | |
| 134 | - type="number" | |
| 135 | - step="0.01" | |
| 136 | - min="0.01" | |
| 137 | - > | |
| 138 | - <template slot="prepend">¥</template> | |
| 139 | - </el-input> | |
| 140 | - </el-form-item> | |
| 141 | - <el-form-item prop="tcbl3"> | |
| 142 | - <el-input | |
| 143 | - v-model="formData.tcbl3" | |
| 144 | - placeholder="提成比例" | |
| 145 | - type="number" | |
| 146 | - step="0.01" | |
| 147 | - min="0" | |
| 148 | - max="100" | |
| 149 | - > | |
| 150 | - <template slot="append">%</template> | |
| 151 | - </el-input> | |
| 152 | - </el-form-item> | |
| 113 | + <el-input | |
| 114 | + v-model="scope.row.smx3" | |
| 115 | + placeholder="金额" | |
| 116 | + type="number" | |
| 117 | + step="0.01" | |
| 118 | + min="0.01" | |
| 119 | + size="small" | |
| 120 | + > | |
| 121 | + <template slot="append">元</template> | |
| 122 | + </el-input> | |
| 123 | + <el-input | |
| 124 | + v-model="scope.row.tcbl3" | |
| 125 | + placeholder="提成比例" | |
| 126 | + type="number" | |
| 127 | + step="0.01" | |
| 128 | + min="0" | |
| 129 | + max="100" | |
| 130 | + size="small" | |
| 131 | + > | |
| 132 | + <template slot="append">%</template> | |
| 133 | + </el-input> | |
| 153 | 134 | </div> |
| 154 | - </div> | |
| 155 | - </el-col> | |
| 156 | - </el-row> | |
| 135 | + </template> | |
| 136 | + </el-table-column> | |
| 137 | + | |
| 138 | + <!-- 备注 --> | |
| 139 | + <el-table-column label="备注" align="center" min-width="150"> | |
| 140 | + <template slot-scope="scope"> | |
| 141 | + <el-input | |
| 142 | + v-model="scope.row.bz" | |
| 143 | + placeholder="请输入备注" | |
| 144 | + size="small" | |
| 145 | + /> | |
| 146 | + </template> | |
| 147 | + </el-table-column> | |
| 148 | + </el-table> | |
| 157 | 149 | </div> |
| 158 | 150 | |
| 159 | - <el-form-item label="备注" prop="bz"> | |
| 160 | - <el-input | |
| 161 | - v-model="formData.bz" | |
| 162 | - type="textarea" | |
| 163 | - :rows="3" | |
| 164 | - placeholder="请输入备注信息" | |
| 165 | - /> | |
| 166 | - </el-form-item> | |
| 167 | - </el-form> | |
| 151 | + <!-- 无门店提示 --> | |
| 152 | + <div class="form-section" v-if="formData.zjlUserid && managedStores.length === 0"> | |
| 153 | + <el-empty description="该经理暂无管理的门店" /> | |
| 154 | + </div> | |
| 155 | + </div> | |
| 168 | 156 | |
| 169 | 157 | <div slot="footer" class="dialog-footer"> |
| 170 | 158 | <el-button @click="handleClose">取消</el-button> |
| ... | ... | @@ -172,6 +160,7 @@ |
| 172 | 160 | type="primary" |
| 173 | 161 | @click="handleSubmit" |
| 174 | 162 | :loading="loading" |
| 163 | + :disabled="!canSubmit" | |
| 175 | 164 | > |
| 176 | 165 | 确定 |
| 177 | 166 | </el-button> |
| ... | ... | @@ -206,83 +195,136 @@ export default { |
| 206 | 195 | return { |
| 207 | 196 | loading: false, |
| 208 | 197 | dialogVisible: false, |
| 209 | - rules: { | |
| 210 | - smx1: [ | |
| 211 | - { required: true, message: '请输入生命线1金额', trigger: 'blur' }, | |
| 212 | - { type: 'number', min: 0.01, message: '生命线1金额必须大于0', trigger: 'blur' } | |
| 213 | - ], | |
| 214 | - tcbl1: [ | |
| 215 | - { required: true, message: '请输入生命线1提成比例', trigger: 'blur' }, | |
| 216 | - { type: 'number', min: 0, max: 100, message: '提成比例必须在0-100之间', trigger: 'blur' } | |
| 217 | - ], | |
| 218 | - smx2: [ | |
| 219 | - { type: 'number', min: 0.01, message: '生命线2金额必须大于0', trigger: 'blur' } | |
| 220 | - ], | |
| 221 | - tcbl2: [ | |
| 222 | - { type: 'number', min: 0, max: 100, message: '提成比例必须在0-100之间', trigger: 'blur' } | |
| 223 | - ], | |
| 224 | - smx3: [ | |
| 225 | - { type: 'number', min: 0.01, message: '生命线3金额必须大于0', trigger: 'blur' } | |
| 226 | - ], | |
| 227 | - tcbl3: [ | |
| 228 | - { type: 'number', min: 0, max: 100, message: '提成比例必须在0-100之间', trigger: 'blur' } | |
| 229 | - ] | |
| 230 | - } | |
| 198 | + localFormData: { | |
| 199 | + zjlUserid: '', | |
| 200 | + mdId: '' | |
| 201 | + }, | |
| 202 | + managedStores: [] | |
| 203 | + } | |
| 204 | + }, | |
| 205 | + computed: { | |
| 206 | + formData() { | |
| 207 | + return this.localFormData | |
| 208 | + }, | |
| 209 | + canSubmit() { | |
| 210 | + return this.formData.zjlUserid && | |
| 211 | + this.managedStores.length > 0 && | |
| 212 | + this.managedStores.every(store => this.validateStore(store)) | |
| 231 | 213 | } |
| 232 | 214 | }, |
| 233 | 215 | watch: { |
| 234 | 216 | visible(val) { |
| 235 | 217 | this.dialogVisible = val |
| 236 | - if (val && this.formData) { | |
| 237 | - this.initFormData() | |
| 218 | + if (val && this.$props.formData) { | |
| 219 | + this.$nextTick(() => { | |
| 220 | + this.initFormData() | |
| 221 | + }) | |
| 238 | 222 | } |
| 223 | + }, | |
| 224 | + storeList: { | |
| 225 | + handler() { | |
| 226 | + // 当门店列表更新时,强制重新渲染 | |
| 227 | + this.$forceUpdate() | |
| 228 | + }, | |
| 229 | + deep: true | |
| 239 | 230 | } |
| 240 | 231 | }, |
| 241 | 232 | methods: { |
| 242 | 233 | // 初始化表单数据 |
| 243 | 234 | initFormData() { |
| 244 | - this.formData = { | |
| 245 | - id: this.formData.id || '', | |
| 246 | - zjlUserid: this.formData.zjlUserid || '', | |
| 247 | - mdId: this.formData.mdId || '', | |
| 248 | - smx1: this.formData.smx1 || '', | |
| 249 | - tcbl1: this.formData.tcbl1 || '', | |
| 250 | - smx2: this.formData.smx2 || '', | |
| 251 | - tcbl2: this.formData.tcbl2 || '', | |
| 252 | - smx3: this.formData.smx3 || '', | |
| 253 | - tcbl3: this.formData.tcbl3 || '', | |
| 254 | - bz: this.formData.bz || '' | |
| 235 | + const propsData = this.$props.formData || {} | |
| 236 | + console.log('原始数据:', propsData) | |
| 237 | + | |
| 238 | + this.localFormData = { | |
| 239 | + zjlUserid: propsData.ZjlUserid || propsData.zjlUserid || '', | |
| 240 | + mdId: propsData.MdId || propsData.mdId || '' | |
| 241 | + } | |
| 242 | + | |
| 243 | + // 构建门店数据 | |
| 244 | + this.managedStores = [{ | |
| 245 | + Id: propsData.MdId || propsData.mdId || '', | |
| 246 | + smx1: propsData.Smx1 || propsData.smx1 || '', | |
| 247 | + tcbl1: propsData.Tcbl1 || propsData.tcbl1 || '', | |
| 248 | + smx2: propsData.Smx2 || propsData.smx2 || '', | |
| 249 | + tcbl2: propsData.Tcbl2 || propsData.tcbl2 || '', | |
| 250 | + smx3: propsData.Smx3 || propsData.smx3 || '', | |
| 251 | + tcbl3: propsData.Tcbl3 || propsData.tcbl3 || '', | |
| 252 | + bz: propsData.Bz || propsData.bz || '' | |
| 253 | + }] | |
| 254 | + | |
| 255 | + console.log('初始化表单数据:', this.localFormData) | |
| 256 | + console.log('门店数据:', this.managedStores) | |
| 257 | + }, | |
| 258 | + | |
| 259 | + // 获取门店名称 | |
| 260 | + getStoreName(mdId) { | |
| 261 | + console.log('查找门店ID:', mdId) | |
| 262 | + console.log('门店列表长度:', this.storeList.length) | |
| 263 | + console.log('门店列表前3条:', this.storeList.slice(0, 3)) | |
| 264 | + | |
| 265 | + const store = this.storeList.find(s => s.id === mdId) | |
| 266 | + console.log('找到的门店:', store) | |
| 267 | + | |
| 268 | + if (store) { | |
| 269 | + console.log('门店名称字段:', store.dm) | |
| 270 | + return store.dm || mdId | |
| 271 | + } | |
| 272 | + | |
| 273 | + return mdId | |
| 274 | + }, | |
| 275 | + | |
| 276 | + // 验证单个门店 | |
| 277 | + validateStore(store) { | |
| 278 | + // 生命线1是必填的 | |
| 279 | + if (store.smx1 && store.tcbl1) { | |
| 280 | + return Number(store.smx1) > 0 && | |
| 281 | + Number(store.tcbl1) >= 0 && | |
| 282 | + Number(store.tcbl1) <= 100 | |
| 255 | 283 | } |
| 284 | + // 如果生命线1为空,则其他生命线也必须为空 | |
| 285 | + return !store.smx2 && !store.tcbl2 && !store.smx3 && !store.tcbl3 | |
| 256 | 286 | }, |
| 257 | 287 | |
| 258 | 288 | // 提交 |
| 259 | 289 | async handleSubmit() { |
| 290 | + if (!this.canSubmit) { | |
| 291 | + this.$message.warning('请完善必填信息') | |
| 292 | + return | |
| 293 | + } | |
| 294 | + | |
| 295 | + // 验证数据 | |
| 296 | + for (let i = 0; i < this.managedStores.length; i++) { | |
| 297 | + const store = this.managedStores[i] | |
| 298 | + if (!this.validateStore(store)) { | |
| 299 | + this.$message.warning(`门店 ${store.Dm} 设置信息不完整`) | |
| 300 | + return | |
| 301 | + } | |
| 302 | + } | |
| 303 | + | |
| 304 | + this.loading = true | |
| 260 | 305 | try { |
| 261 | - await this.$refs.form.validate() | |
| 262 | - | |
| 263 | - this.loading = true | |
| 264 | - | |
| 265 | - // 准备提交数据 | |
| 266 | 306 | const submitData = { |
| 267 | - id: this.formData.id, | |
| 268 | - smx1: Number(this.formData.smx1), | |
| 269 | - tcbl1: Number(this.formData.tcbl1), | |
| 270 | - smx2: this.formData.smx2 ? Number(this.formData.smx2) : null, | |
| 271 | - tcbl2: this.formData.tcbl2 ? Number(this.formData.tcbl2) : null, | |
| 272 | - smx3: this.formData.smx3 ? Number(this.formData.smx3) : null, | |
| 273 | - tcbl3: this.formData.tcbl3 ? Number(this.formData.tcbl3) : null, | |
| 274 | - bz: this.formData.bz || '' | |
| 307 | + Smx1: this.managedStores[0].smx1 ? Number(this.managedStores[0].smx1) : 0, | |
| 308 | + Tcbl1: this.managedStores[0].tcbl1 ? Number(this.managedStores[0].tcbl1) : 0, | |
| 309 | + Smx2: this.managedStores[0].smx2 ? Number(this.managedStores[0].smx2) : null, | |
| 310 | + Tcbl2: this.managedStores[0].tcbl2 ? Number(this.managedStores[0].tcbl2) : null, | |
| 311 | + Smx3: this.managedStores[0].smx3 ? Number(this.managedStores[0].smx3) : null, | |
| 312 | + Tcbl3: this.managedStores[0].tcbl3 ? Number(this.managedStores[0].tcbl3) : null, | |
| 313 | + Bz: this.managedStores[0].bz || '' | |
| 275 | 314 | } |
| 276 | 315 | |
| 277 | - // TODO: 调用更新接口 | |
| 278 | - // await lqZjlMdsmxszApi.update(submitData) | |
| 316 | + // 调用更新接口 | |
| 317 | + const recordId = this.$props.formData.Id || this.$props.formData.id | |
| 318 | + console.log('更新记录ID:', recordId) | |
| 319 | + console.log('更新数据:', submitData) | |
| 320 | + await lqZjlMdsmxszApi.update(recordId, submitData) | |
| 279 | 321 | |
| 280 | 322 | this.$message.success('编辑成功') |
| 281 | 323 | this.$emit('success') |
| 282 | 324 | this.handleClose() |
| 283 | 325 | } catch (error) { |
| 284 | 326 | console.error('编辑失败:', error) |
| 285 | - this.$message.error('编辑失败') | |
| 327 | + this.$message.error(error.message || '编辑失败') | |
| 286 | 328 | } finally { |
| 287 | 329 | this.loading = false |
| 288 | 330 | } |
| ... | ... | @@ -292,48 +334,44 @@ export default { |
| 292 | 334 | handleClose() { |
| 293 | 335 | this.dialogVisible = false |
| 294 | 336 | this.$emit('close') |
| 295 | - this.$refs.form && this.$refs.form.resetFields() | |
| 296 | 337 | } |
| 297 | 338 | } |
| 298 | 339 | } |
| 299 | 340 | </script> |
| 300 | 341 | |
| 301 | 342 | <style lang="scss" scoped> |
| 302 | -.edit-form { | |
| 303 | - .life-lines-section { | |
| 304 | - margin: 20px 0; | |
| 305 | - padding: 20px; | |
| 306 | - background: #FAFAFA; | |
| 307 | - border-radius: 8px; | |
| 343 | +.dialog-content { | |
| 344 | + max-height: 70vh; | |
| 345 | + overflow-y: auto; | |
| 346 | +} | |
| 308 | 347 | |
| 309 | - h4 { | |
| 310 | - margin: 0 0 20px 0; | |
| 311 | - color: #303133; | |
| 312 | - font-size: 16px; | |
| 313 | - font-weight: 600; | |
| 314 | - border-bottom: 2px solid #409EFF; | |
| 315 | - padding-bottom: 8px; | |
| 316 | - } | |
| 348 | +.form-section { | |
| 349 | + margin-bottom: 30px; | |
| 317 | 350 | |
| 318 | - .life-line-group { | |
| 319 | - .life-line-label { | |
| 320 | - display: block; | |
| 321 | - margin-bottom: 8px; | |
| 322 | - color: #606266; | |
| 323 | - font-size: 14px; | |
| 324 | - font-weight: 500; | |
| 351 | + h3 { | |
| 352 | + margin: 0 0 20px 0; | |
| 353 | + color: #303133; | |
| 354 | + font-size: 16px; | |
| 355 | + font-weight: 600; | |
| 356 | + border-bottom: 2px solid #409EFF; | |
| 357 | + padding-bottom: 8px; | |
| 358 | + } | |
| 359 | +} | |
| 325 | 360 | |
| 326 | - .required { | |
| 327 | - color: #F56C6C; | |
| 328 | - } | |
| 329 | - } | |
| 361 | +.section-header { | |
| 362 | + display: flex; | |
| 363 | + justify-content: space-between; | |
| 364 | + align-items: center; | |
| 365 | + margin-bottom: 20px; | |
| 366 | +} | |
| 330 | 367 | |
| 331 | - .life-line-inputs { | |
| 332 | - .el-form-item { | |
| 333 | - margin-bottom: 12px; | |
| 334 | - } | |
| 335 | - } | |
| 336 | - } | |
| 368 | +.life-line-inputs { | |
| 369 | + display: flex; | |
| 370 | + flex-direction: column; | |
| 371 | + gap: 8px; | |
| 372 | + | |
| 373 | + .el-input { | |
| 374 | + width: 100%; | |
| 337 | 375 | } |
| 338 | 376 | } |
| 339 | 377 | |
| ... | ... | @@ -342,4 +380,4 @@ export default { |
| 342 | 380 | padding-top: 20px; |
| 343 | 381 | border-top: 1px solid #E4E7ED; |
| 344 | 382 | } |
| 345 | 383 | -</style> |
| 384 | +</style> | |
| 346 | 385 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/lqZjlMdsmxsz/index.vue
| ... | ... | @@ -40,9 +40,12 @@ |
| 40 | 40 | <el-option |
| 41 | 41 | v-for="user in userList" |
| 42 | 42 | :key="user.id" |
| 43 | - :label="user.realName" | |
| 43 | + :label="`${user.realName} (${user.gw || '无岗位'})`" | |
| 44 | 44 | :value="user.id" |
| 45 | - /> | |
| 45 | + > | |
| 46 | + <span style="float: left">{{ user.realName }}</span> | |
| 47 | + <span style="float: right; color: #8492a6; font-size: 13px">{{ user.gw || '无岗位' }}</span> | |
| 48 | + </el-option> | |
| 46 | 49 | </el-select> |
| 47 | 50 | </el-form-item> |
| 48 | 51 | <el-form-item label="门店" prop="mdId"> |
| ... | ... | @@ -77,69 +80,147 @@ |
| 77 | 80 | border |
| 78 | 81 | stripe |
| 79 | 82 | height="calc(100vh - 300px)" |
| 83 | + :header-cell-style="{ background: '#f5f7fa', color: '#606266' }" | |
| 80 | 84 | > |
| 81 | - <el-table-column prop="zjlName" label="总经理" width="120" align="center" /> | |
| 82 | - <el-table-column prop="mdbm" label="门店编码" width="120" align="center" /> | |
| 83 | - <el-table-column prop="dm" label="门店名称" width="150" align="center" /> | |
| 85 | + <!-- 总经理 --> | |
| 86 | + <el-table-column label="总经理" width="140" align="center"> | |
| 87 | + <template slot-scope="scope"> | |
| 88 | + <div class="user-info"> | |
| 89 | + <i class="el-icon-user-solid user-icon"></i> | |
| 90 | + <span>{{ scope.row.ZjlName || '无' }}</span> | |
| 91 | + </div> | |
| 92 | + </template> | |
| 93 | + </el-table-column> | |
| 94 | + | |
| 95 | + <!-- 门店编码 --> | |
| 96 | + <el-table-column label="门店编码" width="120" align="center"> | |
| 97 | + <template slot-scope="scope"> | |
| 98 | + <div class="store-code"> | |
| 99 | + <i class="el-icon-office-building store-icon"></i> | |
| 100 | + <span>{{ scope.row.Mdbm || '无' }}</span> | |
| 101 | + </div> | |
| 102 | + </template> | |
| 103 | + </el-table-column> | |
| 104 | + | |
| 105 | + <!-- 门店名称 --> | |
| 106 | + <el-table-column label="门店名称" width="160" align="center"> | |
| 107 | + <template slot-scope="scope"> | |
| 108 | + <div class="store-name"> | |
| 109 | + <i class="el-icon-shop store-icon"></i> | |
| 110 | + <span>{{ scope.row.Dm || '无' }}</span> | |
| 111 | + </div> | |
| 112 | + </template> | |
| 113 | + </el-table-column> | |
| 84 | 114 | |
| 85 | 115 | <!-- 生命线1 --> |
| 86 | - <el-table-column label="生命线1" align="center" width="200"> | |
| 116 | + <el-table-column label="生命线1" align="center" width="140"> | |
| 87 | 117 | <template slot-scope="scope"> |
| 88 | 118 | <div class="life-line-item"> |
| 89 | - <span class="amount">¥{{ formatMoney(scope.row.smx1) }}</span> | |
| 90 | - <span class="ratio">{{ scope.row.tcbl1 }}%</span> | |
| 119 | + <i class="el-icon-money life-line-icon"></i> | |
| 120 | + <span v-if="scope.row.Smx1" class="amount">{{ formatMoney(scope.row.Smx1) }}元</span> | |
| 121 | + <span v-else class="no-data">无</span> | |
| 122 | + </div> | |
| 123 | + </template> | |
| 124 | + </el-table-column> | |
| 125 | + | |
| 126 | + <!-- 提成比例1 --> | |
| 127 | + <el-table-column label="提成比例1" align="center" width="120"> | |
| 128 | + <template slot-scope="scope"> | |
| 129 | + <div class="ratio-item"> | |
| 130 | + <i class="el-icon-percent ratio-icon"></i> | |
| 131 | + <span v-if="scope.row.Tcbl1" class="ratio">{{ scope.row.Tcbl1 }}%</span> | |
| 132 | + <span v-else class="no-data">无</span> | |
| 91 | 133 | </div> |
| 92 | 134 | </template> |
| 93 | 135 | </el-table-column> |
| 94 | 136 | |
| 95 | 137 | <!-- 生命线2 --> |
| 96 | - <el-table-column label="生命线2" align="center" width="200"> | |
| 138 | + <el-table-column label="生命线2" align="center" width="140"> | |
| 139 | + <template slot-scope="scope"> | |
| 140 | + <div class="life-line-item"> | |
| 141 | + <i class="el-icon-money life-line-icon"></i> | |
| 142 | + <span v-if="scope.row.Smx2" class="amount">{{ formatMoney(scope.row.Smx2) }}元</span> | |
| 143 | + <span v-else class="no-data">无</span> | |
| 144 | + </div> | |
| 145 | + </template> | |
| 146 | + </el-table-column> | |
| 147 | + | |
| 148 | + <!-- 提成比例2 --> | |
| 149 | + <el-table-column label="提成比例2" align="center" width="120"> | |
| 97 | 150 | <template slot-scope="scope"> |
| 98 | - <div class="life-line-item" v-if="scope.row.smx2"> | |
| 99 | - <span class="amount">¥{{ formatMoney(scope.row.smx2) }}</span> | |
| 100 | - <span class="ratio">{{ scope.row.tcbl2 }}%</span> | |
| 151 | + <div class="ratio-item"> | |
| 152 | + <i class="el-icon-percent ratio-icon"></i> | |
| 153 | + <span v-if="scope.row.Tcbl2" class="ratio">{{ scope.row.Tcbl2 }}%</span> | |
| 154 | + <span v-else class="no-data">无</span> | |
| 101 | 155 | </div> |
| 102 | - <span v-else class="no-data">未设置</span> | |
| 103 | 156 | </template> |
| 104 | 157 | </el-table-column> |
| 105 | 158 | |
| 106 | 159 | <!-- 生命线3 --> |
| 107 | - <el-table-column label="生命线3" align="center" width="200"> | |
| 160 | + <el-table-column label="生命线3" align="center" width="140"> | |
| 108 | 161 | <template slot-scope="scope"> |
| 109 | - <div class="life-line-item" v-if="scope.row.smx3"> | |
| 110 | - <span class="amount">¥{{ formatMoney(scope.row.smx3) }}</span> | |
| 111 | - <span class="ratio">{{ scope.row.tcbl3 }}%</span> | |
| 162 | + <div class="life-line-item"> | |
| 163 | + <i class="el-icon-money life-line-icon"></i> | |
| 164 | + <span v-if="scope.row.Smx3" class="amount">{{ formatMoney(scope.row.Smx3) }}元</span> | |
| 165 | + <span v-else class="no-data">无</span> | |
| 112 | 166 | </div> |
| 113 | - <span v-else class="no-data">未设置</span> | |
| 114 | 167 | </template> |
| 115 | 168 | </el-table-column> |
| 116 | 169 | |
| 117 | - <el-table-column prop="bz" label="备注" min-width="150" show-overflow-tooltip /> | |
| 118 | - <el-table-column prop="cjsj" label="创建时间" width="160" align="center"> | |
| 170 | + <!-- 提成比例3 --> | |
| 171 | + <el-table-column label="提成比例3" align="center" width="120"> | |
| 119 | 172 | <template slot-scope="scope"> |
| 120 | - {{ formatDate(scope.row.cjsj) }} | |
| 173 | + <div class="ratio-item"> | |
| 174 | + <i class="el-icon-percent ratio-icon"></i> | |
| 175 | + <span v-if="scope.row.Tcbl3" class="ratio">{{ scope.row.Tcbl3 }}%</span> | |
| 176 | + <span v-else class="no-data">无</span> | |
| 177 | + </div> | |
| 121 | 178 | </template> |
| 122 | 179 | </el-table-column> |
| 123 | 180 | |
| 124 | - <el-table-column label="操作" width="120" align="center" fixed="right"> | |
| 181 | + <!-- 备注 --> | |
| 182 | + <el-table-column label="备注" min-width="160" show-overflow-tooltip> | |
| 125 | 183 | <template slot-scope="scope"> |
| 126 | - <el-button | |
| 127 | - type="text" | |
| 128 | - icon="el-icon-edit" | |
| 129 | - @click="handleEdit(scope.row)" | |
| 130 | - size="small" | |
| 131 | - > | |
| 132 | - 编辑 | |
| 133 | - </el-button> | |
| 134 | - <el-button | |
| 135 | - type="text" | |
| 136 | - icon="el-icon-delete" | |
| 137 | - @click="handleDelete(scope.row)" | |
| 138 | - size="small" | |
| 139 | - style="color: #f56c6c" | |
| 140 | - > | |
| 141 | - 删除 | |
| 142 | - </el-button> | |
| 184 | + <div class="remark-item"> | |
| 185 | + <i class="el-icon-document remark-icon"></i> | |
| 186 | + <span>{{ scope.row.Bz || '无' }}</span> | |
| 187 | + </div> | |
| 188 | + </template> | |
| 189 | + </el-table-column> | |
| 190 | + | |
| 191 | + <!-- 创建时间 --> | |
| 192 | + <el-table-column label="创建时间" width="160" align="center"> | |
| 193 | + <template slot-scope="scope"> | |
| 194 | + <div class="time-item"> | |
| 195 | + <i class="el-icon-time time-icon"></i> | |
| 196 | + <span>{{ formatDate(scope.row.Cjsj) }}</span> | |
| 197 | + </div> | |
| 198 | + </template> | |
| 199 | + </el-table-column> | |
| 200 | + | |
| 201 | + <!-- 操作 --> | |
| 202 | + <el-table-column label="操作" width="180" align="left" fixed="right"> | |
| 203 | + <template slot-scope="scope"> | |
| 204 | + <div class="action-buttons"> | |
| 205 | + <el-button | |
| 206 | + type="text" | |
| 207 | + icon="el-icon-edit" | |
| 208 | + @click="handleEdit(scope.row)" | |
| 209 | + size="small" | |
| 210 | + class="edit-btn" | |
| 211 | + > | |
| 212 | + 编辑 | |
| 213 | + </el-button> | |
| 214 | + <el-button | |
| 215 | + type="text" | |
| 216 | + icon="el-icon-delete" | |
| 217 | + @click="handleDelete(scope.row)" | |
| 218 | + size="small" | |
| 219 | + class="delete-btn" | |
| 220 | + > | |
| 221 | + 删除 | |
| 222 | + </el-button> | |
| 223 | + </div> | |
| 143 | 224 | </template> |
| 144 | 225 | </el-table-column> |
| 145 | 226 | </el-table> |
| ... | ... | @@ -181,6 +262,7 @@ |
| 181 | 262 | |
| 182 | 263 | <script> |
| 183 | 264 | import { lqZjlMdsmxszApi } from '@/api/extend/lqZjlMdsmxsz' |
| 265 | +import request from '@/utils/request' | |
| 184 | 266 | import BatchCreateDialog from './components/BatchCreateDialog.vue' |
| 185 | 267 | import EditDialog from './components/EditDialog.vue' |
| 186 | 268 | |
| ... | ... | @@ -218,7 +300,7 @@ export default { |
| 218 | 300 | async getUserList() { |
| 219 | 301 | try { |
| 220 | 302 | const response = await lqZjlMdsmxszApi.getZjlUserList() |
| 221 | - this.userList = response.data.list || [] | |
| 303 | + this.userList = response.data || [] | |
| 222 | 304 | console.log('获取总经理用户列表成功:', this.userList) |
| 223 | 305 | } catch (error) { |
| 224 | 306 | console.error('获取总经理用户列表失败:', error) |
| ... | ... | @@ -230,10 +312,17 @@ export default { |
| 230 | 312 | // 获取门店列表 |
| 231 | 313 | async getStoreList() { |
| 232 | 314 | try { |
| 233 | - const response = await lqZjlMdsmxszApi.getManagedStores(this.$store.getters.userInfo.id) | |
| 315 | + // 获取所有门店列表,用于编辑时显示门店名称 | |
| 316 | + const response = await request({ | |
| 317 | + url: '/api/Extend/LqMdxx', | |
| 318 | + method: 'GET', | |
| 319 | + params: { pageSize: 1000 } // 获取所有门店 | |
| 320 | + }) | |
| 234 | 321 | this.storeList = response.data.list || [] |
| 322 | + console.log('门店列表:', this.storeList) | |
| 235 | 323 | } catch (error) { |
| 236 | 324 | console.error('获取门店列表失败:', error) |
| 325 | + this.storeList = [] | |
| 237 | 326 | } |
| 238 | 327 | }, |
| 239 | 328 | |
| ... | ... | @@ -241,17 +330,17 @@ export default { |
| 241 | 330 | async getList() { |
| 242 | 331 | this.loading = true |
| 243 | 332 | try { |
| 244 | - if (this.queryParams.zjlUserid) { | |
| 245 | - // 如果选择了总经理,查询该总经理的数据 | |
| 246 | - const response = await lqZjlMdsmxszApi.getByZjlUserid(this.queryParams.zjlUserid) | |
| 247 | - this.list = response.data.list || [] | |
| 248 | - this.total = this.list.length | |
| 249 | - } else { | |
| 250 | - // 如果没有选择总经理,查询所有数据 | |
| 251 | - // TODO: 这里需要实现一个查询所有数据的接口 | |
| 252 | - this.list = [] | |
| 253 | - this.total = 0 | |
| 254 | - } | |
| 333 | + // 使用分页查询接口 | |
| 334 | + const response = await lqZjlMdsmxszApi.getPageList({ | |
| 335 | + currentPage: this.queryParams.pageNum, | |
| 336 | + pageSize: this.queryParams.pageSize, | |
| 337 | + zjlUserid: this.queryParams.zjlUserid || '', | |
| 338 | + mdId: this.queryParams.mdId || '' | |
| 339 | + }) | |
| 340 | + | |
| 341 | + // 适配新的数据结构 | |
| 342 | + this.list = response.data.list || [] | |
| 343 | + this.total = (response.data.pagination && response.data.pagination.total) || 0 | |
| 255 | 344 | } catch (error) { |
| 256 | 345 | console.error('获取列表失败:', error) |
| 257 | 346 | this.$message.error('获取列表失败') |
| ... | ... | @@ -285,7 +374,15 @@ export default { |
| 285 | 374 | |
| 286 | 375 | // 编辑 |
| 287 | 376 | handleEdit(row) { |
| 377 | + console.log('编辑行数据:', row) | |
| 288 | 378 | this.currentRow = { ...row } |
| 379 | + console.log('当前行数据:', this.currentRow) | |
| 380 | + | |
| 381 | + // 确保门店列表已加载 | |
| 382 | + if (this.storeList.length === 0) { | |
| 383 | + this.getStoreList() | |
| 384 | + } | |
| 385 | + | |
| 289 | 386 | this.editVisible = true |
| 290 | 387 | }, |
| 291 | 388 | |
| ... | ... | @@ -402,17 +499,76 @@ export default { |
| 402 | 499 | margin-bottom: 20px; |
| 403 | 500 | } |
| 404 | 501 | |
| 502 | +// 用户信息样式 | |
| 503 | +.user-info { | |
| 504 | + display: flex; | |
| 505 | + align-items: center; | |
| 506 | + justify-content: center; | |
| 507 | + gap: 6px; | |
| 508 | + | |
| 509 | + .user-icon { | |
| 510 | + color: #409EFF; | |
| 511 | + font-size: 16px; | |
| 512 | + } | |
| 513 | + | |
| 514 | + span { | |
| 515 | + font-weight: 500; | |
| 516 | + color: #303133; | |
| 517 | + } | |
| 518 | +} | |
| 519 | + | |
| 520 | +// 门店信息样式 | |
| 521 | +.store-code, .store-name { | |
| 522 | + display: flex; | |
| 523 | + align-items: center; | |
| 524 | + justify-content: center; | |
| 525 | + gap: 6px; | |
| 526 | + | |
| 527 | + .store-icon { | |
| 528 | + color: #67C23A; | |
| 529 | + font-size: 16px; | |
| 530 | + } | |
| 531 | + | |
| 532 | + span { | |
| 533 | + font-weight: 500; | |
| 534 | + color: #303133; | |
| 535 | + } | |
| 536 | +} | |
| 537 | + | |
| 538 | +// 生命线项目样式 | |
| 405 | 539 | .life-line-item { |
| 406 | 540 | display: flex; |
| 407 | - flex-direction: column; | |
| 541 | + flex-direction: row; | |
| 408 | 542 | align-items: center; |
| 409 | - gap: 4px; | |
| 543 | + justify-content: center; | |
| 544 | + gap: 6px; | |
| 545 | + min-height: 40px; | |
| 546 | + | |
| 547 | + .life-line-icon { | |
| 548 | + color: #409EFF; | |
| 549 | + font-size: 16px; | |
| 550 | + } | |
| 410 | 551 | |
| 411 | 552 | .amount { |
| 412 | 553 | font-weight: 600; |
| 413 | 554 | color: #409EFF; |
| 414 | 555 | font-size: 14px; |
| 415 | 556 | } |
| 557 | +} | |
| 558 | + | |
| 559 | +// 提成比例样式 | |
| 560 | +.ratio-item { | |
| 561 | + display: flex; | |
| 562 | + flex-direction: row; | |
| 563 | + align-items: center; | |
| 564 | + justify-content: center; | |
| 565 | + gap: 6px; | |
| 566 | + min-height: 40px; | |
| 567 | + | |
| 568 | + .ratio-icon { | |
| 569 | + color: #67C23A; | |
| 570 | + font-size: 16px; | |
| 571 | + } | |
| 416 | 572 | |
| 417 | 573 | .ratio { |
| 418 | 574 | color: #67C23A; |
| ... | ... | @@ -420,12 +576,71 @@ export default { |
| 420 | 576 | background: #f0f9ff; |
| 421 | 577 | padding: 2px 6px; |
| 422 | 578 | border-radius: 4px; |
| 579 | + font-weight: 500; | |
| 580 | + } | |
| 581 | +} | |
| 582 | + | |
| 583 | +// 备注样式 | |
| 584 | +.remark-item { | |
| 585 | + display: flex; | |
| 586 | + align-items: center; | |
| 587 | + gap: 6px; | |
| 588 | + | |
| 589 | + .remark-icon { | |
| 590 | + color: #909399; | |
| 591 | + font-size: 14px; | |
| 592 | + } | |
| 593 | + | |
| 594 | + span { | |
| 595 | + color: #606266; | |
| 596 | + } | |
| 597 | +} | |
| 598 | + | |
| 599 | +// 时间样式 | |
| 600 | +.time-item { | |
| 601 | + display: flex; | |
| 602 | + align-items: center; | |
| 603 | + justify-content: center; | |
| 604 | + gap: 6px; | |
| 605 | + | |
| 606 | + .time-icon { | |
| 607 | + color: #909399; | |
| 608 | + font-size: 14px; | |
| 609 | + } | |
| 610 | + | |
| 611 | + span { | |
| 612 | + color: #606266; | |
| 613 | + font-size: 13px; | |
| 614 | + } | |
| 615 | +} | |
| 616 | + | |
| 617 | +// 操作按钮样式 | |
| 618 | +.action-buttons { | |
| 619 | + display: flex; | |
| 620 | + align-items: center; | |
| 621 | + gap: 8px; | |
| 622 | + | |
| 623 | + .edit-btn { | |
| 624 | + color: #409EFF; | |
| 625 | + | |
| 626 | + &:hover { | |
| 627 | + color: #66b1ff; | |
| 628 | + } | |
| 629 | + } | |
| 630 | + | |
| 631 | + .delete-btn { | |
| 632 | + color: #F56C6C; | |
| 633 | + | |
| 634 | + &:hover { | |
| 635 | + color: #f78989; | |
| 636 | + } | |
| 423 | 637 | } |
| 424 | 638 | } |
| 425 | 639 | |
| 426 | 640 | .no-data { |
| 427 | 641 | color: #C0C4CC; |
| 428 | 642 | font-size: 12px; |
| 643 | + font-style: italic; | |
| 429 | 644 | } |
| 430 | 645 | |
| 431 | 646 | .pagination-container { | ... | ... |
netcore/netcore/.DS_Store
No preview for this file type
netcore/src/.DS_Store
No preview for this file type
netcore/src/Application/NCC.API/.DS_Store
No preview for this file type
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqHygl/LqHyglCrInput.cs deleted
| 1 | -using System; | |
| 2 | -using System.Collections.Generic; | |
| 3 | - | |
| 4 | -namespace NCC.Extend.Entitys.Dto.LqHygl | |
| 5 | -{ | |
| 6 | - /// <summary> | |
| 7 | - /// 会员管理修改输入参数 | |
| 8 | - /// </summary> | |
| 9 | - public class LqHyglCrInput | |
| 10 | - { | |
| 11 | - /// <summary> | |
| 12 | - /// 会员编号 | |
| 13 | - /// </summary> | |
| 14 | - public string id { get; set; } | |
| 15 | - | |
| 16 | - /// <summary> | |
| 17 | - /// 姓名 | |
| 18 | - /// </summary> | |
| 19 | - public string xm { get; set; } | |
| 20 | - | |
| 21 | - /// <summary> | |
| 22 | - /// 性别 | |
| 23 | - /// </summary> | |
| 24 | - public string xb { get; set; } | |
| 25 | - | |
| 26 | - /// <summary> | |
| 27 | - /// 手机号 | |
| 28 | - /// </summary> | |
| 29 | - public string sjh { get; set; } | |
| 30 | - | |
| 31 | - /// <summary> | |
| 32 | - /// 职业 | |
| 33 | - /// </summary> | |
| 34 | - public string zy { get; set; } | |
| 35 | - | |
| 36 | - /// <summary> | |
| 37 | - /// 进店渠道 | |
| 38 | - /// </summary> | |
| 39 | - public string jdqd { get; set; } | |
| 40 | - | |
| 41 | - /// <summary> | |
| 42 | - /// 年龄 | |
| 43 | - /// </summary> | |
| 44 | - public string nl { get; set; } | |
| 45 | - | |
| 46 | - /// <summary> | |
| 47 | - /// 推荐人 | |
| 48 | - /// </summary> | |
| 49 | - public string tjr { get; set; } | |
| 50 | - | |
| 51 | - /// <summary> | |
| 52 | - /// 阴历生日 | |
| 53 | - /// </summary> | |
| 54 | - public DateTime? yin { get; set; } | |
| 55 | - | |
| 56 | - /// <summary> | |
| 57 | - /// 阳历生日 | |
| 58 | - /// </summary> | |
| 59 | - public DateTime? yang { get; set; } | |
| 60 | - | |
| 61 | - /// <summary> | |
| 62 | - /// 健康师 | |
| 63 | - /// </summary> | |
| 64 | - public string jks { get; set; } | |
| 65 | - | |
| 66 | - /// <summary> | |
| 67 | - /// 会员顾问 | |
| 68 | - /// </summary> | |
| 69 | - public string hygw { get; set; } | |
| 70 | - | |
| 71 | - /// <summary> | |
| 72 | - /// 标签 | |
| 73 | - /// </summary> | |
| 74 | - public string bq { get; set; } | |
| 75 | - | |
| 76 | - /// <summary> | |
| 77 | - /// 爱好 | |
| 78 | - /// </summary> | |
| 79 | - public string ah { get; set; } | |
| 80 | - | |
| 81 | - /// <summary> | |
| 82 | - /// 其它 | |
| 83 | - /// </summary> | |
| 84 | - public string qt { get; set; } | |
| 85 | - | |
| 86 | - } | |
| 87 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqHygl/LqHyglInfoOutput.cs deleted
| 1 | -using System; | |
| 2 | -using System.Collections.Generic; | |
| 3 | - | |
| 4 | -namespace NCC.Extend.Entitys.Dto.LqHygl | |
| 5 | -{ | |
| 6 | - /// <summary> | |
| 7 | - /// 会员管理输出参数 | |
| 8 | - /// </summary> | |
| 9 | - public class LqHyglInfoOutput | |
| 10 | - { | |
| 11 | - /// <summary> | |
| 12 | - /// 会员编号 | |
| 13 | - /// </summary> | |
| 14 | - public string id { get; set; } | |
| 15 | - | |
| 16 | - /// <summary> | |
| 17 | - /// 姓名 | |
| 18 | - /// </summary> | |
| 19 | - public string xm { get; set; } | |
| 20 | - | |
| 21 | - /// <summary> | |
| 22 | - /// 性别 | |
| 23 | - /// </summary> | |
| 24 | - public string xb { get; set; } | |
| 25 | - | |
| 26 | - /// <summary> | |
| 27 | - /// 手机号 | |
| 28 | - /// </summary> | |
| 29 | - public string sjh { get; set; } | |
| 30 | - | |
| 31 | - /// <summary> | |
| 32 | - /// 职业 | |
| 33 | - /// </summary> | |
| 34 | - public string zy { get; set; } | |
| 35 | - | |
| 36 | - /// <summary> | |
| 37 | - /// 进店渠道 | |
| 38 | - /// </summary> | |
| 39 | - public string jdqd { get; set; } | |
| 40 | - | |
| 41 | - /// <summary> | |
| 42 | - /// 年龄 | |
| 43 | - /// </summary> | |
| 44 | - public string nl { get; set; } | |
| 45 | - | |
| 46 | - /// <summary> | |
| 47 | - /// 推荐人 | |
| 48 | - /// </summary> | |
| 49 | - public string tjr { get; set; } | |
| 50 | - | |
| 51 | - /// <summary> | |
| 52 | - /// 阴历生日 | |
| 53 | - /// </summary> | |
| 54 | - public DateTime? yin { get; set; } | |
| 55 | - | |
| 56 | - /// <summary> | |
| 57 | - /// 阳历生日 | |
| 58 | - /// </summary> | |
| 59 | - public DateTime? yang { get; set; } | |
| 60 | - | |
| 61 | - /// <summary> | |
| 62 | - /// 健康师 | |
| 63 | - /// </summary> | |
| 64 | - public string jks { get; set; } | |
| 65 | - | |
| 66 | - /// <summary> | |
| 67 | - /// 会员顾问 | |
| 68 | - /// </summary> | |
| 69 | - public string hygw { get; set; } | |
| 70 | - | |
| 71 | - /// <summary> | |
| 72 | - /// 标签 | |
| 73 | - /// </summary> | |
| 74 | - public string bq { get; set; } | |
| 75 | - | |
| 76 | - /// <summary> | |
| 77 | - /// 爱好 | |
| 78 | - /// </summary> | |
| 79 | - public string ah { get; set; } | |
| 80 | - | |
| 81 | - /// <summary> | |
| 82 | - /// 其它 | |
| 83 | - /// </summary> | |
| 84 | - public string qt { get; set; } | |
| 85 | - | |
| 86 | - } | |
| 87 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqHygl/LqHyglListOutput.cs deleted
| 1 | -using System; | |
| 2 | - | |
| 3 | -namespace NCC.Extend.Entitys.Dto.LqHygl | |
| 4 | -{ | |
| 5 | - /// <summary> | |
| 6 | - /// 会员管理输入参数 | |
| 7 | - /// </summary> | |
| 8 | - public class LqHyglListOutput | |
| 9 | - { | |
| 10 | - /// <summary> | |
| 11 | - /// 会员编号 | |
| 12 | - /// </summary> | |
| 13 | - public string id { get; set; } | |
| 14 | - | |
| 15 | - /// <summary> | |
| 16 | - /// 姓名 | |
| 17 | - /// </summary> | |
| 18 | - public string xm { get; set; } | |
| 19 | - | |
| 20 | - /// <summary> | |
| 21 | - /// 性别 | |
| 22 | - /// </summary> | |
| 23 | - public string xb { get; set; } | |
| 24 | - | |
| 25 | - /// <summary> | |
| 26 | - /// 手机号 | |
| 27 | - /// </summary> | |
| 28 | - public string sjh { get; set; } | |
| 29 | - | |
| 30 | - /// <summary> | |
| 31 | - /// 职业 | |
| 32 | - /// </summary> | |
| 33 | - public string zy { get; set; } | |
| 34 | - | |
| 35 | - /// <summary> | |
| 36 | - /// 进店渠道 | |
| 37 | - /// </summary> | |
| 38 | - public string jdqd { get; set; } | |
| 39 | - | |
| 40 | - /// <summary> | |
| 41 | - /// 年龄 | |
| 42 | - /// </summary> | |
| 43 | - public string nl { get; set; } | |
| 44 | - | |
| 45 | - /// <summary> | |
| 46 | - /// 推荐人 | |
| 47 | - /// </summary> | |
| 48 | - public string tjr { get; set; } | |
| 49 | - | |
| 50 | - /// <summary> | |
| 51 | - /// 阴历生日 | |
| 52 | - /// </summary> | |
| 53 | - public DateTime? yin { get; set; } | |
| 54 | - | |
| 55 | - /// <summary> | |
| 56 | - /// 阳历生日 | |
| 57 | - /// </summary> | |
| 58 | - public DateTime? yang { get; set; } | |
| 59 | - | |
| 60 | - /// <summary> | |
| 61 | - /// 健康师 | |
| 62 | - /// </summary> | |
| 63 | - public string jks { get; set; } | |
| 64 | - | |
| 65 | - /// <summary> | |
| 66 | - /// 会员顾问 | |
| 67 | - /// </summary> | |
| 68 | - public string hygw { get; set; } | |
| 69 | - | |
| 70 | - /// <summary> | |
| 71 | - /// 标签 | |
| 72 | - /// </summary> | |
| 73 | - public string bq { get; set; } | |
| 74 | - | |
| 75 | - /// <summary> | |
| 76 | - /// 爱好 | |
| 77 | - /// </summary> | |
| 78 | - public string ah { get; set; } | |
| 79 | - | |
| 80 | - /// <summary> | |
| 81 | - /// 其它 | |
| 82 | - /// </summary> | |
| 83 | - public string qt { get; set; } | |
| 84 | - | |
| 85 | - } | |
| 86 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqHygl/LqHyglListQueryInput.cs deleted
| 1 | -using NCC.Common.Filter; | |
| 2 | -using System.Collections.Generic; | |
| 3 | - | |
| 4 | -namespace NCC.Extend.Entitys.Dto.LqHygl | |
| 5 | -{ | |
| 6 | - /// <summary> | |
| 7 | - /// 会员管理列表查询输入 | |
| 8 | - /// </summary> | |
| 9 | - public class LqHyglListQueryInput : PageInputBase | |
| 10 | - { | |
| 11 | - /// <summary> | |
| 12 | - /// 选择导出数据key | |
| 13 | - /// </summary> | |
| 14 | - public string selectKey { get; set; } | |
| 15 | - | |
| 16 | - /// <summary> | |
| 17 | - /// | |
| 18 | - /// </summary> | |
| 19 | - public int dataType { get; set; } | |
| 20 | - | |
| 21 | - | |
| 22 | - /// <summary> | |
| 23 | - /// 会员编号 | |
| 24 | - /// </summary> | |
| 25 | - public string id { get; set; } | |
| 26 | - | |
| 27 | - /// <summary> | |
| 28 | - /// 姓名 | |
| 29 | - /// </summary> | |
| 30 | - public string xm { get; set; } | |
| 31 | - | |
| 32 | - /// <summary> | |
| 33 | - /// 性别 | |
| 34 | - /// </summary> | |
| 35 | - public string xb { get; set; } | |
| 36 | - | |
| 37 | - /// <summary> | |
| 38 | - /// 手机号 | |
| 39 | - /// </summary> | |
| 40 | - public string sjh { get; set; } | |
| 41 | - | |
| 42 | - /// <summary> | |
| 43 | - /// 职业 | |
| 44 | - /// </summary> | |
| 45 | - public string zy { get; set; } | |
| 46 | - | |
| 47 | - /// <summary> | |
| 48 | - /// 进店渠道 | |
| 49 | - /// </summary> | |
| 50 | - public string jdqd { get; set; } | |
| 51 | - | |
| 52 | - /// <summary> | |
| 53 | - /// 年龄 | |
| 54 | - /// </summary> | |
| 55 | - public string nl { get; set; } | |
| 56 | - | |
| 57 | - /// <summary> | |
| 58 | - /// 推荐人 | |
| 59 | - /// </summary> | |
| 60 | - public string tjr { get; set; } | |
| 61 | - | |
| 62 | - /// <summary> | |
| 63 | - /// 阴历生日 | |
| 64 | - /// </summary> | |
| 65 | - public string yin { get; set; } | |
| 66 | - | |
| 67 | - /// <summary> | |
| 68 | - /// 阳历生日 | |
| 69 | - /// </summary> | |
| 70 | - public string yang { get; set; } | |
| 71 | - | |
| 72 | - /// <summary> | |
| 73 | - /// 健康师 | |
| 74 | - /// </summary> | |
| 75 | - public string jks { get; set; } | |
| 76 | - | |
| 77 | - /// <summary> | |
| 78 | - /// 会员顾问 | |
| 79 | - /// </summary> | |
| 80 | - public string hygw { get; set; } | |
| 81 | - | |
| 82 | - /// <summary> | |
| 83 | - /// 标签 | |
| 84 | - /// </summary> | |
| 85 | - public string bq { get; set; } | |
| 86 | - | |
| 87 | - /// <summary> | |
| 88 | - /// 爱好 | |
| 89 | - /// </summary> | |
| 90 | - public string ah { get; set; } | |
| 91 | - | |
| 92 | - /// <summary> | |
| 93 | - /// 其它 | |
| 94 | - /// </summary> | |
| 95 | - public string qt { get; set; } | |
| 96 | - | |
| 97 | - } | |
| 98 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqHygl/LqHyglUpInput.cs deleted
| 1 | -using System; | |
| 2 | -using System.Collections.Generic; | |
| 3 | - | |
| 4 | -namespace NCC.Extend.Entitys.Dto.LqHygl | |
| 5 | -{ | |
| 6 | - /// <summary> | |
| 7 | - /// 会员管理更新输入参数 | |
| 8 | - /// </summary> | |
| 9 | - public class LqHyglUpInput : LqHyglCrInput | |
| 10 | - { | |
| 11 | - /// <summary> | |
| 12 | - /// 会员编号 | |
| 13 | - /// </summary> | |
| 14 | - public string id { get; set; } | |
| 15 | - | |
| 16 | - } | |
| 17 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdJksyj/LqKdJksyjCrInput.cs
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdPxmx/LqKdPxmxCrInput.cs
| ... | ... | @@ -34,6 +34,25 @@ namespace NCC.Extend.Entitys.Dto.LqKdKdjlb |
| 34 | 34 | /// 品项价格 |
| 35 | 35 | /// </summary> |
| 36 | 36 | public decimal pxjg { get; set; } |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 会员id | |
| 40 | + /// </summary> | |
| 41 | + public string memberId { get; set; } | |
| 37 | 42 | |
| 43 | + /// <summary> | |
| 44 | + /// 创建时间 | |
| 45 | + /// </summary> | |
| 46 | + public DateTime? createTime { get; set; } | |
| 47 | + | |
| 48 | + /// <summary> | |
| 49 | + /// 项目次数 | |
| 50 | + /// </summary> | |
| 51 | + public int? projectNumber { get; set; } | |
| 52 | + | |
| 53 | + /// <summary> | |
| 54 | + /// 是否有效 | |
| 55 | + /// </summary> | |
| 56 | + public int? isEnabled { get; set; } | |
| 38 | 57 | } |
| 39 | 58 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxCrInput.cs
| ... | ... | @@ -118,5 +118,35 @@ namespace NCC.Extend.Entitys.Dto.LqMdxx |
| 118 | 118 | /// </summary> |
| 119 | 119 | public int? status { get; set; } |
| 120 | 120 | |
| 121 | + /// <summary> | |
| 122 | + /// 目标-门店生命线 | |
| 123 | + /// </summary> | |
| 124 | + public decimal? xsyj { get; set; } | |
| 125 | + | |
| 126 | + /// <summary> | |
| 127 | + /// 目标-消耗业绩 | |
| 128 | + /// </summary> | |
| 129 | + public decimal? xhyj { get; set; } | |
| 130 | + | |
| 131 | + /// <summary> | |
| 132 | + /// 目标-项目数 | |
| 133 | + /// </summary> | |
| 134 | + public int? xms { get; set; } | |
| 135 | + | |
| 136 | + /// <summary> | |
| 137 | + /// 目标-人头1 | |
| 138 | + /// </summary> | |
| 139 | + public int? rt1 { get; set; } | |
| 140 | + | |
| 141 | + /// <summary> | |
| 142 | + /// 目标-人头2 | |
| 143 | + /// </summary> | |
| 144 | + public int? rt2 { get; set; } | |
| 145 | + | |
| 146 | + /// <summary> | |
| 147 | + /// 目标-人次 | |
| 148 | + /// </summary> | |
| 149 | + public int? rc { get; set; } | |
| 150 | + | |
| 121 | 151 | } |
| 122 | 152 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxListOutput.cs
| ... | ... | @@ -116,6 +116,36 @@ namespace NCC.Extend.Entitys.Dto.LqMdxx |
| 116 | 116 | /// 状态 |
| 117 | 117 | /// </summary> |
| 118 | 118 | public int? status { get; set; } |
| 119 | + | |
| 120 | + /// <summary> | |
| 121 | + /// 目标-门店生命线 | |
| 122 | + /// </summary> | |
| 123 | + public decimal? xsyj { get; set; } | |
| 124 | + | |
| 125 | + /// <summary> | |
| 126 | + /// 目标-消耗业绩 | |
| 127 | + /// </summary> | |
| 128 | + public decimal? xhyj { get; set; } | |
| 129 | + | |
| 130 | + /// <summary> | |
| 131 | + /// 目标-项目数 | |
| 132 | + /// </summary> | |
| 133 | + public int? xms { get; set; } | |
| 134 | + | |
| 135 | + /// <summary> | |
| 136 | + /// 目标-人头1 | |
| 137 | + /// </summary> | |
| 138 | + public int? rt1 { get; set; } | |
| 139 | + | |
| 140 | + /// <summary> | |
| 141 | + /// 目标-人头2 | |
| 142 | + /// </summary> | |
| 143 | + public int? rt2 { get; set; } | |
| 144 | + | |
| 145 | + /// <summary> | |
| 146 | + /// 目标-人次 | |
| 147 | + /// </summary> | |
| 148 | + public int? rc { get; set; } | |
| 119 | 149 | |
| 120 | 150 | } |
| 121 | 151 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqYcsdMdmbsd/LqYcsdMdmbsdListOutput.cs renamed to netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxTargetUpdateInput.cs
| 1 | -using System; | |
| 1 | +using System; | |
| 2 | 2 | |
| 3 | -namespace NCC.Extend.Entitys.Dto.LqYcsdMdmbsd | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqMdxx | |
| 4 | 4 | { |
| 5 | 5 | /// <summary> |
| 6 | - /// 门店目标设定输入参数 | |
| 6 | + /// 门店目标字段更新输入参数 | |
| 7 | 7 | /// </summary> |
| 8 | - public class LqYcsdMdmbsdListOutput | |
| 8 | + public class LqMdxxTargetUpdateInput | |
| 9 | 9 | { |
| 10 | 10 | /// <summary> |
| 11 | - /// 目标编号 | |
| 11 | + /// 目标-门店生命线 | |
| 12 | 12 | /// </summary> |
| 13 | - public string id { get; set; } | |
| 14 | - | |
| 15 | - /// <summary> | |
| 16 | - /// 目标-销售业绩 | |
| 17 | - /// </summary> | |
| 18 | - public string xsyj { get; set; } | |
| 13 | + public decimal? xsyj { get; set; } | |
| 19 | 14 | |
| 20 | 15 | /// <summary> |
| 21 | 16 | /// 目标-消耗业绩 |
| 22 | 17 | /// </summary> |
| 23 | - public string xhyj { get; set; } | |
| 18 | + public decimal? xhyj { get; set; } | |
| 24 | 19 | |
| 25 | 20 | /// <summary> |
| 26 | 21 | /// 目标-项目数 |
| 27 | 22 | /// </summary> |
| 28 | - public string xms { get; set; } | |
| 23 | + public int? xms { get; set; } | |
| 29 | 24 | |
| 30 | 25 | /// <summary> |
| 31 | - /// 目标-人头 | |
| 26 | + /// 目标-人头1 | |
| 32 | 27 | /// </summary> |
| 33 | - public string rt { get; set; } | |
| 28 | + public int? rt1 { get; set; } | |
| 34 | 29 | |
| 35 | 30 | /// <summary> |
| 36 | - /// 目标-人次 | |
| 31 | + /// 目标-人头2 | |
| 37 | 32 | /// </summary> |
| 38 | - public string rc { get; set; } | |
| 33 | + public int? rt2 { get; set; } | |
| 39 | 34 | |
| 40 | 35 | /// <summary> |
| 41 | - /// 目标分类(个人门店天王) | |
| 42 | - /// </summary> | |
| 43 | - public string mbfl { get; set; } | |
| 44 | - | |
| 45 | - /// <summary> | |
| 46 | - /// 具体对应 | |
| 36 | + /// 目标-人次 | |
| 47 | 37 | /// </summary> |
| 48 | - public string jtdy { get; set; } | |
| 49 | - | |
| 38 | + public int? rc { get; set; } | |
| 50 | 39 | } |
| 51 | 40 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqXmzl/LqXmzlCrInput.cs
| ... | ... | @@ -93,5 +93,19 @@ namespace NCC.Extend.Entitys.Dto.LqXmzl |
| 93 | 93 | /// </summary> |
| 94 | 94 | public decimal? cellje { get; set; } |
| 95 | 95 | |
| 96 | + /// <summary> | |
| 97 | + /// 手工费 | |
| 98 | + /// </summary> | |
| 99 | + public decimal? sgf { get; set; } | |
| 100 | + | |
| 101 | + /// <summary> | |
| 102 | + /// 项目次数 | |
| 103 | + /// </summary> | |
| 104 | + public int? projectNumber { get; set; } | |
| 105 | + | |
| 106 | + /// <summary> | |
| 107 | + /// 来源类型 | |
| 108 | + /// </summary> | |
| 109 | + public string sourceType { get; set; } | |
| 96 | 110 | } |
| 97 | 111 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqXmzl/LqXmzlInfoOutput.cs
| ... | ... | @@ -93,5 +93,20 @@ namespace NCC.Extend.Entitys.Dto.LqXmzl |
| 93 | 93 | /// </summary> |
| 94 | 94 | public decimal? cellje { get; set; } |
| 95 | 95 | |
| 96 | + /// <summary> | |
| 97 | + /// 手工费 | |
| 98 | + /// </summary> | |
| 99 | + public decimal? sgf { get; set; } | |
| 100 | + | |
| 101 | + /// <summary> | |
| 102 | + /// 项目次数 | |
| 103 | + /// </summary> | |
| 104 | + public int? projectNumber { get; set; } | |
| 105 | + | |
| 106 | + /// <summary> | |
| 107 | + /// 来源类型 | |
| 108 | + /// </summary> | |
| 109 | + public string sourceType { get; set; } | |
| 110 | + | |
| 96 | 111 | } |
| 97 | 112 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqXmzl/LqXmzlListOutput.cs
| ... | ... | @@ -92,5 +92,19 @@ namespace NCC.Extend.Entitys.Dto.LqXmzl |
| 92 | 92 | /// </summary> |
| 93 | 93 | public decimal? cellje { get; set; } |
| 94 | 94 | |
| 95 | + /// <summary> | |
| 96 | + /// 手工费 | |
| 97 | + /// </summary> | |
| 98 | + public decimal? sgf { get; set; } | |
| 99 | + | |
| 100 | + /// <summary> | |
| 101 | + /// 项目次数 | |
| 102 | + /// </summary> | |
| 103 | + public int? projectNumber { get; set; } | |
| 104 | + | |
| 105 | + /// <summary> | |
| 106 | + /// 来源类型 | |
| 107 | + /// </summary> | |
| 108 | + public string sourceType { get; set; } | |
| 95 | 109 | } |
| 96 | 110 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqXmzl/LqXmzlListQueryInput.cs
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqYcsdMdmbsd/LqYcsdMdmbsdCrInput.cs deleted
| 1 | -using System; | |
| 2 | -using System.Collections.Generic; | |
| 3 | - | |
| 4 | -namespace NCC.Extend.Entitys.Dto.LqYcsdMdmbsd | |
| 5 | -{ | |
| 6 | - /// <summary> | |
| 7 | - /// 门店目标设定修改输入参数 | |
| 8 | - /// </summary> | |
| 9 | - public class LqYcsdMdmbsdCrInput | |
| 10 | - { | |
| 11 | - /// <summary> | |
| 12 | - /// 目标编号 | |
| 13 | - /// </summary> | |
| 14 | - public string id { get; set; } | |
| 15 | - | |
| 16 | - /// <summary> | |
| 17 | - /// 目标-销售业绩 | |
| 18 | - /// </summary> | |
| 19 | - public string xsyj { get; set; } | |
| 20 | - | |
| 21 | - /// <summary> | |
| 22 | - /// 目标-消耗业绩 | |
| 23 | - /// </summary> | |
| 24 | - public string xhyj { get; set; } | |
| 25 | - | |
| 26 | - /// <summary> | |
| 27 | - /// 目标-项目数 | |
| 28 | - /// </summary> | |
| 29 | - public string xms { get; set; } | |
| 30 | - | |
| 31 | - /// <summary> | |
| 32 | - /// 目标-人头 | |
| 33 | - /// </summary> | |
| 34 | - public string rt { get; set; } | |
| 35 | - | |
| 36 | - /// <summary> | |
| 37 | - /// 目标-人次 | |
| 38 | - /// </summary> | |
| 39 | - public string rc { get; set; } | |
| 40 | - | |
| 41 | - /// <summary> | |
| 42 | - /// 目标分类(个人门店天王) | |
| 43 | - /// </summary> | |
| 44 | - public string mbfl { get; set; } | |
| 45 | - | |
| 46 | - /// <summary> | |
| 47 | - /// 具体对应 | |
| 48 | - /// </summary> | |
| 49 | - public string jtdy { get; set; } | |
| 50 | - | |
| 51 | - } | |
| 52 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqYcsdMdmbsd/LqYcsdMdmbsdInfoOutput.cs deleted
| 1 | -using System; | |
| 2 | -using System.Collections.Generic; | |
| 3 | - | |
| 4 | -namespace NCC.Extend.Entitys.Dto.LqYcsdMdmbsd | |
| 5 | -{ | |
| 6 | - /// <summary> | |
| 7 | - /// 门店目标设定输出参数 | |
| 8 | - /// </summary> | |
| 9 | - public class LqYcsdMdmbsdInfoOutput | |
| 10 | - { | |
| 11 | - /// <summary> | |
| 12 | - /// 目标编号 | |
| 13 | - /// </summary> | |
| 14 | - public string id { get; set; } | |
| 15 | - | |
| 16 | - /// <summary> | |
| 17 | - /// 目标-销售业绩 | |
| 18 | - /// </summary> | |
| 19 | - public string xsyj { get; set; } | |
| 20 | - | |
| 21 | - /// <summary> | |
| 22 | - /// 目标-消耗业绩 | |
| 23 | - /// </summary> | |
| 24 | - public string xhyj { get; set; } | |
| 25 | - | |
| 26 | - /// <summary> | |
| 27 | - /// 目标-项目数 | |
| 28 | - /// </summary> | |
| 29 | - public string xms { get; set; } | |
| 30 | - | |
| 31 | - /// <summary> | |
| 32 | - /// 目标-人头 | |
| 33 | - /// </summary> | |
| 34 | - public string rt { get; set; } | |
| 35 | - | |
| 36 | - /// <summary> | |
| 37 | - /// 目标-人次 | |
| 38 | - /// </summary> | |
| 39 | - public string rc { get; set; } | |
| 40 | - | |
| 41 | - /// <summary> | |
| 42 | - /// 目标分类(个人门店天王) | |
| 43 | - /// </summary> | |
| 44 | - public string mbfl { get; set; } | |
| 45 | - | |
| 46 | - /// <summary> | |
| 47 | - /// 具体对应 | |
| 48 | - /// </summary> | |
| 49 | - public string jtdy { get; set; } | |
| 50 | - | |
| 51 | - } | |
| 52 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqYcsdMdmbsd/LqYcsdMdmbsdListQueryInput.cs deleted
| 1 | -using NCC.Common.Filter; | |
| 2 | -using System.Collections.Generic; | |
| 3 | - | |
| 4 | -namespace NCC.Extend.Entitys.Dto.LqYcsdMdmbsd | |
| 5 | -{ | |
| 6 | - /// <summary> | |
| 7 | - /// 门店目标设定列表查询输入 | |
| 8 | - /// </summary> | |
| 9 | - public class LqYcsdMdmbsdListQueryInput : PageInputBase | |
| 10 | - { | |
| 11 | - /// <summary> | |
| 12 | - /// 选择导出数据key | |
| 13 | - /// </summary> | |
| 14 | - public string selectKey { get; set; } | |
| 15 | - | |
| 16 | - /// <summary> | |
| 17 | - /// | |
| 18 | - /// </summary> | |
| 19 | - public int dataType { get; set; } | |
| 20 | - | |
| 21 | - | |
| 22 | - /// <summary> | |
| 23 | - /// 目标编号 | |
| 24 | - /// </summary> | |
| 25 | - public string id { get; set; } | |
| 26 | - | |
| 27 | - /// <summary> | |
| 28 | - /// 目标-销售业绩 | |
| 29 | - /// </summary> | |
| 30 | - public string xsyj { get; set; } | |
| 31 | - | |
| 32 | - /// <summary> | |
| 33 | - /// 目标-消耗业绩 | |
| 34 | - /// </summary> | |
| 35 | - public string xhyj { get; set; } | |
| 36 | - | |
| 37 | - /// <summary> | |
| 38 | - /// 目标-项目数 | |
| 39 | - /// </summary> | |
| 40 | - public string xms { get; set; } | |
| 41 | - | |
| 42 | - /// <summary> | |
| 43 | - /// 目标-人头 | |
| 44 | - /// </summary> | |
| 45 | - public string rt { get; set; } | |
| 46 | - | |
| 47 | - /// <summary> | |
| 48 | - /// 目标-人次 | |
| 49 | - /// </summary> | |
| 50 | - public string rc { get; set; } | |
| 51 | - | |
| 52 | - /// <summary> | |
| 53 | - /// 目标分类(个人门店天王) | |
| 54 | - /// </summary> | |
| 55 | - public string mbfl { get; set; } | |
| 56 | - | |
| 57 | - /// <summary> | |
| 58 | - /// 具体对应 | |
| 59 | - /// </summary> | |
| 60 | - public string jtdy { get; set; } | |
| 61 | - | |
| 62 | - } | |
| 63 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqYcsdMdmbsd/LqYcsdMdmbsdUpInput.cs deleted
| 1 | -using System; | |
| 2 | -using System.Collections.Generic; | |
| 3 | - | |
| 4 | -namespace NCC.Extend.Entitys.Dto.LqYcsdMdmbsd | |
| 5 | -{ | |
| 6 | - /// <summary> | |
| 7 | - /// 门店目标设定更新输入参数 | |
| 8 | - /// </summary> | |
| 9 | - public class LqYcsdMdmbsdUpInput : LqYcsdMdmbsdCrInput | |
| 10 | - { | |
| 11 | - /// <summary> | |
| 12 | - /// 目标编号 | |
| 13 | - /// </summary> | |
| 14 | - public string id { get; set; } | |
| 15 | - | |
| 16 | - } | |
| 17 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqZjlMdsmxsz/LqZjlMdsmxszListQueryInput.cs
| 1 | -using NCC.Common.Model; | |
| 1 | +using NCC.Common.Filter; | |
| 2 | 2 | |
| 3 | 3 | namespace NCC.Extend.Entitys.Dto.LqZjlMdsmxsz |
| 4 | 4 | { |
| 5 | 5 | /// <summary> |
| 6 | 6 | /// 总经理门店生命线设置列表查询输入DTO |
| 7 | 7 | /// </summary> |
| 8 | - public class LqZjlMdsmxszListQueryInput | |
| 8 | + public class LqZjlMdsmxszListQueryInput : PageInputBase | |
| 9 | 9 | { |
| 10 | 10 | /// <summary> |
| 11 | 11 | /// 总经理用户ID | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/README.md
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_hygl/LqHyglEntity.cs deleted
| 1 | -using NCC.Common.Const; | |
| 2 | -using SqlSugar; | |
| 3 | -using System; | |
| 4 | - | |
| 5 | -namespace NCC.Extend.Entitys.lq_hygl | |
| 6 | -{ | |
| 7 | - /// <summary> | |
| 8 | - /// 会员管理 | |
| 9 | - /// </summary> | |
| 10 | - [SugarTable("lq_hygl")] | |
| 11 | - [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | - public class LqHyglEntity | |
| 13 | - { | |
| 14 | - /// <summary> | |
| 15 | - /// 会员编号 | |
| 16 | - /// </summary> | |
| 17 | - [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | - public string Id { get; set; } | |
| 19 | - | |
| 20 | - /// <summary> | |
| 21 | - /// 姓名 | |
| 22 | - /// </summary> | |
| 23 | - [SugarColumn(ColumnName = "xm")] | |
| 24 | - public string Xm { get; set; } | |
| 25 | - | |
| 26 | - /// <summary> | |
| 27 | - /// 性别 | |
| 28 | - /// </summary> | |
| 29 | - [SugarColumn(ColumnName = "xb")] | |
| 30 | - public string Xb { get; set; } | |
| 31 | - | |
| 32 | - /// <summary> | |
| 33 | - /// 手机号 | |
| 34 | - /// </summary> | |
| 35 | - [SugarColumn(ColumnName = "sjh")] | |
| 36 | - public string Sjh { get; set; } | |
| 37 | - | |
| 38 | - /// <summary> | |
| 39 | - /// 职业 | |
| 40 | - /// </summary> | |
| 41 | - [SugarColumn(ColumnName = "zy")] | |
| 42 | - public string Zy { get; set; } | |
| 43 | - | |
| 44 | - /// <summary> | |
| 45 | - /// 进店渠道 | |
| 46 | - /// </summary> | |
| 47 | - [SugarColumn(ColumnName = "jdqd")] | |
| 48 | - public string Jdqd { get; set; } | |
| 49 | - | |
| 50 | - /// <summary> | |
| 51 | - /// 年龄 | |
| 52 | - /// </summary> | |
| 53 | - [SugarColumn(ColumnName = "nl")] | |
| 54 | - public string Nl { get; set; } | |
| 55 | - | |
| 56 | - /// <summary> | |
| 57 | - /// 推荐人 | |
| 58 | - /// </summary> | |
| 59 | - [SugarColumn(ColumnName = "tjr")] | |
| 60 | - public string Tjr { get; set; } | |
| 61 | - | |
| 62 | - /// <summary> | |
| 63 | - /// 阴历生日 | |
| 64 | - /// </summary> | |
| 65 | - [SugarColumn(ColumnName = "yin")] | |
| 66 | - public DateTime? Yin { get; set; } | |
| 67 | - | |
| 68 | - /// <summary> | |
| 69 | - /// 阳历生日 | |
| 70 | - /// </summary> | |
| 71 | - [SugarColumn(ColumnName = "yang")] | |
| 72 | - public DateTime? Yang { get; set; } | |
| 73 | - | |
| 74 | - /// <summary> | |
| 75 | - /// 健康师 | |
| 76 | - /// </summary> | |
| 77 | - [SugarColumn(ColumnName = "jks")] | |
| 78 | - public string Jks { get; set; } | |
| 79 | - | |
| 80 | - /// <summary> | |
| 81 | - /// 会员顾问 | |
| 82 | - /// </summary> | |
| 83 | - [SugarColumn(ColumnName = "hygw")] | |
| 84 | - public string Hygw { get; set; } | |
| 85 | - | |
| 86 | - /// <summary> | |
| 87 | - /// 标签 | |
| 88 | - /// </summary> | |
| 89 | - [SugarColumn(ColumnName = "bq")] | |
| 90 | - public string Bq { get; set; } | |
| 91 | - | |
| 92 | - /// <summary> | |
| 93 | - /// 爱好 | |
| 94 | - /// </summary> | |
| 95 | - [SugarColumn(ColumnName = "ah")] | |
| 96 | - public string Ah { get; set; } | |
| 97 | - | |
| 98 | - /// <summary> | |
| 99 | - /// 其它 | |
| 100 | - /// </summary> | |
| 101 | - [SugarColumn(ColumnName = "qt")] | |
| 102 | - public string Qt { get; set; } | |
| 103 | - | |
| 104 | - } | |
| 105 | -} | |
| 106 | 0 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_jinsanjiao_user/LqJinsanjiaoUserEntity.cs
| ... | ... | @@ -82,5 +82,12 @@ namespace NCC.Extend.Entitys.lq_jinsanjiao_user |
| 82 | 82 | /// </summary> |
| 83 | 83 | [SugarColumn(ColumnName = "F_DeleteMark")] |
| 84 | 84 | public int DeleteMark { get; set; } |
| 85 | + | |
| 86 | + | |
| 87 | + /// <summary> | |
| 88 | + /// 月份 | |
| 89 | + /// </summary> | |
| 90 | + [SugarColumn(ColumnName = "F_Month")] | |
| 91 | + public string Month { get; set; } | |
| 85 | 92 | } |
| 86 | 93 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_kd_jksyj/LqKdJksyjEntity.cs
| ... | ... | @@ -52,6 +52,12 @@ namespace NCC.Extend.Entitys.lq_kd_jksyj |
| 52 | 52 | /// </summary> |
| 53 | 53 | [SugarColumn(ColumnName = "yjsj")] |
| 54 | 54 | public DateTime? Yjsj { get; set; } |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 金三角id | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "jsj_id")] | |
| 60 | + public string Jsj_id { get; set; } | |
| 55 | 61 | |
| 56 | 62 | } |
| 57 | 63 | } |
| 58 | 64 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_kd_kdjlb/LqKdKdjlbEntity.cs
| ... | ... | @@ -172,6 +172,12 @@ namespace NCC.Extend.Entitys.lq_kd_kdjlb |
| 172 | 172 | /// </summary> |
| 173 | 173 | [SugarColumn(ColumnName = "pxxx")] |
| 174 | 174 | public string Pxxx { get; set; } |
| 175 | + | |
| 176 | + /// <summary> | |
| 177 | + /// 开单用户 | |
| 178 | + /// </summary> | |
| 179 | + [SugarColumn(ColumnName = "F_CreateUser")] | |
| 180 | + public string CreateUser { get; set; } | |
| 175 | 181 | |
| 176 | 182 | } |
| 177 | 183 | } |
| 178 | 184 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_kd_pxmx/LqKdPxmxEntity.cs
| ... | ... | @@ -40,6 +40,30 @@ namespace NCC.Extend.Entitys.lq_kd_pxmx |
| 40 | 40 | /// </summary> |
| 41 | 41 | [SugarColumn(ColumnName = "pxjg")] |
| 42 | 42 | public decimal Pxjg { get; set; } |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 会员id | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_MemberId")] | |
| 48 | + public string MemberId { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 创建时间 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_CreateTIme")] | |
| 54 | + public DateTime? CreateTIme { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 项目次数 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_ProjectNumber")] | |
| 60 | + public int? ProjectNumber { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 是否有效 | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_IsEnabled")] | |
| 66 | + public int? IsEnabled { get; set; } | |
| 43 | 67 | |
| 44 | 68 | } |
| 45 | 69 | } |
| 46 | 70 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_mdxx/LqMdxxEntity.cs
| ... | ... | @@ -143,5 +143,41 @@ namespace NCC.Extend.Entitys.lq_mdxx |
| 143 | 143 | [SugarColumn(ColumnName = "status")] |
| 144 | 144 | public int? Status { get; set; } |
| 145 | 145 | |
| 146 | + /// <summary> | |
| 147 | + /// 目标-门店生命线 | |
| 148 | + /// </summary> | |
| 149 | + [SugarColumn(ColumnName = "xsyj")] | |
| 150 | + public decimal? Xsyj { get; set; } | |
| 151 | + | |
| 152 | + /// <summary> | |
| 153 | + /// 目标-消耗业绩 | |
| 154 | + /// </summary> | |
| 155 | + [SugarColumn(ColumnName = "xhyj")] | |
| 156 | + public decimal? Xhyj { get; set; } | |
| 157 | + | |
| 158 | + /// <summary> | |
| 159 | + /// 目标-项目数 | |
| 160 | + /// </summary> | |
| 161 | + [SugarColumn(ColumnName = "xms")] | |
| 162 | + public int? Xms { get; set; } | |
| 163 | + | |
| 164 | + /// <summary> | |
| 165 | + /// 目标-人头1 | |
| 166 | + /// </summary> | |
| 167 | + [SugarColumn(ColumnName = "rt1")] | |
| 168 | + public int? Rt1 { get; set; } | |
| 169 | + | |
| 170 | + /// <summary> | |
| 171 | + /// 目标-人头2 | |
| 172 | + /// </summary> | |
| 173 | + [SugarColumn(ColumnName = "rt2")] | |
| 174 | + public int? Rt2 { get; set; } | |
| 175 | + | |
| 176 | + /// <summary> | |
| 177 | + /// 目标-人次 | |
| 178 | + /// </summary> | |
| 179 | + [SugarColumn(ColumnName = "rc")] | |
| 180 | + public int? Rc { get; set; } | |
| 181 | + | |
| 146 | 182 | } |
| 147 | 183 | } |
| 148 | 184 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_xmzl/LqXmzlEntity.cs
| ... | ... | @@ -113,5 +113,22 @@ namespace NCC.Extend.Entitys.lq_xmzl |
| 113 | 113 | [SugarColumn(ColumnName = "cellje")] |
| 114 | 114 | public decimal? Cellje { get; set; } |
| 115 | 115 | |
| 116 | + /// <summary> | |
| 117 | + /// 手工费 | |
| 118 | + /// </summary> | |
| 119 | + [SugarColumn(ColumnName = "sgf")] | |
| 120 | + public decimal? Sgf { get; set; } | |
| 121 | + | |
| 122 | + /// <summary> | |
| 123 | + /// 项目次数 | |
| 124 | + /// </summary> | |
| 125 | + [SugarColumn(ColumnName = "F_ProjectNumber")] | |
| 126 | + public int? ProjectNumber { get; set; } | |
| 127 | + | |
| 128 | + /// <summary> | |
| 129 | + /// 来源类型 | |
| 130 | + /// </summary> | |
| 131 | + [SugarColumn(ColumnName = "F_SourceType")] | |
| 132 | + public string SourceType { get; set; } | |
| 116 | 133 | } |
| 117 | 134 | } |
| 118 | 135 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_ycsd_mdmbsd/LqYcsdMdmbsdEntity.cs deleted
| 1 | -using NCC.Common.Const; | |
| 2 | -using SqlSugar; | |
| 3 | -using System; | |
| 4 | - | |
| 5 | -namespace NCC.Extend.Entitys.lq_ycsd_mdmbsd | |
| 6 | -{ | |
| 7 | - /// <summary> | |
| 8 | - /// 门店目标设定 | |
| 9 | - /// </summary> | |
| 10 | - [SugarTable("lq_ycsd_mdmbsd")] | |
| 11 | - [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | - public class LqYcsdMdmbsdEntity | |
| 13 | - { | |
| 14 | - /// <summary> | |
| 15 | - /// 目标编号 | |
| 16 | - /// </summary> | |
| 17 | - [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | - public string Id { get; set; } | |
| 19 | - | |
| 20 | - /// <summary> | |
| 21 | - /// 目标-销售业绩 | |
| 22 | - /// </summary> | |
| 23 | - [SugarColumn(ColumnName = "xsyj")] | |
| 24 | - public string Xsyj { get; set; } | |
| 25 | - | |
| 26 | - /// <summary> | |
| 27 | - /// 目标-消耗业绩 | |
| 28 | - /// </summary> | |
| 29 | - [SugarColumn(ColumnName = "xhyj")] | |
| 30 | - public string Xhyj { get; set; } | |
| 31 | - | |
| 32 | - /// <summary> | |
| 33 | - /// 目标-项目数 | |
| 34 | - /// </summary> | |
| 35 | - [SugarColumn(ColumnName = "xms")] | |
| 36 | - public string Xms { get; set; } | |
| 37 | - | |
| 38 | - /// <summary> | |
| 39 | - /// 目标-人头 | |
| 40 | - /// </summary> | |
| 41 | - [SugarColumn(ColumnName = "rt")] | |
| 42 | - public string Rt { get; set; } | |
| 43 | - | |
| 44 | - /// <summary> | |
| 45 | - /// 目标-人次 | |
| 46 | - /// </summary> | |
| 47 | - [SugarColumn(ColumnName = "rc")] | |
| 48 | - public string Rc { get; set; } | |
| 49 | - | |
| 50 | - /// <summary> | |
| 51 | - /// 目标分类(个人门店天王) | |
| 52 | - /// </summary> | |
| 53 | - [SugarColumn(ColumnName = "mbfl")] | |
| 54 | - public string Mbfl { get; set; } | |
| 55 | - | |
| 56 | - /// <summary> | |
| 57 | - /// 具体对应 | |
| 58 | - /// </summary> | |
| 59 | - [SugarColumn(ColumnName = "jtdy")] | |
| 60 | - public string Jtdy { get; set; } | |
| 61 | - | |
| 62 | - } | |
| 63 | -} | |
| 64 | 0 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqHyglMapper.cs deleted
| 1 | -using NCC.Common.Helper; | |
| 2 | -using NCC.Extend.Entitys.Dto.LqHygl; | |
| 3 | -using Mapster; | |
| 4 | -using System.Collections.Generic; | |
| 5 | - | |
| 6 | -namespace NCC.Extend.Entitys.Mapper.LqHygl | |
| 7 | -{ | |
| 8 | - public class Mapper : IRegister | |
| 9 | - { | |
| 10 | - public void Register(TypeAdapterConfig config) | |
| 11 | - { | |
| 12 | - | |
| 13 | - } | |
| 14 | - } | |
| 15 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqYcsdMdmbsdMapper.cs deleted
| 1 | -using NCC.Common.Helper; | |
| 2 | -using NCC.Extend.Entitys.Dto.LqYcsdMdmbsd; | |
| 3 | -using Mapster; | |
| 4 | -using System.Collections.Generic; | |
| 5 | - | |
| 6 | -namespace NCC.Extend.Entitys.Mapper.LqYcsdMdmbsd | |
| 7 | -{ | |
| 8 | - public class Mapper : IRegister | |
| 9 | - { | |
| 10 | - public void Register(TypeAdapterConfig config) | |
| 11 | - { | |
| 12 | - } | |
| 13 | - } | |
| 14 | -} |
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqHyglService.cs deleted
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqYcsdMdmbsdService.cs deleted
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/LqZjlMdsmxsz/ILqZjlMdsmxszService.cs
| ... | ... | @@ -21,5 +21,12 @@ namespace NCC.Extend.Interfaces.LqZjlMdsmxsz |
| 21 | 21 | /// <param name="input">批量创建输入参数</param> |
| 22 | 22 | /// <returns>创建结果</returns> |
| 23 | 23 | Task<dynamic> BatchCreate(LqZjlMdsmxszBatchCreateInput input); |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 获取所有总经理门店生命线设置数据(分页查询) | |
| 27 | + /// </summary> | |
| 28 | + /// <param name="input">查询输入参数</param> | |
| 29 | + /// <returns>分页数据</returns> | |
| 30 | + Task<dynamic> GetPageList(LqZjlMdsmxszListQueryInput input); | |
| 24 | 31 | } |
| 25 | 32 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqHyglService.cs deleted
| 1 | -using NCC.Common.Core.Manager; | |
| 2 | -using NCC.Common.Enum; | |
| 3 | -using NCC.Common.Extension; | |
| 4 | -using NCC.Common.Filter; | |
| 5 | -using NCC.Dependency; | |
| 6 | -using NCC.DynamicApiController; | |
| 7 | -using NCC.FriendlyException; | |
| 8 | -using NCC.Extend.Interfaces.LqHygl; | |
| 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_hygl; | |
| 17 | -using NCC.Extend.Entitys.Dto.LqHygl; | |
| 18 | -using Yitter.IdGenerator; | |
| 19 | -using NCC.Common.Helper; | |
| 20 | -using NCC.JsonSerialization; | |
| 21 | -using NCC.Common.Model.NPOI; | |
| 22 | -using NCC.Common.Configuration; | |
| 23 | -using NCC.DataEncryption; | |
| 24 | -using NCC.ClayObject; | |
| 25 | - | |
| 26 | -namespace NCC.Extend.LqHygl | |
| 27 | -{ | |
| 28 | - /// <summary> | |
| 29 | - /// 会员管理服务 | |
| 30 | - /// </summary> | |
| 31 | - [ApiDescriptionSettings(Tag = "Extend",Name = "LqHygl", Order = 200)] | |
| 32 | - [Route("api/Extend/[controller]")] | |
| 33 | - public class LqHyglService : ILqHyglService, IDynamicApiController, ITransient | |
| 34 | - { | |
| 35 | - private readonly ISqlSugarRepository<LqHyglEntity> _lqHyglRepository; | |
| 36 | - private readonly SqlSugarScope _db; | |
| 37 | - private readonly IUserManager _userManager; | |
| 38 | - | |
| 39 | - /// <summary> | |
| 40 | - /// 初始化一个<see cref="LqHyglService"/>类型的新实例 | |
| 41 | - /// </summary> | |
| 42 | - public LqHyglService( | |
| 43 | - ISqlSugarRepository<LqHyglEntity> lqHyglRepository, | |
| 44 | - IUserManager userManager) | |
| 45 | - { | |
| 46 | - _lqHyglRepository = lqHyglRepository; | |
| 47 | - _db = _lqHyglRepository.Context; | |
| 48 | - _userManager = userManager; | |
| 49 | - } | |
| 50 | - | |
| 51 | - /// <summary> | |
| 52 | - /// 获取会员管理 | |
| 53 | - /// </summary> | |
| 54 | - /// <param name="id">参数</param> | |
| 55 | - /// <returns></returns> | |
| 56 | - [HttpGet("{id}")] | |
| 57 | - public async Task<dynamic> GetInfo(string id) | |
| 58 | - { | |
| 59 | - var entity = await _db.Queryable<LqHyglEntity>().FirstAsync(p => p.Id == id); | |
| 60 | - var output = entity.Adapt<LqHyglInfoOutput>(); | |
| 61 | - return output; | |
| 62 | - } | |
| 63 | - | |
| 64 | - /// <summary> | |
| 65 | - /// 获取会员管理列表 | |
| 66 | - /// </summary> | |
| 67 | - /// <param name="input">请求参数</param> | |
| 68 | - /// <returns></returns> | |
| 69 | - [HttpGet("")] | |
| 70 | - public async Task<dynamic> GetList([FromQuery] LqHyglListQueryInput input) | |
| 71 | - { | |
| 72 | - var sidx = input.sidx == null ? "id" : input.sidx; | |
| 73 | - List<string> queryYin = input.yin != null ? input.yin.Split(',').ToObeject<List<string>>() : null; | |
| 74 | - DateTime? startYin = queryYin != null ? Ext.GetDateTime(queryYin.First()) : null; | |
| 75 | - DateTime? endYin = queryYin != null ? Ext.GetDateTime(queryYin.Last()) : null; | |
| 76 | - List<string> queryYang = input.yang != null ? input.yang.Split(',').ToObeject<List<string>>() : null; | |
| 77 | - DateTime? startYang = queryYang != null ? Ext.GetDateTime(queryYang.First()) : null; | |
| 78 | - DateTime? endYang = queryYang != null ? Ext.GetDateTime(queryYang.Last()) : null; | |
| 79 | - var data = await _db.Queryable<LqHyglEntity>() | |
| 80 | - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id)) | |
| 81 | - .WhereIF(!string.IsNullOrEmpty(input.xm), p => p.Xm.Contains(input.xm)) | |
| 82 | - .WhereIF(!string.IsNullOrEmpty(input.xb), p => p.Xb.Equals(input.xb)) | |
| 83 | - .WhereIF(!string.IsNullOrEmpty(input.sjh), p => p.Sjh.Contains(input.sjh)) | |
| 84 | - .WhereIF(!string.IsNullOrEmpty(input.zy), p => p.Zy.Contains(input.zy)) | |
| 85 | - .WhereIF(!string.IsNullOrEmpty(input.jdqd), p => p.Jdqd.Equals(input.jdqd)) | |
| 86 | - .WhereIF(!string.IsNullOrEmpty(input.nl), p => p.Nl.Contains(input.nl)) | |
| 87 | - .WhereIF(!string.IsNullOrEmpty(input.tjr), p => p.Tjr.Contains(input.tjr)) | |
| 88 | - .WhereIF(queryYin != null, p => p.Yin >= new DateTime(startYin.ToDate().Year, startYin.ToDate().Month, startYin.ToDate().Day, 0, 0, 0)) | |
| 89 | - .WhereIF(queryYin != null, p => p.Yin <= new DateTime(endYin.ToDate().Year, endYin.ToDate().Month, endYin.ToDate().Day, 23, 59, 59)) | |
| 90 | - .WhereIF(queryYang != null, p => p.Yang >= new DateTime(startYang.ToDate().Year, startYang.ToDate().Month, startYang.ToDate().Day, 0, 0, 0)) | |
| 91 | - .WhereIF(queryYang != null, p => p.Yang <= new DateTime(endYang.ToDate().Year, endYang.ToDate().Month, endYang.ToDate().Day, 23, 59, 59)) | |
| 92 | - .WhereIF(!string.IsNullOrEmpty(input.jks), p => p.Jks.Contains(input.jks)) | |
| 93 | - .WhereIF(!string.IsNullOrEmpty(input.hygw), p => p.Hygw.Contains(input.hygw)) | |
| 94 | - .WhereIF(!string.IsNullOrEmpty(input.bq), p => p.Bq.Contains(input.bq)) | |
| 95 | - .WhereIF(!string.IsNullOrEmpty(input.ah), p => p.Ah.Contains(input.ah)) | |
| 96 | - .WhereIF(!string.IsNullOrEmpty(input.qt), p => p.Qt.Contains(input.qt)) | |
| 97 | - .Select(it=> new LqHyglListOutput | |
| 98 | - { | |
| 99 | - id = it.Id, | |
| 100 | - xm=it.Xm, | |
| 101 | - xb=it.Xb, | |
| 102 | - sjh=it.Sjh, | |
| 103 | - zy=it.Zy, | |
| 104 | - jdqd=it.Jdqd, | |
| 105 | - nl=it.Nl, | |
| 106 | - tjr=it.Tjr, | |
| 107 | - yin=it.Yin, | |
| 108 | - yang=it.Yang, | |
| 109 | - jks=it.Jks, | |
| 110 | - hygw=it.Hygw, | |
| 111 | - bq=it.Bq, | |
| 112 | - ah=it.Ah, | |
| 113 | - qt=it.Qt, | |
| 114 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 115 | - return PageResult<LqHyglListOutput>.SqlSugarPageResult(data); | |
| 116 | - } | |
| 117 | - | |
| 118 | - /// <summary> | |
| 119 | - /// 新建会员管理 | |
| 120 | - /// </summary> | |
| 121 | - /// <param name="input">参数</param> | |
| 122 | - /// <returns></returns> | |
| 123 | - [HttpPost("")] | |
| 124 | - public async Task Create([FromBody] LqHyglCrInput input) | |
| 125 | - { | |
| 126 | - var userInfo = await _userManager.GetUserInfo(); | |
| 127 | - var entity = input.Adapt<LqHyglEntity>(); | |
| 128 | - entity.Id = YitIdHelper.NextId().ToString(); | |
| 129 | - var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); | |
| 130 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 131 | - } | |
| 132 | - | |
| 133 | - /// <summary> | |
| 134 | - /// 获取会员管理无分页列表 | |
| 135 | - /// </summary> | |
| 136 | - /// <param name="input">请求参数</param> | |
| 137 | - /// <returns></returns> | |
| 138 | - [NonAction] | |
| 139 | - public async Task<dynamic> GetNoPagingList([FromQuery] LqHyglListQueryInput input) | |
| 140 | - { | |
| 141 | - var sidx = input.sidx == null ? "id" : input.sidx; | |
| 142 | - List<string> queryYin = input.yin != null ? input.yin.Split(',').ToObeject<List<string>>() : null; | |
| 143 | - DateTime? startYin = queryYin != null ? Ext.GetDateTime(queryYin.First()) : null; | |
| 144 | - DateTime? endYin = queryYin != null ? Ext.GetDateTime(queryYin.Last()) : null; | |
| 145 | - List<string> queryYang = input.yang != null ? input.yang.Split(',').ToObeject<List<string>>() : null; | |
| 146 | - DateTime? startYang = queryYang != null ? Ext.GetDateTime(queryYang.First()) : null; | |
| 147 | - DateTime? endYang = queryYang != null ? Ext.GetDateTime(queryYang.Last()) : null; | |
| 148 | - var data = await _db.Queryable<LqHyglEntity>() | |
| 149 | - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id)) | |
| 150 | - .WhereIF(!string.IsNullOrEmpty(input.xm), p => p.Xm.Contains(input.xm)) | |
| 151 | - .WhereIF(!string.IsNullOrEmpty(input.xb), p => p.Xb.Equals(input.xb)) | |
| 152 | - .WhereIF(!string.IsNullOrEmpty(input.sjh), p => p.Sjh.Contains(input.sjh)) | |
| 153 | - .WhereIF(!string.IsNullOrEmpty(input.zy), p => p.Zy.Contains(input.zy)) | |
| 154 | - .WhereIF(!string.IsNullOrEmpty(input.jdqd), p => p.Jdqd.Equals(input.jdqd)) | |
| 155 | - .WhereIF(!string.IsNullOrEmpty(input.nl), p => p.Nl.Contains(input.nl)) | |
| 156 | - .WhereIF(!string.IsNullOrEmpty(input.tjr), p => p.Tjr.Contains(input.tjr)) | |
| 157 | - .WhereIF(queryYin != null, p => p.Yin >= new DateTime(startYin.ToDate().Year, startYin.ToDate().Month, startYin.ToDate().Day, 0, 0, 0)) | |
| 158 | - .WhereIF(queryYin != null, p => p.Yin <= new DateTime(endYin.ToDate().Year, endYin.ToDate().Month, endYin.ToDate().Day, 23, 59, 59)) | |
| 159 | - .WhereIF(queryYang != null, p => p.Yang >= new DateTime(startYang.ToDate().Year, startYang.ToDate().Month, startYang.ToDate().Day, 0, 0, 0)) | |
| 160 | - .WhereIF(queryYang != null, p => p.Yang <= new DateTime(endYang.ToDate().Year, endYang.ToDate().Month, endYang.ToDate().Day, 23, 59, 59)) | |
| 161 | - .WhereIF(!string.IsNullOrEmpty(input.jks), p => p.Jks.Contains(input.jks)) | |
| 162 | - .WhereIF(!string.IsNullOrEmpty(input.hygw), p => p.Hygw.Contains(input.hygw)) | |
| 163 | - .WhereIF(!string.IsNullOrEmpty(input.bq), p => p.Bq.Contains(input.bq)) | |
| 164 | - .WhereIF(!string.IsNullOrEmpty(input.ah), p => p.Ah.Contains(input.ah)) | |
| 165 | - .WhereIF(!string.IsNullOrEmpty(input.qt), p => p.Qt.Contains(input.qt)) | |
| 166 | - .Select(it=> new LqHyglListOutput | |
| 167 | - { | |
| 168 | - id = it.Id, | |
| 169 | - xm=it.Xm, | |
| 170 | - xb=it.Xb, | |
| 171 | - sjh=it.Sjh, | |
| 172 | - zy=it.Zy, | |
| 173 | - jdqd=it.Jdqd, | |
| 174 | - nl=it.Nl, | |
| 175 | - tjr=it.Tjr, | |
| 176 | - yin=it.Yin, | |
| 177 | - yang=it.Yang, | |
| 178 | - jks=it.Jks, | |
| 179 | - hygw=it.Hygw, | |
| 180 | - bq=it.Bq, | |
| 181 | - ah=it.Ah, | |
| 182 | - qt=it.Qt, | |
| 183 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); | |
| 184 | - return data; | |
| 185 | - } | |
| 186 | - | |
| 187 | - /// <summary> | |
| 188 | - /// 导出会员管理 | |
| 189 | - /// </summary> | |
| 190 | - /// <param name="input">请求参数</param> | |
| 191 | - /// <returns></returns> | |
| 192 | - [HttpGet("Actions/Export")] | |
| 193 | - public async Task<dynamic> Export([FromQuery] LqHyglListQueryInput input) | |
| 194 | - { | |
| 195 | - var userInfo = await _userManager.GetUserInfo(); | |
| 196 | - var exportData = new List<LqHyglListOutput>(); | |
| 197 | - if (input.dataType == 0) | |
| 198 | - { | |
| 199 | - var data = Clay.Object(await this.GetList(input)); | |
| 200 | - exportData = data.Solidify<PageResult<LqHyglListOutput>>().list; | |
| 201 | - } | |
| 202 | - else | |
| 203 | - { | |
| 204 | - exportData = await this.GetNoPagingList(input); | |
| 205 | - } | |
| 206 | - List<ParamsModel> paramList = "[{\"value\":\"会员编号\",\"field\":\"id\"},{\"value\":\"姓名\",\"field\":\"xm\"},{\"value\":\"性别\",\"field\":\"xb\"},{\"value\":\"手机号\",\"field\":\"sjh\"},{\"value\":\"职业\",\"field\":\"zy\"},{\"value\":\"进店渠道\",\"field\":\"jdqd\"},{\"value\":\"年龄\",\"field\":\"nl\"},{\"value\":\"阴历生日\",\"field\":\"yin\"},{\"value\":\"阳历生日\",\"field\":\"yang\"},{\"value\":\"推荐人\",\"field\":\"tjr\"},{\"value\":\"健康师\",\"field\":\"jks\"},{\"value\":\"会员顾问\",\"field\":\"hygw\"},{\"value\":\"标签\",\"field\":\"bq\"},{\"value\":\"爱好\",\"field\":\"ah\"},{\"value\":\"其它\",\"field\":\"qt\"},]".ToList<ParamsModel>(); | |
| 207 | - ExcelConfig excelconfig = new ExcelConfig(); | |
| 208 | - excelconfig.FileName = "会员管理.xls"; | |
| 209 | - excelconfig.HeadFont = "微软雅黑"; | |
| 210 | - excelconfig.HeadPoint = 10; | |
| 211 | - excelconfig.IsAllSizeColumn = true; | |
| 212 | - excelconfig.ColumnModel = new List<ExcelColumnModel>(); | |
| 213 | - List<string> selectKeyList = input.selectKey.Split(',').ToList(); | |
| 214 | - foreach (var item in selectKeyList) | |
| 215 | - { | |
| 216 | - var isExist = paramList.Find(p => p.field == item); | |
| 217 | - if (isExist != null) | |
| 218 | - { | |
| 219 | - excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); | |
| 220 | - } | |
| 221 | - } | |
| 222 | - var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; | |
| 223 | - ExcelExportHelper<LqHyglListOutput>.Export(exportData, excelconfig, addPath); | |
| 224 | - var fileName = _userManager.UserId + "|" + addPath + "|xls"; | |
| 225 | - var output = new | |
| 226 | - { | |
| 227 | - name = excelconfig.FileName, | |
| 228 | - url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") | |
| 229 | - }; | |
| 230 | - return output; | |
| 231 | - } | |
| 232 | - | |
| 233 | - /// <summary> | |
| 234 | - /// 批量删除会员管理 | |
| 235 | - /// </summary> | |
| 236 | - /// <param name="ids">主键数组</param> | |
| 237 | - /// <returns></returns> | |
| 238 | - [HttpPost("batchRemove")] | |
| 239 | - public async Task BatchRemove([FromBody] List<string> ids) | |
| 240 | - { | |
| 241 | - var entitys = await _db.Queryable<LqHyglEntity>().In(it => it.Id, ids).ToListAsync(); | |
| 242 | - if (entitys.Count > 0) | |
| 243 | - { | |
| 244 | - try | |
| 245 | - { | |
| 246 | - //开启事务 | |
| 247 | - _db.BeginTran(); | |
| 248 | - //批量删除会员管理 | |
| 249 | - await _db.Deleteable<LqHyglEntity>().In(d => d.Id,ids).ExecuteCommandAsync(); | |
| 250 | - //关闭事务 | |
| 251 | - _db.CommitTran(); | |
| 252 | - } | |
| 253 | - catch (Exception) | |
| 254 | - { | |
| 255 | - //回滚事务 | |
| 256 | - _db.RollbackTran(); | |
| 257 | - throw NCCException.Oh(ErrorCode.COM1002); | |
| 258 | - } | |
| 259 | - } | |
| 260 | - } | |
| 261 | - | |
| 262 | - /// <summary> | |
| 263 | - /// 更新会员管理 | |
| 264 | - /// </summary> | |
| 265 | - /// <param name="id">主键</param> | |
| 266 | - /// <param name="input">参数</param> | |
| 267 | - /// <returns></returns> | |
| 268 | - [HttpPut("{id}")] | |
| 269 | - public async Task Update(string id, [FromBody] LqHyglUpInput input) | |
| 270 | - { | |
| 271 | - var entity = input.Adapt<LqHyglEntity>(); | |
| 272 | - var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); | |
| 273 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); | |
| 274 | - } | |
| 275 | - | |
| 276 | - /// <summary> | |
| 277 | - /// 删除会员管理 | |
| 278 | - /// </summary> | |
| 279 | - /// <returns></returns> | |
| 280 | - [HttpDelete("{id}")] | |
| 281 | - public async Task Delete(string id) | |
| 282 | - { | |
| 283 | - var entity = await _db.Queryable<LqHyglEntity>().FirstAsync(p => p.Id == id); | |
| 284 | - _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); | |
| 285 | - var isOk = await _db.Deleteable<LqHyglEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); | |
| 286 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); | |
| 287 | - } | |
| 288 | - } | |
| 289 | -} |
netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
| ... | ... | @@ -27,13 +27,15 @@ using NCC.DataEncryption; |
| 27 | 27 | using NCC.ClayObject; |
| 28 | 28 | using NCC.Extend.Utils; |
| 29 | 29 | using System.Net.Http; |
| 30 | +using NCC.Extend.Entitys.lq_jinsanjiao_user; | |
| 31 | +using NCC.Extend.Entitys.lq_xmzl; | |
| 30 | 32 | |
| 31 | 33 | namespace NCC.Extend.LqKdKdjlb |
| 32 | 34 | { |
| 33 | 35 | /// <summary> |
| 34 | 36 | /// 开单记录表服务 |
| 35 | 37 | /// </summary> |
| 36 | - [ApiDescriptionSettings(Tag = "Extend",Name = "LqKdKdjlb", Order = 200)] | |
| 38 | + [ApiDescriptionSettings(Tag = "绿纤开单记录表服务", Name = "LqKdKdjlb", Order = 200)] | |
| 37 | 39 | [Route("api/Extend/[controller]")] |
| 38 | 40 | public class LqKdKdjlbService : ILqKdKdjlbService, IDynamicApiController, ITransient |
| 39 | 41 | { |
| ... | ... | @@ -58,7 +60,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 58 | 60 | WeChatBotService weChatBotService, |
| 59 | 61 | LqKdKdjlbStringGenerator stringGenerator) |
| 60 | 62 | { |
| 61 | - _lqKdKdjlbRepository = lqKdKdjlbRepository; | |
| 63 | + _lqKdKdjlbRepository = lqKdKdjlbRepository; | |
| 62 | 64 | _db = _lqKdKdjlbRepository.Context; |
| 63 | 65 | _lqKdJksyjRepository = lqKdJksyjRepository; |
| 64 | 66 | _lqKdKjbsyjRepository = lqKdKjbsyjRepository; |
| ... | ... | @@ -67,7 +69,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 67 | 69 | _weChatBotService = weChatBotService; |
| 68 | 70 | _stringGenerator = stringGenerator; |
| 69 | 71 | } |
| 70 | - | |
| 72 | + #region 获取开单记录表 | |
| 71 | 73 | /// <summary> |
| 72 | 74 | /// 获取开单记录表 |
| 73 | 75 | /// </summary> |
| ... | ... | @@ -78,18 +80,20 @@ namespace NCC.Extend.LqKdKdjlb |
| 78 | 80 | { |
| 79 | 81 | var entity = await _db.Queryable<LqKdKdjlbEntity>().FirstAsync(p => p.Id == id); |
| 80 | 82 | var output = entity.Adapt<LqKdKdjlbInfoOutput>(); |
| 81 | - | |
| 83 | + | |
| 82 | 84 | var lqKdJksyjList = await _db.Queryable<LqKdJksyjEntity>().Where(w => w.Glkdbh == entity.Id).ToListAsync(); |
| 83 | 85 | output.lqKdJksyjList = lqKdJksyjList.Adapt<List<LqKdJksyjInfoOutput>>(); |
| 84 | - | |
| 86 | + | |
| 85 | 87 | var lqKdKjbsyjList = await _db.Queryable<LqKdKjbsyjEntity>().Where(w => w.Glkdbh == entity.Id).ToListAsync(); |
| 86 | 88 | output.lqKdKjbsyjList = lqKdKjbsyjList.Adapt<List<LqKdKjbsyjInfoOutput>>(); |
| 87 | - | |
| 89 | + | |
| 88 | 90 | var lqKdPxmxList = await _db.Queryable<LqKdPxmxEntity>().Where(w => w.Glkdbh == entity.Id).ToListAsync(); |
| 89 | 91 | output.lqKdPxmxList = lqKdPxmxList.Adapt<List<LqKdPxmxInfoOutput>>(); |
| 90 | 92 | return output; |
| 91 | 93 | } |
| 94 | + #endregion | |
| 92 | 95 | |
| 96 | + #region 获取开单记录表列表 | |
| 93 | 97 | /// <summary> |
| 94 | 98 | /// 获取开单记录表列表 |
| 95 | 99 | /// </summary> |
| ... | ... | @@ -129,37 +133,39 @@ namespace NCC.Extend.LqKdKdjlb |
| 129 | 133 | .WhereIF(!string.IsNullOrEmpty(input.jksyj), p => p.Jksyj.Contains(input.jksyj)) |
| 130 | 134 | .WhereIF(!string.IsNullOrEmpty(input.kjblsyj), p => p.Kjblsyj.Contains(input.kjblsyj)) |
| 131 | 135 | .WhereIF(!string.IsNullOrEmpty(input.pxxx), p => p.Pxxx.Contains(input.pxxx)) |
| 132 | - .Select(it=> new LqKdKdjlbListOutput | |
| 136 | + .Select(it => new LqKdKdjlbListOutput | |
| 133 | 137 | { |
| 134 | 138 | id = it.Id, |
| 135 | - djmd=it.Djmd, | |
| 136 | - jsj=it.Jsj, | |
| 137 | - kdrq=it.Kdrq, | |
| 138 | - gjlx=it.Gjlx, | |
| 139 | - hgjg=it.Hgjg, | |
| 140 | - zdyj=it.Zdyj, | |
| 141 | - sfyj=it.Sfyj, | |
| 142 | - qk=it.Qk, | |
| 143 | - ckfs=it.Ckfs, | |
| 144 | - ckmx=it.Ckmx, | |
| 145 | - fkfs=it.Fkfs, | |
| 146 | - fkyy=it.Fkyy, | |
| 147 | - fkpd=it.Fkpd, | |
| 148 | - khly=it.Khly, | |
| 149 | - tjr=it.Tjr, | |
| 150 | - sfskdd=it.Sfskdd, | |
| 151 | - jj=it.Jj, | |
| 152 | - bz=it.Bz, | |
| 153 | - kdhy=it.Kdhy, | |
| 154 | - kdhyc=it.Kdhyc, | |
| 155 | - kdhysjh=it.Kdhysjh, | |
| 156 | - jksyj=it.Jksyj, | |
| 157 | - kjblsyj=it.Kjblsyj, | |
| 158 | - pxxx=it.Pxxx, | |
| 159 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 160 | - return PageResult<LqKdKdjlbListOutput>.SqlSugarPageResult(data); | |
| 139 | + djmd = it.Djmd, | |
| 140 | + jsj = it.Jsj, | |
| 141 | + kdrq = it.Kdrq, | |
| 142 | + gjlx = it.Gjlx, | |
| 143 | + hgjg = it.Hgjg, | |
| 144 | + zdyj = it.Zdyj, | |
| 145 | + sfyj = it.Sfyj, | |
| 146 | + qk = it.Qk, | |
| 147 | + ckfs = it.Ckfs, | |
| 148 | + ckmx = it.Ckmx, | |
| 149 | + fkfs = it.Fkfs, | |
| 150 | + fkyy = it.Fkyy, | |
| 151 | + fkpd = it.Fkpd, | |
| 152 | + khly = it.Khly, | |
| 153 | + tjr = it.Tjr, | |
| 154 | + sfskdd = it.Sfskdd, | |
| 155 | + jj = it.Jj, | |
| 156 | + bz = it.Bz, | |
| 157 | + kdhy = it.Kdhy, | |
| 158 | + kdhyc = it.Kdhyc, | |
| 159 | + kdhysjh = it.Kdhysjh, | |
| 160 | + jksyj = it.Jksyj, | |
| 161 | + kjblsyj = it.Kjblsyj, | |
| 162 | + pxxx = it.Pxxx, | |
| 163 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 164 | + return PageResult<LqKdKdjlbListOutput>.SqlSugarPageResult(data); | |
| 161 | 165 | } |
| 166 | + #endregion | |
| 162 | 167 | |
| 168 | + #region 新建开单记录表 | |
| 163 | 169 | /// <summary> |
| 164 | 170 | /// 新建开单记录表 |
| 165 | 171 | /// </summary> |
| ... | ... | @@ -175,23 +181,25 @@ namespace NCC.Extend.LqKdKdjlb |
| 175 | 181 | { |
| 176 | 182 | //开启事务 |
| 177 | 183 | _db.BeginTran(); |
| 178 | - | |
| 179 | 184 | //新增开单记录表记录 |
| 185 | + entity.CreateUser = userInfo.userId; | |
| 180 | 186 | var newEntity = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteReturnEntityAsync(); |
| 181 | - | |
| 182 | 187 | var lqKdJksyjEntityList = input.lqKdJksyjList.Adapt<List<LqKdJksyjEntity>>(); |
| 183 | - if(lqKdJksyjEntityList != null) | |
| 188 | + //保存健康师业绩 | |
| 189 | + if (lqKdJksyjEntityList != null) | |
| 184 | 190 | { |
| 185 | 191 | foreach (var item in lqKdJksyjEntityList) |
| 186 | 192 | { |
| 187 | 193 | item.Id = YitIdHelper.NextId().ToString(); |
| 188 | 194 | item.Glkdbh = newEntity.Id; |
| 195 | + item.Yjsj = DateTime.Now; | |
| 196 | + item.Jsj_id = _db.Queryable<LqJinsanjiaoUserEntity>().Where(w => w.UserId == item.Jks && w.Month == DateTime.Now.ToString("yyyyMM")).FirstAsync().Result.JsjId; | |
| 189 | 197 | } |
| 190 | 198 | await _db.Insertable(lqKdJksyjEntityList).ExecuteCommandAsync(); |
| 191 | 199 | } |
| 192 | - | |
| 200 | + //保存科技部老师业绩 | |
| 193 | 201 | var lqKdKjbsyjEntityList = input.lqKdKjbsyjList.Adapt<List<LqKdKjbsyjEntity>>(); |
| 194 | - if(lqKdKjbsyjEntityList != null) | |
| 202 | + if (lqKdKjbsyjEntityList != null) | |
| 195 | 203 | { |
| 196 | 204 | foreach (var item in lqKdKjbsyjEntityList) |
| 197 | 205 | { |
| ... | ... | @@ -202,19 +210,23 @@ namespace NCC.Extend.LqKdKdjlb |
| 202 | 210 | } |
| 203 | 211 | |
| 204 | 212 | var lqKdPxmxEntityList = input.lqKdPxmxList.Adapt<List<LqKdPxmxEntity>>(); |
| 205 | - if(lqKdPxmxEntityList != null) | |
| 213 | + if (lqKdPxmxEntityList != null) | |
| 206 | 214 | { |
| 207 | 215 | foreach (var item in lqKdPxmxEntityList) |
| 208 | 216 | { |
| 209 | 217 | item.Id = YitIdHelper.NextId().ToString(); |
| 210 | 218 | item.Glkdbh = newEntity.Id; |
| 219 | + item.CreateTIme = DateTime.Now; | |
| 220 | + item.MemberId = entity.Kdhy; | |
| 221 | + item.ProjectNumber = _db.Queryable<LqXmzlEntity>().Where(w => w.Id == item.Px).FirstAsync().Result.ProjectNumber; | |
| 222 | + item.IsEnabled = 0; | |
| 211 | 223 | } |
| 212 | 224 | await _db.Insertable(lqKdPxmxEntityList).ExecuteCommandAsync(); |
| 213 | 225 | } |
| 214 | 226 | |
| 215 | 227 | //关闭事务 |
| 216 | 228 | _db.CommitTran(); |
| 217 | - | |
| 229 | + | |
| 218 | 230 | // 生成开单记录字符串并发送到企业微信 |
| 219 | 231 | try |
| 220 | 232 | { |
| ... | ... | @@ -224,7 +236,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 224 | 236 | var orderRecordString = _stringGenerator.GenerateOrderRecordString(entityInfo); |
| 225 | 237 | Console.WriteLine("开单记录字符串生成成功:"); |
| 226 | 238 | Console.WriteLine(orderRecordString); |
| 227 | - | |
| 239 | + | |
| 228 | 240 | // 发送到企业微信群 |
| 229 | 241 | try |
| 230 | 242 | { |
| ... | ... | @@ -257,7 +269,9 @@ namespace NCC.Extend.LqKdKdjlb |
| 257 | 269 | throw NCCException.Oh(ErrorCode.COM1000); |
| 258 | 270 | } |
| 259 | 271 | } |
| 272 | + #endregion | |
| 260 | 273 | |
| 274 | + #region 获取开单记录表无分页列表 | |
| 261 | 275 | /// <summary> |
| 262 | 276 | /// 获取开单记录表无分页列表 |
| 263 | 277 | /// </summary> |
| ... | ... | @@ -297,37 +311,39 @@ namespace NCC.Extend.LqKdKdjlb |
| 297 | 311 | .WhereIF(!string.IsNullOrEmpty(input.jksyj), p => p.Jksyj.Contains(input.jksyj)) |
| 298 | 312 | .WhereIF(!string.IsNullOrEmpty(input.kjblsyj), p => p.Kjblsyj.Contains(input.kjblsyj)) |
| 299 | 313 | .WhereIF(!string.IsNullOrEmpty(input.pxxx), p => p.Pxxx.Contains(input.pxxx)) |
| 300 | - .Select(it=> new LqKdKdjlbListOutput | |
| 314 | + .Select(it => new LqKdKdjlbListOutput | |
| 301 | 315 | { |
| 302 | 316 | id = it.Id, |
| 303 | - djmd=it.Djmd, | |
| 304 | - jsj=it.Jsj, | |
| 305 | - kdrq=it.Kdrq, | |
| 306 | - gjlx=it.Gjlx, | |
| 307 | - hgjg=it.Hgjg, | |
| 308 | - zdyj=it.Zdyj, | |
| 309 | - sfyj=it.Sfyj, | |
| 310 | - qk=it.Qk, | |
| 311 | - ckfs=it.Ckfs, | |
| 312 | - ckmx=it.Ckmx, | |
| 313 | - fkfs=it.Fkfs, | |
| 314 | - fkyy=it.Fkyy, | |
| 315 | - fkpd=it.Fkpd, | |
| 316 | - khly=it.Khly, | |
| 317 | - tjr=it.Tjr, | |
| 318 | - sfskdd=it.Sfskdd, | |
| 319 | - jj=it.Jj, | |
| 320 | - bz=it.Bz, | |
| 321 | - kdhy=it.Kdhy, | |
| 322 | - kdhyc=it.Kdhyc, | |
| 323 | - kdhysjh=it.Kdhysjh, | |
| 324 | - jksyj=it.Jksyj, | |
| 325 | - kjblsyj=it.Kjblsyj, | |
| 326 | - pxxx=it.Pxxx, | |
| 327 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); | |
| 328 | - return data; | |
| 317 | + djmd = it.Djmd, | |
| 318 | + jsj = it.Jsj, | |
| 319 | + kdrq = it.Kdrq, | |
| 320 | + gjlx = it.Gjlx, | |
| 321 | + hgjg = it.Hgjg, | |
| 322 | + zdyj = it.Zdyj, | |
| 323 | + sfyj = it.Sfyj, | |
| 324 | + qk = it.Qk, | |
| 325 | + ckfs = it.Ckfs, | |
| 326 | + ckmx = it.Ckmx, | |
| 327 | + fkfs = it.Fkfs, | |
| 328 | + fkyy = it.Fkyy, | |
| 329 | + fkpd = it.Fkpd, | |
| 330 | + khly = it.Khly, | |
| 331 | + tjr = it.Tjr, | |
| 332 | + sfskdd = it.Sfskdd, | |
| 333 | + jj = it.Jj, | |
| 334 | + bz = it.Bz, | |
| 335 | + kdhy = it.Kdhy, | |
| 336 | + kdhyc = it.Kdhyc, | |
| 337 | + kdhysjh = it.Kdhysjh, | |
| 338 | + jksyj = it.Jksyj, | |
| 339 | + kjblsyj = it.Kjblsyj, | |
| 340 | + pxxx = it.Pxxx, | |
| 341 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync(); | |
| 342 | + return data; | |
| 329 | 343 | } |
| 344 | + #endregion | |
| 330 | 345 | |
| 346 | + #region 导出开单记录表 | |
| 331 | 347 | /// <summary> |
| 332 | 348 | /// 导出开单记录表 |
| 333 | 349 | /// </summary> |
| ... | ... | @@ -347,7 +363,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 347 | 363 | { |
| 348 | 364 | exportData = await this.GetNoPagingList(input); |
| 349 | 365 | } |
| 350 | - List<ParamsModel> paramList = "[{\"value\":\"开单编号\",\"field\":\"id\"},{\"value\":\"开单会员\",\"field\":\"kdhy\"},{\"value\":\"开单会员名称\",\"field\":\"kdhyc\"},{\"value\":\"会员手机号\",\"field\":\"kdhysjh\"},{\"value\":\"单据门店\",\"field\":\"djmd\"},{\"value\":\"金三角\",\"field\":\"jsj\"},{\"value\":\"开单日期\",\"field\":\"kdrq\"},{\"value\":\"顾客类型\",\"field\":\"gjlx\"},{\"value\":\"合作机构\",\"field\":\"hgjg\"},{\"value\":\"整单业绩\",\"field\":\"zdyj\"},{\"value\":\"实付业绩\",\"field\":\"sfyj\"},{\"value\":\"欠款\",\"field\":\"qk\"},{\"value\":\"储扣方式\",\"field\":\"ckfs\"},{\"value\":\"储扣明细\",\"field\":\"ckmx\"},{\"value\":\"付款方式\",\"field\":\"fkfs\"},{\"value\":\"付款医院\",\"field\":\"fkyy\"},{\"value\":\"付款判断\",\"field\":\"fkpd\"},{\"value\":\"客户来源\",\"field\":\"khly\"},{\"value\":\"推荐人\",\"field\":\"tjr\"},{\"value\":\"是否首开订单\",\"field\":\"sfskdd\"},{\"value\":\"简介\",\"field\":\"jj\"},{\"value\":\"备注\",\"field\":\"bz\"},{\"value\":\"健康师业绩\",\"field\":\"jksyj\"},{\"value\":\"科技部老师业绩\",\"field\":\"kjblsyj\"},{\"value\":\"品项信息\",\"field\":\"pxxx\"},]".ToList<ParamsModel>(); | |
| 366 | + List<ParamsModel> paramList = "[{\"value\":\"开单编号\",\"field\":\"id\"},{\"value\":\"开单会员\",\"field\":\"kdhy\"},{\"value\":\"开单会员名称\",\"field\":\"kdhyc\"},{\"value\":\"会员手机号\",\"field\":\"kdhysjh\"},{\"value\":\"单据门店\",\"field\":\"djmd\"},{\"value\":\"金三角\",\"field\":\"jsj\"},{\"value\":\"开单日期\",\"field\":\"kdrq\"},{\"value\":\"顾客类型\",\"field\":\"gjlx\"},{\"value\":\"合作机构\",\"field\":\"hgjg\"},{\"value\":\"整单业绩\",\"field\":\"zdyj\"},{\"value\":\"实付业绩\",\"field\":\"sfyj\"},{\"value\":\"欠款\",\"field\":\"qk\"},{\"value\":\"储扣方式\",\"field\":\"ckfs\"},{\"value\":\"储扣明细\",\"field\":\"ckmx\"},{\"value\":\"付款方式\",\"field\":\"fkfs\"},{\"value\":\"付款医院\",\"field\":\"fkyy\"},{\"value\":\"付款判断\",\"field\":\"fkpd\"},{\"value\":\"客户来源\",\"field\":\"khly\"},{\"value\":\"推荐人\",\"field\":\"tjr\"},{\"value\":\"是否首开订单\",\"field\":\"sfskdd\"},{\"value\":\"简介\",\"field\":\"jj\"},{\"value\":\"备注\",\"field\":\"bz\"},{\"value\":\"健康师业绩\",\"field\":\"jksyj\"},{\"value\":\"科技部老师业绩\",\"field\":\"kjblsyj\"},{\"value\":\"品项信息\",\"field\":\"pxxx\"},]".ToList<ParamsModel>(); | |
| 351 | 367 | ExcelConfig excelconfig = new ExcelConfig(); |
| 352 | 368 | excelconfig.FileName = "开单记录表.xls"; |
| 353 | 369 | excelconfig.HeadFont = "微软雅黑"; |
| ... | ... | @@ -373,7 +389,9 @@ namespace NCC.Extend.LqKdKdjlb |
| 373 | 389 | }; |
| 374 | 390 | return output; |
| 375 | 391 | } |
| 392 | + #endregion | |
| 376 | 393 | |
| 394 | + #region 批量删除开单记录表 | |
| 377 | 395 | /// <summary> |
| 378 | 396 | /// 批量删除开单记录表 |
| 379 | 397 | /// </summary> |
| ... | ... | @@ -390,16 +408,16 @@ namespace NCC.Extend.LqKdKdjlb |
| 390 | 408 | //开启事务 |
| 391 | 409 | _db.BeginTran(); |
| 392 | 410 | //批量删除开单记录表 |
| 393 | - await _db.Deleteable<LqKdKdjlbEntity>().In(d => d.Id,ids).ExecuteCommandAsync(); | |
| 411 | + await _db.Deleteable<LqKdKdjlbEntity>().In(d => d.Id, ids).ExecuteCommandAsync(); | |
| 394 | 412 | |
| 395 | 413 | //清空子表数据 |
| 396 | - await _db.Deleteable<LqKdJksyjEntity>().In(u => u.Glkdbh,ids).ExecuteCommandAsync(); | |
| 414 | + await _db.Deleteable<LqKdJksyjEntity>().In(u => u.Glkdbh, ids).ExecuteCommandAsync(); | |
| 397 | 415 | |
| 398 | 416 | //清空子表数据 |
| 399 | - await _db.Deleteable<LqKdKjbsyjEntity>().In(u => u.Glkdbh,ids).ExecuteCommandAsync(); | |
| 417 | + await _db.Deleteable<LqKdKjbsyjEntity>().In(u => u.Glkdbh, ids).ExecuteCommandAsync(); | |
| 400 | 418 | |
| 401 | 419 | //清空子表数据 |
| 402 | - await _db.Deleteable<LqKdPxmxEntity>().In(u => u.Glkdbh,ids).ExecuteCommandAsync(); | |
| 420 | + await _db.Deleteable<LqKdPxmxEntity>().In(u => u.Glkdbh, ids).ExecuteCommandAsync(); | |
| 403 | 421 | //关闭事务 |
| 404 | 422 | _db.CommitTran(); |
| 405 | 423 | } |
| ... | ... | @@ -411,7 +429,9 @@ namespace NCC.Extend.LqKdKdjlb |
| 411 | 429 | } |
| 412 | 430 | } |
| 413 | 431 | } |
| 432 | + #endregion | |
| 414 | 433 | |
| 434 | + #region 更新开单记录表 | |
| 415 | 435 | /// <summary> |
| 416 | 436 | /// 更新开单记录表 |
| 417 | 437 | /// </summary> |
| ... | ... | @@ -426,7 +446,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 426 | 446 | { |
| 427 | 447 | //开启事务 |
| 428 | 448 | _db.BeginTran(); |
| 429 | - | |
| 449 | + | |
| 430 | 450 | //更新开单记录表记录 |
| 431 | 451 | await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| 432 | 452 | |
| ... | ... | @@ -434,7 +454,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 434 | 454 | await _db.Deleteable<LqKdJksyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync(); |
| 435 | 455 | //新增新数据 |
| 436 | 456 | var lqKdJksyjEntityList = input.lqKdJksyjList.Adapt<List<LqKdJksyjEntity>>(); |
| 437 | - if(lqKdJksyjEntityList != null) | |
| 457 | + if (lqKdJksyjEntityList != null) | |
| 438 | 458 | { |
| 439 | 459 | foreach (var item in lqKdJksyjEntityList) |
| 440 | 460 | { |
| ... | ... | @@ -448,7 +468,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 448 | 468 | await _db.Deleteable<LqKdKjbsyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync(); |
| 449 | 469 | //新增新数据 |
| 450 | 470 | var lqKdKjbsyjEntityList = input.lqKdKjbsyjList.Adapt<List<LqKdKjbsyjEntity>>(); |
| 451 | - if(lqKdKjbsyjEntityList != null) | |
| 471 | + if (lqKdKjbsyjEntityList != null) | |
| 452 | 472 | { |
| 453 | 473 | foreach (var item in lqKdKjbsyjEntityList) |
| 454 | 474 | { |
| ... | ... | @@ -462,7 +482,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 462 | 482 | await _db.Deleteable<LqKdPxmxEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync(); |
| 463 | 483 | //新增新数据 |
| 464 | 484 | var lqKdPxmxEntityList = input.lqKdPxmxList.Adapt<List<LqKdPxmxEntity>>(); |
| 465 | - if(lqKdPxmxEntityList != null) | |
| 485 | + if (lqKdPxmxEntityList != null) | |
| 466 | 486 | { |
| 467 | 487 | foreach (var item in lqKdPxmxEntityList) |
| 468 | 488 | { |
| ... | ... | @@ -471,7 +491,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 471 | 491 | } |
| 472 | 492 | await _db.Insertable(lqKdPxmxEntityList).ExecuteCommandAsync(); |
| 473 | 493 | } |
| 474 | - | |
| 494 | + | |
| 475 | 495 | //关闭事务 |
| 476 | 496 | _db.CommitTran(); |
| 477 | 497 | } |
| ... | ... | @@ -482,7 +502,9 @@ namespace NCC.Extend.LqKdKdjlb |
| 482 | 502 | throw NCCException.Oh(ErrorCode.COM1001); |
| 483 | 503 | } |
| 484 | 504 | } |
| 505 | + #endregion | |
| 485 | 506 | |
| 507 | + #region 删除开单记录表 | |
| 486 | 508 | /// <summary> |
| 487 | 509 | /// 删除开单记录表 |
| 488 | 510 | /// </summary> |
| ... | ... | @@ -496,7 +518,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 496 | 518 | { |
| 497 | 519 | //开启事务 |
| 498 | 520 | _db.BeginTran(); |
| 499 | - | |
| 521 | + | |
| 500 | 522 | //删除开单记录表记录 |
| 501 | 523 | await _db.Deleteable<LqKdKdjlbEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); |
| 502 | 524 | |
| ... | ... | @@ -508,7 +530,7 @@ namespace NCC.Extend.LqKdKdjlb |
| 508 | 530 | |
| 509 | 531 | //清空子表数据 |
| 510 | 532 | await _db.Deleteable<LqKdPxmxEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync(); |
| 511 | - | |
| 533 | + | |
| 512 | 534 | //关闭事务 |
| 513 | 535 | _db.CommitTran(); |
| 514 | 536 | } |
| ... | ... | @@ -519,6 +541,6 @@ namespace NCC.Extend.LqKdKdjlb |
| 519 | 541 | throw NCCException.Oh(ErrorCode.COM1002); |
| 520 | 542 | } |
| 521 | 543 | } |
| 522 | - | |
| 544 | + #endregion | |
| 523 | 545 | } |
| 524 | 546 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqMdxxService.cs
| ... | ... | @@ -28,7 +28,7 @@ namespace NCC.Extend.LqMdxx |
| 28 | 28 | /// <summary> |
| 29 | 29 | /// 门店信息服务 |
| 30 | 30 | /// </summary> |
| 31 | - [ApiDescriptionSettings(Tag = "Extend",Name = "LqMdxx", Order = 200)] | |
| 31 | + [ApiDescriptionSettings(Tag = "绿纤门店信息服务",Name = "LqMdxx", Order = 200)] | |
| 32 | 32 | [Route("api/Extend/[controller]")] |
| 33 | 33 | public class LqMdxxService : ILqMdxxService, IDynamicApiController, ITransient |
| 34 | 34 | { |
| ... | ... | @@ -111,6 +111,12 @@ namespace NCC.Extend.LqMdxx |
| 111 | 111 | kjb=it.Kjb, |
| 112 | 112 | dxmb=it.Dxmb, |
| 113 | 113 | syb=it.Syb, |
| 114 | + xsyj=it.Xsyj, | |
| 115 | + xhyj=it.Xhyj, | |
| 116 | + xms=it.Xms, | |
| 117 | + rt1=it.Rt1, | |
| 118 | + rt2=it.Rt2, | |
| 119 | + rc=it.Rc, | |
| 114 | 120 | }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); |
| 115 | 121 | return PageResult<LqMdxxListOutput>.SqlSugarPageResult(data); |
| 116 | 122 | } |
| ... | ... | @@ -271,6 +277,30 @@ namespace NCC.Extend.LqMdxx |
| 271 | 277 | } |
| 272 | 278 | |
| 273 | 279 | /// <summary> |
| 280 | + /// 更新门店目标字段 | |
| 281 | + /// </summary> | |
| 282 | + /// <param name="id">主键</param> | |
| 283 | + /// <param name="input">目标字段参数</param> | |
| 284 | + /// <returns></returns> | |
| 285 | + [HttpPut("{id}/targets")] | |
| 286 | + public async Task UpdateTargets(string id, [FromBody] LqMdxxTargetUpdateInput input) | |
| 287 | + { | |
| 288 | + var isOk = await _db.Updateable<LqMdxxEntity>() | |
| 289 | + .SetColumns(it => new LqMdxxEntity | |
| 290 | + { | |
| 291 | + Xsyj = input.xsyj, | |
| 292 | + Xhyj = input.xhyj, | |
| 293 | + Xms = input.xms, | |
| 294 | + Rt1 = input.rt1, | |
| 295 | + Rt2 = input.rt2, | |
| 296 | + Rc = input.rc | |
| 297 | + }) | |
| 298 | + .Where(x => x.Id == id) | |
| 299 | + .ExecuteCommandAsync(); | |
| 300 | + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); | |
| 301 | + } | |
| 302 | + | |
| 303 | + /// <summary> | |
| 274 | 304 | /// 删除门店信息 |
| 275 | 305 | /// </summary> |
| 276 | 306 | /// <returns></returns> | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqXmzlService.cs
| ... | ... | @@ -28,7 +28,7 @@ namespace NCC.Extend.LqXmzl |
| 28 | 28 | /// <summary> |
| 29 | 29 | /// 项目资料服务 |
| 30 | 30 | /// </summary> |
| 31 | - [ApiDescriptionSettings(Tag = "Extend",Name = "LqXmzl", Order = 200)] | |
| 31 | + [ApiDescriptionSettings(Tag = "绿纤项目资料服务", Name = "LqXmzl", Order = 200)] | |
| 32 | 32 | [Route("api/Extend/[controller]")] |
| 33 | 33 | public class LqXmzlService : ILqXmzlService, IDynamicApiController, ITransient |
| 34 | 34 | { |
| ... | ... | @@ -39,15 +39,15 @@ namespace NCC.Extend.LqXmzl |
| 39 | 39 | /// <summary> |
| 40 | 40 | /// 初始化一个<see cref="LqXmzlService"/>类型的新实例 |
| 41 | 41 | /// </summary> |
| 42 | - public LqXmzlService( | |
| 43 | - ISqlSugarRepository<LqXmzlEntity> lqXmzlRepository, | |
| 44 | - IUserManager userManager) | |
| 42 | + public LqXmzlService(ISqlSugarRepository<LqXmzlEntity> lqXmzlRepository, IUserManager userManager) | |
| 45 | 43 | { |
| 46 | - _lqXmzlRepository = lqXmzlRepository; | |
| 44 | + _lqXmzlRepository = lqXmzlRepository; | |
| 47 | 45 | _db = _lqXmzlRepository.Context; |
| 48 | 46 | _userManager = userManager; |
| 49 | 47 | } |
| 50 | 48 | |
| 49 | + #region 获取项目资料 | |
| 50 | + | |
| 51 | 51 | /// <summary> |
| 52 | 52 | /// 获取项目资料 |
| 53 | 53 | /// </summary> |
| ... | ... | @@ -60,12 +60,14 @@ namespace NCC.Extend.LqXmzl |
| 60 | 60 | var output = entity.Adapt<LqXmzlInfoOutput>(); |
| 61 | 61 | return output; |
| 62 | 62 | } |
| 63 | - | |
| 63 | + #endregion | |
| 64 | + | |
| 65 | + #region 获取项目资料列表 | |
| 64 | 66 | /// <summary> |
| 65 | - /// 获取项目资料列表 | |
| 66 | - /// </summary> | |
| 67 | - /// <param name="input">请求参数</param> | |
| 68 | - /// <returns></returns> | |
| 67 | + /// 获取项目资料列表 | |
| 68 | + /// </summary> | |
| 69 | + /// <param name="input">请求参数</param> | |
| 70 | + /// <returns></returns> | |
| 69 | 71 | [HttpGet("")] |
| 70 | 72 | public async Task<dynamic> GetList([FromQuery] LqXmzlListQueryInput input) |
| 71 | 73 | { |
| ... | ... | @@ -88,29 +90,35 @@ namespace NCC.Extend.LqXmzl |
| 88 | 90 | .WhereIF(!string.IsNullOrEmpty(input.qt2), p => p.Qt2.Contains(input.qt2)) |
| 89 | 91 | .WhereIF(!string.IsNullOrEmpty(input.syje), p => p.Syje.Equals(input.syje)) |
| 90 | 92 | .WhereIF(!string.IsNullOrEmpty(input.cellje), p => p.Cellje.Equals(input.cellje)) |
| 91 | - .Select(it=> new LqXmzlListOutput | |
| 93 | + .WhereIF(!string.IsNullOrEmpty(input.sgf), p => p.Sgf.Equals(input.sgf)) | |
| 94 | + .Select(it => new LqXmzlListOutput | |
| 92 | 95 | { |
| 93 | 96 | id = it.Id, |
| 94 | - xmbh=it.Xmbh, | |
| 95 | - xmmc=it.Xmmc, | |
| 96 | - bzjg=it.Bzjg, | |
| 97 | - xmsc=it.Xmsc, | |
| 98 | - jcfwtc=it.Jcfwtc, | |
| 99 | - fl1=it.Fl1, | |
| 100 | - fl2=it.Fl2, | |
| 101 | - fl3=it.Fl3, | |
| 102 | - fl4=it.Fl4, | |
| 103 | - tjlb=it.Tjlb, | |
| 104 | - zklb=it.Zklb, | |
| 105 | - fl=it.Fl, | |
| 106 | - qt1=it.Qt1, | |
| 107 | - qt2=it.Qt2, | |
| 108 | - syje=it.Syje, | |
| 109 | - cellje=it.Cellje, | |
| 110 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 111 | - return PageResult<LqXmzlListOutput>.SqlSugarPageResult(data); | |
| 97 | + xmbh = it.Xmbh, | |
| 98 | + xmmc = it.Xmmc, | |
| 99 | + bzjg = it.Bzjg, | |
| 100 | + xmsc = it.Xmsc, | |
| 101 | + jcfwtc = it.Jcfwtc, | |
| 102 | + fl1 = it.Fl1, | |
| 103 | + fl2 = it.Fl2, | |
| 104 | + fl3 = it.Fl3, | |
| 105 | + fl4 = it.Fl4, | |
| 106 | + tjlb = it.Tjlb, | |
| 107 | + zklb = it.Zklb, | |
| 108 | + fl = it.Fl, | |
| 109 | + qt1 = it.Qt1, | |
| 110 | + qt2 = it.Qt2, | |
| 111 | + syje = it.Syje, | |
| 112 | + cellje = it.Cellje, | |
| 113 | + sgf = it.Sgf, | |
| 114 | + projectNumber = it.ProjectNumber, | |
| 115 | + sourceType = it.SourceType, | |
| 116 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 117 | + return PageResult<LqXmzlListOutput>.SqlSugarPageResult(data); | |
| 112 | 118 | } |
| 119 | + #endregion | |
| 113 | 120 | |
| 121 | + #region 新建项目资料 | |
| 114 | 122 | /// <summary> |
| 115 | 123 | /// 新建项目资料 |
| 116 | 124 | /// </summary> |
| ... | ... | @@ -125,12 +133,14 @@ namespace NCC.Extend.LqXmzl |
| 125 | 133 | var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); |
| 126 | 134 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); |
| 127 | 135 | } |
| 136 | + #endregion | |
| 128 | 137 | |
| 138 | + #region 获取项目资料无分页列表 | |
| 129 | 139 | /// <summary> |
| 130 | - /// 获取项目资料无分页列表 | |
| 131 | - /// </summary> | |
| 132 | - /// <param name="input">请求参数</param> | |
| 133 | - /// <returns></returns> | |
| 140 | + /// 获取项目资料无分页列表 | |
| 141 | + /// </summary> | |
| 142 | + /// <param name="input">请求参数</param> | |
| 143 | + /// <returns></returns> | |
| 134 | 144 | [NonAction] |
| 135 | 145 | public async Task<dynamic> GetNoPagingList([FromQuery] LqXmzlListQueryInput input) |
| 136 | 146 | { |
| ... | ... | @@ -153,34 +163,38 @@ namespace NCC.Extend.LqXmzl |
| 153 | 163 | .WhereIF(!string.IsNullOrEmpty(input.qt2), p => p.Qt2.Contains(input.qt2)) |
| 154 | 164 | .WhereIF(!string.IsNullOrEmpty(input.syje), p => p.Syje.Equals(input.syje)) |
| 155 | 165 | .WhereIF(!string.IsNullOrEmpty(input.cellje), p => p.Cellje.Equals(input.cellje)) |
| 156 | - .Select(it=> new LqXmzlListOutput | |
| 166 | + .WhereIF(!string.IsNullOrEmpty(input.sgf), p => p.Sgf.Equals(input.sgf)) | |
| 167 | + .Select(it => new LqXmzlListOutput | |
| 157 | 168 | { |
| 158 | 169 | id = it.Id, |
| 159 | - xmbh=it.Xmbh, | |
| 160 | - xmmc=it.Xmmc, | |
| 161 | - bzjg=it.Bzjg, | |
| 162 | - xmsc=it.Xmsc, | |
| 163 | - jcfwtc=it.Jcfwtc, | |
| 164 | - fl1=it.Fl1, | |
| 165 | - fl2=it.Fl2, | |
| 166 | - fl3=it.Fl3, | |
| 167 | - fl4=it.Fl4, | |
| 168 | - tjlb=it.Tjlb, | |
| 169 | - zklb=it.Zklb, | |
| 170 | - fl=it.Fl, | |
| 171 | - qt1=it.Qt1, | |
| 172 | - qt2=it.Qt2, | |
| 173 | - syje=it.Syje, | |
| 174 | - cellje=it.Cellje, | |
| 175 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); | |
| 176 | - return data; | |
| 170 | + xmbh = it.Xmbh, | |
| 171 | + xmmc = it.Xmmc, | |
| 172 | + bzjg = it.Bzjg, | |
| 173 | + xmsc = it.Xmsc, | |
| 174 | + jcfwtc = it.Jcfwtc, | |
| 175 | + fl1 = it.Fl1, | |
| 176 | + fl2 = it.Fl2, | |
| 177 | + fl3 = it.Fl3, | |
| 178 | + fl4 = it.Fl4, | |
| 179 | + tjlb = it.Tjlb, | |
| 180 | + zklb = it.Zklb, | |
| 181 | + fl = it.Fl, | |
| 182 | + qt1 = it.Qt1, | |
| 183 | + qt2 = it.Qt2, | |
| 184 | + syje = it.Syje, | |
| 185 | + cellje = it.Cellje, | |
| 186 | + sgf = it.Sgf, | |
| 187 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync(); | |
| 188 | + return data; | |
| 177 | 189 | } |
| 190 | + #endregion | |
| 178 | 191 | |
| 192 | + #region 导出项目资料 | |
| 179 | 193 | /// <summary> |
| 180 | - /// 导出项目资料 | |
| 181 | - /// </summary> | |
| 182 | - /// <param name="input">请求参数</param> | |
| 183 | - /// <returns></returns> | |
| 194 | + /// 导出项目资料 | |
| 195 | + /// </summary> | |
| 196 | + /// <param name="input">请求参数</param> | |
| 197 | + /// <returns></returns> | |
| 184 | 198 | [HttpGet("Actions/Export")] |
| 185 | 199 | public async Task<dynamic> Export([FromQuery] LqXmzlListQueryInput input) |
| 186 | 200 | { |
| ... | ... | @@ -195,7 +209,7 @@ namespace NCC.Extend.LqXmzl |
| 195 | 209 | { |
| 196 | 210 | exportData = await this.GetNoPagingList(input); |
| 197 | 211 | } |
| 198 | - List<ParamsModel> paramList = "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"项目编号\",\"field\":\"xmbh\"},{\"value\":\"项目名称\",\"field\":\"xmmc\"},{\"value\":\"标准价格\",\"field\":\"bzjg\"},{\"value\":\"时长(分)\",\"field\":\"xmsc\"},{\"value\":\"基础服务提成\",\"field\":\"jcfwtc\"},{\"value\":\"分类1汇总表\",\"field\":\"fl1\"},{\"value\":\"分类2汇总表\",\"field\":\"fl2\"},{\"value\":\"分类3工资用\",\"field\":\"fl3\"},{\"value\":\"分类4品项用\",\"field\":\"fl4\"},{\"value\":\"统计类别\",\"field\":\"tjlb\"},{\"value\":\"折扣类别\",\"field\":\"zklb\"},{\"value\":\"分类\",\"field\":\"fl\"},{\"value\":\"其它1\",\"field\":\"qt1\"},{\"value\":\"其它2\",\"field\":\"qt2\"},{\"value\":\"溯源金额\",\"field\":\"syje\"},{\"value\":\"Cell金额\",\"field\":\"cellje\"},]".ToList<ParamsModel>(); | |
| 212 | + List<ParamsModel> paramList = "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"项目编号\",\"field\":\"xmbh\"},{\"value\":\"项目名称\",\"field\":\"xmmc\"},{\"value\":\"标准价格\",\"field\":\"bzjg\"},{\"value\":\"时长(分)\",\"field\":\"xmsc\"},{\"value\":\"基础服务提成\",\"field\":\"jcfwtc\"},{\"value\":\"分类1汇总表\",\"field\":\"fl1\"},{\"value\":\"分类2汇总表\",\"field\":\"fl2\"},{\"value\":\"分类3工资用\",\"field\":\"fl3\"},{\"value\":\"分类4品项用\",\"field\":\"fl4\"},{\"value\":\"统计类别\",\"field\":\"tjlb\"},{\"value\":\"折扣类别\",\"field\":\"zklb\"},{\"value\":\"分类\",\"field\":\"fl\"},{\"value\":\"其它1\",\"field\":\"qt1\"},{\"value\":\"其它2\",\"field\":\"qt2\"},{\"value\":\"溯源金额\",\"field\":\"syje\"},{\"value\":\"Cell金额\",\"field\":\"cellje\"},{\"value\":\"手工费\",\"field\":\"sgf\"},]".ToList<ParamsModel>(); | |
| 199 | 213 | ExcelConfig excelconfig = new ExcelConfig(); |
| 200 | 214 | excelconfig.FileName = "项目资料.xls"; |
| 201 | 215 | excelconfig.HeadFont = "微软雅黑"; |
| ... | ... | @@ -221,7 +235,9 @@ namespace NCC.Extend.LqXmzl |
| 221 | 235 | }; |
| 222 | 236 | return output; |
| 223 | 237 | } |
| 238 | + #endregion | |
| 224 | 239 | |
| 240 | + #region 批量删除项目资料 | |
| 225 | 241 | /// <summary> |
| 226 | 242 | /// 批量删除项目资料 |
| 227 | 243 | /// </summary> |
| ... | ... | @@ -238,7 +254,7 @@ namespace NCC.Extend.LqXmzl |
| 238 | 254 | //开启事务 |
| 239 | 255 | _db.BeginTran(); |
| 240 | 256 | //批量删除项目资料 |
| 241 | - await _db.Deleteable<LqXmzlEntity>().In(d => d.Id,ids).ExecuteCommandAsync(); | |
| 257 | + await _db.Deleteable<LqXmzlEntity>().In(d => d.Id, ids).ExecuteCommandAsync(); | |
| 242 | 258 | //关闭事务 |
| 243 | 259 | _db.CommitTran(); |
| 244 | 260 | } |
| ... | ... | @@ -250,7 +266,9 @@ namespace NCC.Extend.LqXmzl |
| 250 | 266 | } |
| 251 | 267 | } |
| 252 | 268 | } |
| 269 | + #endregion | |
| 253 | 270 | |
| 271 | + #region 更新项目资料 | |
| 254 | 272 | /// <summary> |
| 255 | 273 | /// 更新项目资料 |
| 256 | 274 | /// </summary> |
| ... | ... | @@ -264,7 +282,9 @@ namespace NCC.Extend.LqXmzl |
| 264 | 282 | var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| 265 | 283 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); |
| 266 | 284 | } |
| 285 | + #endregion | |
| 267 | 286 | |
| 287 | + #region 删除项目资料 | |
| 268 | 288 | /// <summary> |
| 269 | 289 | /// 删除项目资料 |
| 270 | 290 | /// </summary> |
| ... | ... | @@ -277,5 +297,6 @@ namespace NCC.Extend.LqXmzl |
| 277 | 297 | var isOk = await _db.Deleteable<LqXmzlEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); |
| 278 | 298 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); |
| 279 | 299 | } |
| 300 | + #endregion | |
| 280 | 301 | } |
| 281 | 302 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqYcsdJsjService.cs
| ... | ... | @@ -31,7 +31,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 31 | 31 | /// <summary> |
| 32 | 32 | /// 金三角设定服务 |
| 33 | 33 | /// </summary> |
| 34 | - [ApiDescriptionSettings(Tag = "Extend",Name = "LqYcsdJsj", Order = 200)] | |
| 34 | + [ApiDescriptionSettings(Tag = "Extend", Name = "LqYcsdJsj", Order = 200)] | |
| 35 | 35 | [Route("api/Extend/[controller]")] |
| 36 | 36 | public class LqYcsdJsjService : ILqYcsdJsjService, IDynamicApiController, ITransient |
| 37 | 37 | { |
| ... | ... | @@ -42,15 +42,14 @@ namespace NCC.Extend.LqYcsdJsj |
| 42 | 42 | /// <summary> |
| 43 | 43 | /// 初始化一个<see cref="LqYcsdJsjService"/>类型的新实例 |
| 44 | 44 | /// </summary> |
| 45 | - public LqYcsdJsjService( | |
| 46 | - ISqlSugarRepository<LqYcsdJsjEntity> lqYcsdJsjRepository, | |
| 47 | - IUserManager userManager) | |
| 45 | + public LqYcsdJsjService(ISqlSugarRepository<LqYcsdJsjEntity> lqYcsdJsjRepository,IUserManager userManager) | |
| 48 | 46 | { |
| 49 | - _lqYcsdJsjRepository = lqYcsdJsjRepository; | |
| 47 | + _lqYcsdJsjRepository = lqYcsdJsjRepository; | |
| 50 | 48 | _db = _lqYcsdJsjRepository.Context; |
| 51 | 49 | _userManager = userManager; |
| 52 | 50 | } |
| 53 | 51 | |
| 52 | + #region 获取金三角设定 | |
| 54 | 53 | /// <summary> |
| 55 | 54 | /// 获取金三角设定 |
| 56 | 55 | /// </summary> |
| ... | ... | @@ -63,7 +62,9 @@ namespace NCC.Extend.LqYcsdJsj |
| 63 | 62 | var output = entity.Adapt<LqYcsdJsjInfoOutput>(); |
| 64 | 63 | return output; |
| 65 | 64 | } |
| 65 | + #endregion | |
| 66 | 66 | |
| 67 | + #region 获取金三角设定详情 | |
| 67 | 68 | /// <summary> |
| 68 | 69 | /// 获取金三角设定详情(包含成员信息) |
| 69 | 70 | /// </summary> |
| ... | ... | @@ -74,9 +75,9 @@ namespace NCC.Extend.LqYcsdJsj |
| 74 | 75 | { |
| 75 | 76 | var entity = await _db.Queryable<LqYcsdJsjEntity>().FirstAsync(p => p.Id == id); |
| 76 | 77 | if (entity == null) throw NCCException.Oh(ErrorCode.COM1005); |
| 77 | - | |
| 78 | + | |
| 78 | 79 | var output = entity.Adapt<LqYcsdJsjInfoOutput>(); |
| 79 | - | |
| 80 | + | |
| 80 | 81 | // 获取成员信息 |
| 81 | 82 | var members = await _db.Queryable<LqJinsanjiaoUserEntity>() |
| 82 | 83 | .Where(x => x.JsjId == id && x.Status == "ACTIVE") |
| ... | ... | @@ -91,14 +92,16 @@ namespace NCC.Extend.LqYcsdJsj |
| 91 | 92 | status = x.Status |
| 92 | 93 | }) |
| 93 | 94 | .ToListAsync(); |
| 94 | - | |
| 95 | + | |
| 95 | 96 | return new |
| 96 | 97 | { |
| 97 | 98 | jsj = output, |
| 98 | 99 | members = members |
| 99 | 100 | }; |
| 100 | 101 | } |
| 102 | + #endregion | |
| 101 | 103 | |
| 104 | + #region 获取金三角设定列表 | |
| 102 | 105 | /// <summary> |
| 103 | 106 | /// 获取金三角设定列表 |
| 104 | 107 | /// </summary> |
| ... | ... | @@ -113,16 +116,79 @@ namespace NCC.Extend.LqYcsdJsj |
| 113 | 116 | .WhereIF(!string.IsNullOrEmpty(input.yf), p => p.Yf.Contains(input.yf)) |
| 114 | 117 | .WhereIF(!string.IsNullOrEmpty(input.md), p => p.Md.Contains(input.md)) |
| 115 | 118 | .WhereIF(!string.IsNullOrEmpty(input.jsj), p => p.Jsj.Contains(input.jsj)) |
| 116 | - .Select(it=> new LqYcsdJsjListOutput | |
| 119 | + .Select(it => new LqYcsdJsjListOutput | |
| 117 | 120 | { |
| 118 | 121 | id = it.Id, |
| 119 | 122 | yf = it.Yf, |
| 120 | 123 | md = it.Md, |
| 121 | 124 | jsj = it.Jsj |
| 122 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 123 | - return PageResult<LqYcsdJsjListOutput>.SqlSugarPageResult(data); | |
| 125 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 126 | + return PageResult<LqYcsdJsjListOutput>.SqlSugarPageResult(data); | |
| 127 | + } | |
| 128 | + #endregion | |
| 129 | + | |
| 130 | + #region 获取本月金三角列表 | |
| 131 | + /// <summary> | |
| 132 | + /// 获取本月金三角列表 | |
| 133 | + /// </summary> | |
| 134 | + /// <returns>本月金三角列表</returns> | |
| 135 | + [HttpGet("Actions/GetThisMonthList")] | |
| 136 | + public async Task<dynamic> GetThisMonthList() | |
| 137 | + { | |
| 138 | + var data = await _db.Queryable<LqYcsdJsjEntity>() | |
| 139 | + .Where(x => x.Yf == DateTime.Now.ToString("yyyyMM")) | |
| 140 | + .Select(it => new LqYcsdJsjListOutput | |
| 141 | + { | |
| 142 | + id = it.Id, | |
| 143 | + yf = it.Yf, | |
| 144 | + md = it.Md, | |
| 145 | + jsj = it.Jsj | |
| 146 | + }).MergeTable().ToListAsync(); | |
| 147 | + return data; | |
| 148 | + } | |
| 149 | + #endregion | |
| 150 | + | |
| 151 | + #region 获取用户本月金三角信息 | |
| 152 | + /// <summary> | |
| 153 | + /// 获取某个用户本月所在的金三角信息 | |
| 154 | + /// </summary> | |
| 155 | + /// <param name="userId">用户ID</param> | |
| 156 | + /// <returns>用户本月所在的金三角信息</returns> | |
| 157 | + [HttpGet("Actions/GetThisMonthJsjInfo")] | |
| 158 | + public async Task<dynamic> GetThisMonthJsjInfo([FromQuery] string userId) | |
| 159 | + { | |
| 160 | + if (string.IsNullOrEmpty(userId)) | |
| 161 | + { | |
| 162 | + throw NCCException.Oh(ErrorCode.COM1001, "用户ID不能为空"); | |
| 163 | + } | |
| 164 | + var currentMonth = DateTime.Now.ToString("yyyyMM"); | |
| 165 | + // 通过用户ID查找本月所在的金三角信息 | |
| 166 | + var data = await _db.Queryable<LqJinsanjiaoUserEntity>() | |
| 167 | + .LeftJoin<LqYcsdJsjEntity>((jsjUser, jsj) => jsjUser.JsjId == jsj.Id) | |
| 168 | + .LeftJoin<LqMdxxEntity>((jsjUser, jsj, md) => jsj.Md == md.Id) | |
| 169 | + .Where((jsjUser, jsj, md) => jsjUser.UserId == userId) | |
| 170 | + .Where((jsjUser, jsj, md) => jsj.Yf == currentMonth) | |
| 171 | + .Where((jsjUser, jsj, md) => jsjUser.DeleteMark == 0) | |
| 172 | + .Where((jsjUser, jsj, md) => jsjUser.Status == "ACTIVE") | |
| 173 | + .Select((jsjUser, jsj, md) => new | |
| 174 | + { | |
| 175 | + jsjId = jsj.Id, | |
| 176 | + jsjName = jsj.Jsj, | |
| 177 | + month = jsj.Yf, | |
| 178 | + storeId = jsj.Md, | |
| 179 | + storeName = md.Dm, | |
| 180 | + userName = jsjUser.UserName, | |
| 181 | + isLeader = jsjUser.IsLeader, | |
| 182 | + status = jsjUser.Status, | |
| 183 | + sortOrder = jsjUser.SortOrder | |
| 184 | + }) | |
| 185 | + .FirstAsync(); | |
| 186 | + | |
| 187 | + return data; | |
| 124 | 188 | } |
| 189 | + #endregion | |
| 125 | 190 | |
| 191 | + #region 新建金三角 | |
| 126 | 192 | /// <summary> |
| 127 | 193 | /// 新建金三角 |
| 128 | 194 | /// </summary> |
| ... | ... | @@ -132,7 +198,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 132 | 198 | public async Task Create([FromBody] LqYcsdJsjCrInput input) |
| 133 | 199 | { |
| 134 | 200 | var userInfo = await _userManager.GetUserInfo(); |
| 135 | - | |
| 201 | + | |
| 136 | 202 | // 参数验证 |
| 137 | 203 | if (string.IsNullOrEmpty(input.yf)) |
| 138 | 204 | throw NCCException.Oh(ErrorCode.COM1000, "月份不能为空"); |
| ... | ... | @@ -140,13 +206,13 @@ namespace NCC.Extend.LqYcsdJsj |
| 140 | 206 | throw NCCException.Oh(ErrorCode.COM1000, "门店不能为空"); |
| 141 | 207 | if (string.IsNullOrEmpty(input.jsj)) |
| 142 | 208 | throw NCCException.Oh(ErrorCode.COM1000, "金三角名称不能为空"); |
| 143 | - | |
| 209 | + | |
| 144 | 210 | // 验证月份格式 |
| 145 | 211 | if (!DateTime.TryParseExact(input.yf, "yyyyMM", null, DateTimeStyles.None, out _)) |
| 146 | 212 | { |
| 147 | 213 | throw NCCException.Oh(ErrorCode.COM1000, "月份格式必须为yyyyMM"); |
| 148 | 214 | } |
| 149 | - | |
| 215 | + | |
| 150 | 216 | // 验证多人战队必须有顾问 |
| 151 | 217 | if (input.members != null && input.members.Count >= 2) |
| 152 | 218 | { |
| ... | ... | @@ -156,7 +222,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 156 | 222 | throw NCCException.Oh(ErrorCode.COM1000, "两人或两人以上的战队必须有一个顾问"); |
| 157 | 223 | } |
| 158 | 224 | } |
| 159 | - | |
| 225 | + | |
| 160 | 226 | // 验证金三角名称是否已存在 |
| 161 | 227 | var existingJsj = await _db.Queryable<LqYcsdJsjEntity>() |
| 162 | 228 | .Where(x => x.Yf == input.yf && x.Md == input.md && x.Jsj == input.jsj) |
| ... | ... | @@ -196,7 +262,9 @@ namespace NCC.Extend.LqYcsdJsj |
| 196 | 262 | throw NCCException.Oh(ErrorCode.COM1000, ex.Message); |
| 197 | 263 | } |
| 198 | 264 | } |
| 265 | + #endregion | |
| 199 | 266 | |
| 267 | + #region 获取金三角设定无分页列表 | |
| 200 | 268 | /// <summary> |
| 201 | 269 | /// 获取金三角设定无分页列表 |
| 202 | 270 | /// </summary> |
| ... | ... | @@ -211,16 +279,18 @@ namespace NCC.Extend.LqYcsdJsj |
| 211 | 279 | .WhereIF(!string.IsNullOrEmpty(input.yf), p => p.Yf.Contains(input.yf)) |
| 212 | 280 | .WhereIF(!string.IsNullOrEmpty(input.md), p => p.Md.Contains(input.md)) |
| 213 | 281 | .WhereIF(!string.IsNullOrEmpty(input.jsj), p => p.Jsj.Contains(input.jsj)) |
| 214 | - .Select(it=> new LqYcsdJsjListOutput | |
| 282 | + .Select(it => new LqYcsdJsjListOutput | |
| 215 | 283 | { |
| 216 | 284 | id = it.Id, |
| 217 | 285 | yf = it.Yf, |
| 218 | 286 | md = it.Md, |
| 219 | 287 | jsj = it.Jsj |
| 220 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); | |
| 221 | - return data; | |
| 288 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync(); | |
| 289 | + return data; | |
| 222 | 290 | } |
| 291 | + #endregion | |
| 223 | 292 | |
| 293 | + #region 导出金三角设定 | |
| 224 | 294 | /// <summary> |
| 225 | 295 | /// 导出金三角设定 |
| 226 | 296 | /// </summary> |
| ... | ... | @@ -240,7 +310,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 240 | 310 | { |
| 241 | 311 | exportData = await this.GetNoPagingList(input); |
| 242 | 312 | } |
| 243 | - List<ParamsModel> paramList = "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"月份\",\"field\":\"yf\"},{\"value\":\"门店\",\"field\":\"md\"},{\"value\":\"金三角\",\"field\":\"jsj\"}]".ToList<ParamsModel>(); | |
| 313 | + List<ParamsModel> paramList = "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"月份\",\"field\":\"yf\"},{\"value\":\"门店\",\"field\":\"md\"},{\"value\":\"金三角\",\"field\":\"jsj\"}]".ToList<ParamsModel>(); | |
| 244 | 314 | ExcelConfig excelconfig = new ExcelConfig(); |
| 245 | 315 | excelconfig.FileName = "金三角设定.xls"; |
| 246 | 316 | excelconfig.HeadFont = "微软雅黑"; |
| ... | ... | @@ -266,7 +336,9 @@ namespace NCC.Extend.LqYcsdJsj |
| 266 | 336 | }; |
| 267 | 337 | return output; |
| 268 | 338 | } |
| 339 | + #endregion | |
| 269 | 340 | |
| 341 | + #region 批量删除金三角设定 | |
| 270 | 342 | /// <summary> |
| 271 | 343 | /// 批量删除金三角设定 |
| 272 | 344 | /// </summary> |
| ... | ... | @@ -283,7 +355,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 283 | 355 | //开启事务 |
| 284 | 356 | _db.BeginTran(); |
| 285 | 357 | //批量删除金三角设定 |
| 286 | - await _db.Deleteable<LqYcsdJsjEntity>().In(d => d.Id,ids).ExecuteCommandAsync(); | |
| 358 | + await _db.Deleteable<LqYcsdJsjEntity>().In(d => d.Id, ids).ExecuteCommandAsync(); | |
| 287 | 359 | //关闭事务 |
| 288 | 360 | _db.CommitTran(); |
| 289 | 361 | } |
| ... | ... | @@ -295,7 +367,9 @@ namespace NCC.Extend.LqYcsdJsj |
| 295 | 367 | } |
| 296 | 368 | } |
| 297 | 369 | } |
| 370 | + #endregion | |
| 298 | 371 | |
| 372 | + #region 更新金三角设定 | |
| 299 | 373 | /// <summary> |
| 300 | 374 | /// 更新金三角设定 |
| 301 | 375 | /// </summary> |
| ... | ... | @@ -309,7 +383,9 @@ namespace NCC.Extend.LqYcsdJsj |
| 309 | 383 | var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| 310 | 384 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); |
| 311 | 385 | } |
| 312 | - | |
| 386 | + #endregion | |
| 387 | + | |
| 388 | + #region 删除金三角设定 | |
| 313 | 389 | /// <summary> |
| 314 | 390 | /// 删除金三角设定 |
| 315 | 391 | /// </summary> |
| ... | ... | @@ -322,6 +398,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 322 | 398 | var isOk = await _db.Deleteable<LqYcsdJsjEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); |
| 323 | 399 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); |
| 324 | 400 | } |
| 401 | + #endregion | |
| 325 | 402 | |
| 326 | 403 | #region 私有辅助方法 |
| 327 | 404 | |
| ... | ... | @@ -337,12 +414,12 @@ namespace NCC.Extend.LqYcsdJsj |
| 337 | 414 | // 获取门店名称 |
| 338 | 415 | var storeName = await GetStoreNameById(mdId); |
| 339 | 416 | var tAreaName = $"{storeName}T区"; |
| 340 | - | |
| 417 | + | |
| 341 | 418 | // 检查该门店该月份是否已有T区 |
| 342 | 419 | var existingTArea = await _db.Queryable<LqYcsdJsjEntity>() |
| 343 | 420 | .Where(x => x.Yf == yf && x.Md == mdId && x.Jsj == tAreaName) |
| 344 | 421 | .FirstAsync(); |
| 345 | - | |
| 422 | + | |
| 346 | 423 | if (existingTArea == null) |
| 347 | 424 | { |
| 348 | 425 | // 创建门店T区 |
| ... | ... | @@ -353,7 +430,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 353 | 430 | Md = mdId, |
| 354 | 431 | Jsj = tAreaName |
| 355 | 432 | }; |
| 356 | - | |
| 433 | + | |
| 357 | 434 | await _db.Insertable(tAreaEntity).ExecuteCommandAsync(); |
| 358 | 435 | } |
| 359 | 436 | } |
| ... | ... | @@ -369,12 +446,12 @@ namespace NCC.Extend.LqYcsdJsj |
| 369 | 446 | private async Task CreateOrUpdateTeamTArea(string yf, string teamName, string mdId, string creatorUserId) |
| 370 | 447 | { |
| 371 | 448 | var tAreaName = $"{teamName}T区"; |
| 372 | - | |
| 449 | + | |
| 373 | 450 | // 检查该战队该月份是否已有T区 |
| 374 | 451 | var existingTArea = await _db.Queryable<LqYcsdJsjEntity>() |
| 375 | 452 | .Where(x => x.Yf == yf && x.Md == mdId && x.Jsj == tAreaName) |
| 376 | 453 | .FirstAsync(); |
| 377 | - | |
| 454 | + | |
| 378 | 455 | if (existingTArea == null) |
| 379 | 456 | { |
| 380 | 457 | // 创建战队T区 |
| ... | ... | @@ -385,7 +462,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 385 | 462 | Md = mdId, |
| 386 | 463 | Jsj = tAreaName |
| 387 | 464 | }; |
| 388 | - | |
| 465 | + | |
| 389 | 466 | await _db.Insertable(tAreaEntity).ExecuteCommandAsync(); |
| 390 | 467 | } |
| 391 | 468 | } |
| ... | ... | @@ -400,7 +477,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 400 | 477 | private async Task CreateJsjMembers(string jsjId, List<JsjMemberInput> members, string creatorUserId) |
| 401 | 478 | { |
| 402 | 479 | var memberEntities = new List<LqJinsanjiaoUserEntity>(); |
| 403 | - | |
| 480 | + | |
| 404 | 481 | for (int i = 0; i < members.Count; i++) |
| 405 | 482 | { |
| 406 | 483 | var member = members[i]; |
| ... | ... | @@ -415,12 +492,13 @@ namespace NCC.Extend.LqYcsdJsj |
| 415 | 492 | SortOrder = member.sortOrder > 0 ? member.sortOrder : i + 1, |
| 416 | 493 | CreatorTime = DateTime.Now, |
| 417 | 494 | CreatorUserId = creatorUserId, |
| 418 | - DeleteMark = 0 | |
| 495 | + DeleteMark = 0, | |
| 496 | + Month = DateTime.Now.ToString("yyyyMM") | |
| 419 | 497 | }; |
| 420 | - | |
| 498 | + | |
| 421 | 499 | memberEntities.Add(memberEntity); |
| 422 | 500 | } |
| 423 | - | |
| 501 | + | |
| 424 | 502 | if (memberEntities.Count > 0) |
| 425 | 503 | { |
| 426 | 504 | await _db.Insertable(memberEntities).ExecuteCommandAsync(); | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqYcsdMdmbsdService.cs deleted
| 1 | -using NCC.Common.Core.Manager; | |
| 2 | -using NCC.Common.Enum; | |
| 3 | -using NCC.Common.Extension; | |
| 4 | -using NCC.Common.Filter; | |
| 5 | -using NCC.Dependency; | |
| 6 | -using NCC.DynamicApiController; | |
| 7 | -using NCC.FriendlyException; | |
| 8 | -using NCC.Extend.Interfaces.LqYcsdMdmbsd; | |
| 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_ycsd_mdmbsd; | |
| 17 | -using NCC.Extend.Entitys.Dto.LqYcsdMdmbsd; | |
| 18 | -using Yitter.IdGenerator; | |
| 19 | -using NCC.Common.Helper; | |
| 20 | -using NCC.JsonSerialization; | |
| 21 | -using NCC.Common.Model.NPOI; | |
| 22 | -using NCC.Common.Configuration; | |
| 23 | -using NCC.DataEncryption; | |
| 24 | -using NCC.ClayObject; | |
| 25 | - | |
| 26 | -namespace NCC.Extend.LqYcsdMdmbsd | |
| 27 | -{ | |
| 28 | - /// <summary> | |
| 29 | - /// 门店目标设定服务 | |
| 30 | - /// </summary> | |
| 31 | - [ApiDescriptionSettings(Tag = "Extend",Name = "LqYcsdMdmbsd", Order = 200)] | |
| 32 | - [Route("api/Extend/[controller]")] | |
| 33 | - public class LqYcsdMdmbsdService : ILqYcsdMdmbsdService, IDynamicApiController, ITransient | |
| 34 | - { | |
| 35 | - private readonly ISqlSugarRepository<LqYcsdMdmbsdEntity> _lqYcsdMdmbsdRepository; | |
| 36 | - private readonly SqlSugarScope _db; | |
| 37 | - private readonly IUserManager _userManager; | |
| 38 | - | |
| 39 | - /// <summary> | |
| 40 | - /// 初始化一个<see cref="LqYcsdMdmbsdService"/>类型的新实例 | |
| 41 | - /// </summary> | |
| 42 | - public LqYcsdMdmbsdService( | |
| 43 | - ISqlSugarRepository<LqYcsdMdmbsdEntity> lqYcsdMdmbsdRepository, | |
| 44 | - IUserManager userManager) | |
| 45 | - { | |
| 46 | - _lqYcsdMdmbsdRepository = lqYcsdMdmbsdRepository; | |
| 47 | - _db = _lqYcsdMdmbsdRepository.Context; | |
| 48 | - _userManager = userManager; | |
| 49 | - } | |
| 50 | - | |
| 51 | - /// <summary> | |
| 52 | - /// 获取门店目标设定 | |
| 53 | - /// </summary> | |
| 54 | - /// <param name="id">参数</param> | |
| 55 | - /// <returns></returns> | |
| 56 | - [HttpGet("{id}")] | |
| 57 | - public async Task<dynamic> GetInfo(string id) | |
| 58 | - { | |
| 59 | - var entity = await _db.Queryable<LqYcsdMdmbsdEntity>().FirstAsync(p => p.Id == id); | |
| 60 | - var output = entity.Adapt<LqYcsdMdmbsdInfoOutput>(); | |
| 61 | - return output; | |
| 62 | - } | |
| 63 | - | |
| 64 | - /// <summary> | |
| 65 | - /// 获取门店目标设定列表 | |
| 66 | - /// </summary> | |
| 67 | - /// <param name="input">请求参数</param> | |
| 68 | - /// <returns></returns> | |
| 69 | - [HttpGet("")] | |
| 70 | - public async Task<dynamic> GetList([FromQuery] LqYcsdMdmbsdListQueryInput input) | |
| 71 | - { | |
| 72 | - var sidx = input.sidx == null ? "id" : input.sidx; | |
| 73 | - var data = await _db.Queryable<LqYcsdMdmbsdEntity>() | |
| 74 | - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id)) | |
| 75 | - .WhereIF(!string.IsNullOrEmpty(input.xsyj), p => p.Xsyj.Contains(input.xsyj)) | |
| 76 | - .WhereIF(!string.IsNullOrEmpty(input.xhyj), p => p.Xhyj.Contains(input.xhyj)) | |
| 77 | - .WhereIF(!string.IsNullOrEmpty(input.xms), p => p.Xms.Contains(input.xms)) | |
| 78 | - .WhereIF(!string.IsNullOrEmpty(input.rt), p => p.Rt.Contains(input.rt)) | |
| 79 | - .WhereIF(!string.IsNullOrEmpty(input.rc), p => p.Rc.Contains(input.rc)) | |
| 80 | - .WhereIF(!string.IsNullOrEmpty(input.mbfl), p => p.Mbfl.Contains(input.mbfl)) | |
| 81 | - .WhereIF(!string.IsNullOrEmpty(input.jtdy), p => p.Jtdy.Contains(input.jtdy)) | |
| 82 | - .Select(it=> new LqYcsdMdmbsdListOutput | |
| 83 | - { | |
| 84 | - id = it.Id, | |
| 85 | - xsyj=it.Xsyj, | |
| 86 | - xhyj=it.Xhyj, | |
| 87 | - xms=it.Xms, | |
| 88 | - rt=it.Rt, | |
| 89 | - rc=it.Rc, | |
| 90 | - mbfl=it.Mbfl, | |
| 91 | - jtdy=it.Jtdy, | |
| 92 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 93 | - return PageResult<LqYcsdMdmbsdListOutput>.SqlSugarPageResult(data); | |
| 94 | - } | |
| 95 | - | |
| 96 | - /// <summary> | |
| 97 | - /// 新建门店目标设定 | |
| 98 | - /// </summary> | |
| 99 | - /// <param name="input">参数</param> | |
| 100 | - /// <returns></returns> | |
| 101 | - [HttpPost("")] | |
| 102 | - public async Task Create([FromBody] LqYcsdMdmbsdCrInput input) | |
| 103 | - { | |
| 104 | - var userInfo = await _userManager.GetUserInfo(); | |
| 105 | - var entity = input.Adapt<LqYcsdMdmbsdEntity>(); | |
| 106 | - entity.Id = YitIdHelper.NextId().ToString(); | |
| 107 | - var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); | |
| 108 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 109 | - } | |
| 110 | - | |
| 111 | - /// <summary> | |
| 112 | - /// 获取门店目标设定无分页列表 | |
| 113 | - /// </summary> | |
| 114 | - /// <param name="input">请求参数</param> | |
| 115 | - /// <returns></returns> | |
| 116 | - [NonAction] | |
| 117 | - public async Task<dynamic> GetNoPagingList([FromQuery] LqYcsdMdmbsdListQueryInput input) | |
| 118 | - { | |
| 119 | - var sidx = input.sidx == null ? "id" : input.sidx; | |
| 120 | - var data = await _db.Queryable<LqYcsdMdmbsdEntity>() | |
| 121 | - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id)) | |
| 122 | - .WhereIF(!string.IsNullOrEmpty(input.xsyj), p => p.Xsyj.Contains(input.xsyj)) | |
| 123 | - .WhereIF(!string.IsNullOrEmpty(input.xhyj), p => p.Xhyj.Contains(input.xhyj)) | |
| 124 | - .WhereIF(!string.IsNullOrEmpty(input.xms), p => p.Xms.Contains(input.xms)) | |
| 125 | - .WhereIF(!string.IsNullOrEmpty(input.rt), p => p.Rt.Contains(input.rt)) | |
| 126 | - .WhereIF(!string.IsNullOrEmpty(input.rc), p => p.Rc.Contains(input.rc)) | |
| 127 | - .WhereIF(!string.IsNullOrEmpty(input.mbfl), p => p.Mbfl.Contains(input.mbfl)) | |
| 128 | - .WhereIF(!string.IsNullOrEmpty(input.jtdy), p => p.Jtdy.Contains(input.jtdy)) | |
| 129 | - .Select(it=> new LqYcsdMdmbsdListOutput | |
| 130 | - { | |
| 131 | - id = it.Id, | |
| 132 | - xsyj=it.Xsyj, | |
| 133 | - xhyj=it.Xhyj, | |
| 134 | - xms=it.Xms, | |
| 135 | - rt=it.Rt, | |
| 136 | - rc=it.Rc, | |
| 137 | - mbfl=it.Mbfl, | |
| 138 | - jtdy=it.Jtdy, | |
| 139 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); | |
| 140 | - return data; | |
| 141 | - } | |
| 142 | - | |
| 143 | - /// <summary> | |
| 144 | - /// 导出门店目标设定 | |
| 145 | - /// </summary> | |
| 146 | - /// <param name="input">请求参数</param> | |
| 147 | - /// <returns></returns> | |
| 148 | - [HttpGet("Actions/Export")] | |
| 149 | - public async Task<dynamic> Export([FromQuery] LqYcsdMdmbsdListQueryInput input) | |
| 150 | - { | |
| 151 | - var userInfo = await _userManager.GetUserInfo(); | |
| 152 | - var exportData = new List<LqYcsdMdmbsdListOutput>(); | |
| 153 | - if (input.dataType == 0) | |
| 154 | - { | |
| 155 | - var data = Clay.Object(await this.GetList(input)); | |
| 156 | - exportData = data.Solidify<PageResult<LqYcsdMdmbsdListOutput>>().list; | |
| 157 | - } | |
| 158 | - else | |
| 159 | - { | |
| 160 | - exportData = await this.GetNoPagingList(input); | |
| 161 | - } | |
| 162 | - List<ParamsModel> paramList = "[{\"value\":\"目标编号\",\"field\":\"id\"},{\"value\":\"销售业绩\",\"field\":\"xsyj\"},{\"value\":\"消耗业绩\",\"field\":\"xhyj\"},{\"value\":\"项目数\",\"field\":\"xms\"},{\"value\":\"人头\",\"field\":\"rt\"},{\"value\":\"人次\",\"field\":\"rc\"},{\"value\":\"目标分类\",\"field\":\"mbfl\"},{\"value\":\"具体对应\",\"field\":\"jtdy\"},]".ToList<ParamsModel>(); | |
| 163 | - ExcelConfig excelconfig = new ExcelConfig(); | |
| 164 | - excelconfig.FileName = "门店目标设定.xls"; | |
| 165 | - excelconfig.HeadFont = "微软雅黑"; | |
| 166 | - excelconfig.HeadPoint = 10; | |
| 167 | - excelconfig.IsAllSizeColumn = true; | |
| 168 | - excelconfig.ColumnModel = new List<ExcelColumnModel>(); | |
| 169 | - List<string> selectKeyList = input.selectKey.Split(',').ToList(); | |
| 170 | - foreach (var item in selectKeyList) | |
| 171 | - { | |
| 172 | - var isExist = paramList.Find(p => p.field == item); | |
| 173 | - if (isExist != null) | |
| 174 | - { | |
| 175 | - excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); | |
| 176 | - } | |
| 177 | - } | |
| 178 | - var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; | |
| 179 | - ExcelExportHelper<LqYcsdMdmbsdListOutput>.Export(exportData, excelconfig, addPath); | |
| 180 | - var fileName = _userManager.UserId + "|" + addPath + "|xls"; | |
| 181 | - var output = new | |
| 182 | - { | |
| 183 | - name = excelconfig.FileName, | |
| 184 | - url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") | |
| 185 | - }; | |
| 186 | - return output; | |
| 187 | - } | |
| 188 | - | |
| 189 | - /// <summary> | |
| 190 | - /// 批量删除门店目标设定 | |
| 191 | - /// </summary> | |
| 192 | - /// <param name="ids">主键数组</param> | |
| 193 | - /// <returns></returns> | |
| 194 | - [HttpPost("batchRemove")] | |
| 195 | - public async Task BatchRemove([FromBody] List<string> ids) | |
| 196 | - { | |
| 197 | - var entitys = await _db.Queryable<LqYcsdMdmbsdEntity>().In(it => it.Id, ids).ToListAsync(); | |
| 198 | - if (entitys.Count > 0) | |
| 199 | - { | |
| 200 | - try | |
| 201 | - { | |
| 202 | - //开启事务 | |
| 203 | - _db.BeginTran(); | |
| 204 | - //批量删除门店目标设定 | |
| 205 | - await _db.Deleteable<LqYcsdMdmbsdEntity>().In(d => d.Id,ids).ExecuteCommandAsync(); | |
| 206 | - //关闭事务 | |
| 207 | - _db.CommitTran(); | |
| 208 | - } | |
| 209 | - catch (Exception) | |
| 210 | - { | |
| 211 | - //回滚事务 | |
| 212 | - _db.RollbackTran(); | |
| 213 | - throw NCCException.Oh(ErrorCode.COM1002); | |
| 214 | - } | |
| 215 | - } | |
| 216 | - } | |
| 217 | - | |
| 218 | - /// <summary> | |
| 219 | - /// 更新门店目标设定 | |
| 220 | - /// </summary> | |
| 221 | - /// <param name="id">主键</param> | |
| 222 | - /// <param name="input">参数</param> | |
| 223 | - /// <returns></returns> | |
| 224 | - [HttpPut("{id}")] | |
| 225 | - public async Task Update(string id, [FromBody] LqYcsdMdmbsdUpInput input) | |
| 226 | - { | |
| 227 | - var entity = input.Adapt<LqYcsdMdmbsdEntity>(); | |
| 228 | - var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); | |
| 229 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); | |
| 230 | - } | |
| 231 | - | |
| 232 | - /// <summary> | |
| 233 | - /// 删除门店目标设定 | |
| 234 | - /// </summary> | |
| 235 | - /// <returns></returns> | |
| 236 | - [HttpDelete("{id}")] | |
| 237 | - public async Task Delete(string id) | |
| 238 | - { | |
| 239 | - var entity = await _db.Queryable<LqYcsdMdmbsdEntity>().FirstAsync(p => p.Id == id); | |
| 240 | - _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); | |
| 241 | - var isOk = await _db.Deleteable<LqYcsdMdmbsdEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); | |
| 242 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); | |
| 243 | - } | |
| 244 | - } | |
| 245 | -} |
netcore/src/Modularity/Extend/NCC.Extend/LqZjlMdsmxszService.cs
| ... | ... | @@ -14,6 +14,10 @@ using System; |
| 14 | 14 | using System.Collections.Generic; |
| 15 | 15 | using System.Linq; |
| 16 | 16 | using System.Threading.Tasks; |
| 17 | +using Yitter.IdGenerator; | |
| 18 | +using NCC.Common.Filter; | |
| 19 | +using NCC.Common.Enum; | |
| 20 | +using NCC.FriendlyException; | |
| 17 | 21 | |
| 18 | 22 | namespace NCC.Extend |
| 19 | 23 | { |
| ... | ... | @@ -43,6 +47,7 @@ namespace NCC.Extend |
| 43 | 47 | _userManager = userManager; |
| 44 | 48 | _httpContextAccessor = httpContextAccessor; |
| 45 | 49 | } |
| 50 | + | |
| 46 | 51 | #region 根据总经理用户ID查询相关设置信息 |
| 47 | 52 | /// <summary> |
| 48 | 53 | /// 根据总经理用户ID查询相关设置信息 |
| ... | ... | @@ -151,7 +156,7 @@ namespace NCC.Extend |
| 151 | 156 | var userExists = await _db.Queryable<UserEntity>() |
| 152 | 157 | .Where(x => x.Id == input.ZjlUserid && x.DeleteMark == null) |
| 153 | 158 | .AnyAsync(); |
| 154 | - | |
| 159 | + | |
| 155 | 160 | if (!userExists) |
| 156 | 161 | { |
| 157 | 162 | return new { success = false, message = "总经理用户不存在" }; |
| ... | ... | @@ -163,7 +168,7 @@ namespace NCC.Extend |
| 163 | 168 | .Where(x => mdIds.Contains(x.Id)) |
| 164 | 169 | .Select(x => x.Id) |
| 165 | 170 | .ToListAsync(); |
| 166 | - | |
| 171 | + | |
| 167 | 172 | var invalidMdIds = mdIds.Except(validMdIds).ToList(); |
| 168 | 173 | if (invalidMdIds.Any()) |
| 169 | 174 | { |
| ... | ... | @@ -204,7 +209,7 @@ namespace NCC.Extend |
| 204 | 209 | // 新增记录 |
| 205 | 210 | var entity = new LqZjlMdsmxszEntity |
| 206 | 211 | { |
| 207 | - Id = Guid.NewGuid().ToString(), | |
| 212 | + Id = YitIdHelper.NextId().ToString(), | |
| 208 | 213 | ZjlUserid = input.ZjlUserid, |
| 209 | 214 | MdId = item.MdId, |
| 210 | 215 | Smx1 = item.Smx1, |
| ... | ... | @@ -223,10 +228,11 @@ namespace NCC.Extend |
| 223 | 228 | addCount++; |
| 224 | 229 | } |
| 225 | 230 | } |
| 226 | - | |
| 227 | - return new { | |
| 228 | - success = true, | |
| 229 | - message = "设置成功", | |
| 231 | + | |
| 232 | + return new | |
| 233 | + { | |
| 234 | + success = true, | |
| 235 | + message = "设置成功", | |
| 230 | 236 | addCount = addCount, |
| 231 | 237 | updateCount = updateCount, |
| 232 | 238 | totalCount = addCount + updateCount |
| ... | ... | @@ -235,7 +241,7 @@ namespace NCC.Extend |
| 235 | 241 | #endregion |
| 236 | 242 | |
| 237 | 243 | #region 获取总经理所在组织能管理的门店 |
| 238 | - /// <summary> | |
| 244 | + /// <summary> | |
| 239 | 245 | /// 获取总经理所在组织能管理的门店 |
| 240 | 246 | /// </summary> |
| 241 | 247 | /// <remarks> |
| ... | ... | @@ -259,10 +265,80 @@ namespace NCC.Extend |
| 259 | 265 | var userOrganizeId = await _db.Queryable<UserEntity>().Where(x => x.Id == userid && x.DeleteMark == null).Select(x => x.OrganizeId).FirstAsync(); |
| 260 | 266 | // 根据组织权限获取门店 |
| 261 | 267 | var stores = await _db.Queryable<LqMdxxEntity>() |
| 262 | - .Where(s =>s.Syb == userOrganizeId || s.Jyb == userOrganizeId || s.Kjb == userOrganizeId || s.Dxmb == userOrganizeId) | |
| 268 | + .Where(s => s.Syb == userOrganizeId || s.Jyb == userOrganizeId || s.Kjb == userOrganizeId || s.Dxmb == userOrganizeId) | |
| 263 | 269 | .ToListAsync(); |
| 264 | 270 | return new { list = stores }; |
| 265 | 271 | } |
| 266 | 272 | #endregion |
| 273 | + | |
| 274 | + #region 分页查询 | |
| 275 | + /// <summary> | |
| 276 | + /// 获取所有总经理门店生命线设置数据(分页查询) | |
| 277 | + /// </summary> | |
| 278 | + /// <param name="input">查询输入参数</param> | |
| 279 | + /// <returns>分页数据</returns> | |
| 280 | + [HttpGet("GetPageList")] | |
| 281 | + public async Task<dynamic> GetPageList([FromQuery] LqZjlMdsmxszListQueryInput input) | |
| 282 | + { | |
| 283 | + var sidx = input.sidx == null ? "id" : input.sidx; | |
| 284 | + var data = await _db.Queryable<LqZjlMdsmxszEntity>() | |
| 285 | + .WhereIF(!string.IsNullOrEmpty(input.ZjlUserid), p => p.ZjlUserid.Contains(input.ZjlUserid)) | |
| 286 | + .WhereIF(!string.IsNullOrEmpty(input.MdId), p => p.MdId.Contains(input.MdId)) | |
| 287 | + .Select(it => new LqZjlMdsmxszListOutput | |
| 288 | + { | |
| 289 | + Id = it.Id, | |
| 290 | + ZjlUserid = it.ZjlUserid, | |
| 291 | + ZjlName = SqlFunc.Subqueryable<UserEntity>().Where(x => x.Id == it.ZjlUserid).Select(x => x.RealName), | |
| 292 | + MdId = it.MdId, | |
| 293 | + Mdbm = SqlFunc.Subqueryable<LqMdxxEntity>().Where(x => x.Id == it.MdId).Select(x => x.Mdbm), | |
| 294 | + Dm = SqlFunc.Subqueryable<LqMdxxEntity>().Where(x => x.Id == it.MdId).Select(x => x.Dm), | |
| 295 | + Smx1 = it.Smx1, | |
| 296 | + Tcbl1 = it.Tcbl1, | |
| 297 | + Smx2 = it.Smx2, | |
| 298 | + Tcbl2 = it.Tcbl2, | |
| 299 | + Smx3 = it.Smx3, | |
| 300 | + Tcbl3 = it.Tcbl3, | |
| 301 | + Bz = it.Bz, | |
| 302 | + Cjsj = it.Cjsj, | |
| 303 | + Cjry = it.Cjry, | |
| 304 | + Xgsj = it.Xgsj, | |
| 305 | + Xgly = it.Xgly | |
| 306 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | |
| 307 | + return PageResult<LqZjlMdsmxszListOutput>.SqlSugarPageResult(data); | |
| 308 | + } | |
| 309 | + #endregion | |
| 310 | + | |
| 311 | + #region 更新总经理门店生命线设置 | |
| 312 | + /// <summary> | |
| 313 | + /// 更新总经理门店生命线设置 | |
| 314 | + /// </summary> | |
| 315 | + [HttpPut("{id}")] | |
| 316 | + public async Task Update(string id, [FromBody] LqZjlMdsmxszUpInput input) | |
| 317 | + { | |
| 318 | + var entity = await _db.Queryable<LqZjlMdsmxszEntity>() | |
| 319 | + .Where(x => x.Id == id && x.Deletemark == 0) | |
| 320 | + .FirstAsync(); | |
| 321 | + | |
| 322 | + if (entity == null) | |
| 323 | + { | |
| 324 | + throw NCCException.Oh(ErrorCode.COM1001); | |
| 325 | + } | |
| 326 | + | |
| 327 | + // 更新字段 | |
| 328 | + entity.Smx1 = input.Smx1; | |
| 329 | + entity.Tcbl1 = input.Tcbl1; | |
| 330 | + entity.Smx2 = input.Smx2; | |
| 331 | + entity.Tcbl2 = input.Tcbl2; | |
| 332 | + entity.Smx3 = input.Smx3; | |
| 333 | + entity.Tcbl3 = input.Tcbl3; | |
| 334 | + entity.Bz = input.Bz; | |
| 335 | + entity.Xgsj = DateTime.Now; | |
| 336 | + entity.Xgly = _userManager.User?.Id ?? "admin"; | |
| 337 | + | |
| 338 | + var isOk = await _db.Updateable(entity).ExecuteCommandAsync(); | |
| 339 | + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); | |
| 340 | + } | |
| 341 | + #endregion | |
| 342 | + | |
| 267 | 343 | } |
| 268 | 344 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/UserService.cs
| ... | ... | @@ -202,5 +202,34 @@ namespace NCC.Extend.User |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | #endregion |
| 205 | + | |
| 206 | + #region 获取总经理、经理下拉选择数据 | |
| 207 | + | |
| 208 | + /// <summary> | |
| 209 | + /// 获取用户下拉选择数据 | |
| 210 | + /// </summary> | |
| 211 | + [HttpGet("ManagerSelector")] | |
| 212 | + public async Task<dynamic> GetManagerSelector() | |
| 213 | + { | |
| 214 | + var data = await _db.Queryable<UserEntity>() | |
| 215 | + .Where(u => u.Gw == "总经理" || u.Gw == "经理") | |
| 216 | + .Where(u => u.EnabledMark == 1 && u.DeleteMark == null) | |
| 217 | + .Select(u => new | |
| 218 | + { | |
| 219 | + id = u.Id, | |
| 220 | + account = u.Account, | |
| 221 | + realName = u.RealName, | |
| 222 | + mobilePhone = u.MobilePhone, | |
| 223 | + mdid = u.Mdid, | |
| 224 | + zw = u.Zw, | |
| 225 | + gw = u.Gw | |
| 226 | + }) | |
| 227 | + .OrderBy(u => u.realName) | |
| 228 | + .ToListAsync(); | |
| 229 | + return data; | |
| 230 | + } | |
| 231 | + | |
| 232 | + #endregion | |
| 233 | + | |
| 205 | 234 | } |
| 206 | 235 | } | ... | ... |
数据库说明.md
| ... | ... | @@ -34,6 +34,7 @@ |
| 34 | 34 | ### 已弃用表 |
| 35 | 35 | - **lq_ryzl (人员资料表)** - 已弃用,人员信息现在使用系统用户表 `BASE_USER` 管理 |
| 36 | 36 | - **lq_mdxx_mdgs (门店归属表)** - 已弃用,门店归属信息已整合到 `lq_mdxx` 表中 |
| 37 | +- **lq_ycsd_mdmbsd (门店目标设定表)** - 已弃用,门店目标信息已整合到 `lq_mdxx` 表中 | |
| 37 | 38 | |
| 38 | 39 | ### 新增表 |
| 39 | 40 | |
| ... | ... | @@ -132,6 +133,12 @@ |
| 132 | 133 | | gsqssj | datetime | YES | 归属起始时间 | | |
| 133 | 134 | | gszzsj | datetime | YES | 归属终止时间 | | |
| 134 | 135 | | status | int(11) | YES | 状态 | | |
| 136 | +| xsyj | decimal(18,2) | YES | 目标-门店生命线 | | | |
| 137 | +| xhyj | decimal(18,2) | YES | 目标-消耗业绩 | | | |
| 138 | +| xms | int(11) | YES | 目标-项目数 | | | |
| 139 | +| rt1 | int(11) | YES | 目标-人头1 | | | |
| 140 | +| rt2 | int(11) | YES | 目标-人头2 | | | |
| 141 | +| rc | int(11) | YES | 目标-人次 | | | |
| 135 | 142 | |
| 136 | 143 | #### lq_md_mdlbjhsxx (门店类别及核算信息) |
| 137 | 144 | - 用于存储门店的分类信息和核算相关配置 |
| ... | ... | @@ -204,6 +211,7 @@ |
| 204 | 211 | | qt2 | varchar | YES | 其它2 | | |
| 205 | 212 | | syje | decimal | YES | 溯源金额 | | |
| 206 | 213 | | cellje | decimal | YES | Cell金额 | | |
| 214 | +| sgf | decimal | YES | 手工费 | | | |
| 207 | 215 | |
| 208 | 216 | ### 4. 业绩相关表 |
| 209 | 217 | ... | ... |