Commit 5ca571fe768261f84aeaa0925cffe3201074b0bd
1 parent
05867ef8
更新LqYcsdJsj相关文件,移除不再使用的字段,添加金三角成员管理功能,优化查询和创建接口,同时更新前端表单以支持新功能,确保代码整洁和功能完整性。
Showing
20 changed files
with
1657 additions
and
1381 deletions
.DS_Store
No preview for this file type
antis-ncc-admin/.env.development
antis-ncc-admin/src/views/lqYcsdJsj/Form.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="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="12"> | |
| 12 | - <el-form-item label="月份" prop="yf"> | |
| 13 | - <el-input v-model="dataForm.yf" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | - </el-input> | |
| 15 | - </el-form-item> | |
| 16 | - </el-col> | |
| 17 | - <el-col :span="12"> | |
| 18 | - <el-form-item label="门店" prop="md"> | |
| 19 | - <el-input v-model="dataForm.md" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 20 | - </el-input> | |
| 21 | - </el-form-item> | |
| 22 | - </el-col> | |
| 23 | - <el-col :span="12"> | |
| 24 | - <el-form-item label="金三角" prop="jsj"> | |
| 25 | - <el-input v-model="dataForm.jsj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 26 | - </el-input> | |
| 27 | - </el-form-item> | |
| 28 | - </el-col> | |
| 29 | - <el-col :span="12"> | |
| 30 | - <el-form-item label="岗位" prop="gw"> | |
| 31 | - <el-input v-model="dataForm.gw" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 32 | - </el-input> | |
| 33 | - </el-form-item> | |
| 34 | - </el-col> | |
| 35 | - <el-col :span="12"> | |
| 36 | - <el-form-item label="健康师" prop="jks"> | |
| 37 | - <el-input v-model="dataForm.jks" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 38 | - </el-input> | |
| 39 | - </el-form-item> | |
| 40 | - </el-col> | |
| 41 | - <el-col :span="12"> | |
| 42 | - <el-form-item label="成交率" prop="cjl"> | |
| 43 | - <el-input v-model="dataForm.cjl" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 44 | - </el-input> | |
| 45 | - </el-form-item> | |
| 46 | - </el-col> | |
| 47 | - <el-col :span="12"> | |
| 48 | - <el-form-item label="成交业绩" prop="cjyj"> | |
| 49 | - <el-input v-model="dataForm.cjyj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 50 | - </el-input> | |
| 51 | - </el-form-item> | |
| 52 | - </el-col> | |
| 53 | - <el-col :span="12"> | |
| 54 | - <el-form-item label="成交提点" prop="cjtd"> | |
| 55 | - <el-input v-model="dataForm.cjtd" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 56 | - </el-input> | |
| 57 | - </el-form-item> | |
| 58 | - </el-col> | |
| 59 | - <el-col :span="12"> | |
| 60 | - <el-form-item label="剩余业绩" prop="syyj"> | |
| 61 | - <el-input v-model="dataForm.syyj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 62 | - </el-input> | |
| 63 | - </el-form-item> | |
| 64 | - </el-col> | |
| 65 | - <el-col :span="12"> | |
| 66 | - <el-form-item label="出勤天数" prop="cqts"> | |
| 67 | - <el-input v-model="dataForm.cqts" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 68 | - </el-input> | |
| 69 | - </el-form-item> | |
| 70 | - </el-col> | |
| 71 | - <el-col :span="12"> | |
| 72 | - <el-form-item label="系统业绩" prop="xtyj"> | |
| 73 | - <el-input v-model="dataForm.xtyj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 74 | - </el-input> | |
| 75 | - </el-form-item> | |
| 76 | - </el-col> | |
| 77 | - <el-col :span="12"> | |
| 78 | - <el-form-item label="总业绩" prop="zyj"> | |
| 79 | - <el-input v-model="dataForm.zyj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 80 | - </el-input> | |
| 81 | - </el-form-item> | |
| 82 | - </el-col> | |
| 83 | - <el-col :span="12"> | |
| 84 | - <el-form-item label="基础业绩" prop="jcyj"> | |
| 85 | - <el-input v-model="dataForm.jcyj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 86 | - </el-input> | |
| 87 | - </el-form-item> | |
| 88 | - </el-col> | |
| 89 | - <el-col :span="12"> | |
| 90 | - <el-form-item label="合作业绩" prop="hzyj"> | |
| 91 | - <el-input v-model="dataForm.hzyj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 92 | - </el-input> | |
| 93 | - </el-form-item> | |
| 94 | - </el-col> | |
| 95 | - <el-col :span="12"> | |
| 96 | - <el-form-item label="奖励业绩" prop="jlyj"> | |
| 97 | - <el-input v-model="dataForm.jlyj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 98 | - </el-input> | |
| 99 | - </el-form-item> | |
| 100 | - </el-col> | |
| 101 | - <el-col :span="12"> | |
| 102 | - <el-form-item label="项目数" prop="xms"> | |
| 103 | - <el-input v-model="dataForm.xms" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 104 | - </el-input> | |
| 105 | - </el-form-item> | |
| 106 | - </el-col> | |
| 107 | - <el-col :span="12"> | |
| 108 | - <el-form-item label="手工" prop="sg"> | |
| 109 | - <el-input v-model="dataForm.sg" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 110 | - </el-input> | |
| 111 | - </el-form-item> | |
| 112 | - </el-col> | |
| 113 | - <el-col :span="12"> | |
| 114 | - <el-form-item label="是否属于战队" prop="sfsyzd"> | |
| 115 | - <el-input v-model="dataForm.sfsyzd" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 116 | - </el-input> | |
| 117 | - </el-form-item> | |
| 118 | - </el-col> | |
| 119 | - <el-col :span="12"> | |
| 120 | - <el-form-item label="是否满足考勤" prop="fsmzkq"> | |
| 121 | - <el-input v-model="dataForm.fsmzkq" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 122 | - </el-input> | |
| 123 | - </el-form-item> | |
| 124 | - </el-col> | |
| 125 | - <el-col :span="12"> | |
| 126 | - <el-form-item label="战队最终人数" prop="zdzzrs"> | |
| 127 | - <el-input v-model="dataForm.zdzzrs" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 128 | - </el-input> | |
| 129 | - </el-form-item> | |
| 130 | - </el-col> | |
| 131 | - <el-col :span="12"> | |
| 132 | - <el-form-item label="视为单人" prop="kqhbsyzd"> | |
| 133 | - <el-input v-model="dataForm.kqhbsyzd" placeholder="考勤后不属于战队的" clearable :style='{"width":"100%"}' > | |
| 134 | - </el-input> | |
| 135 | - </el-form-item> | |
| 136 | - </el-col> | |
| 137 | - <el-col :span="12"> | |
| 138 | - <el-form-item label="战队提成" prop="zdtc"> | |
| 139 | - <el-input v-model="dataForm.zdtc" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 140 | - </el-input> | |
| 141 | - </el-form-item> | |
| 142 | - </el-col> | |
| 143 | - <el-col :span="12"> | |
| 144 | - <el-form-item label="按1人提成" prop="ayrtc"> | |
| 145 | - <el-input v-model="dataForm.ayrtc" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 146 | - </el-input> | |
| 147 | - </el-form-item> | |
| 148 | - </el-col> | |
| 149 | - <el-col :span="12"> | |
| 150 | - <el-form-item label="最终提成点" prop="zztcd"> | |
| 151 | - <el-input v-model="dataForm.zztcd" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 152 | - </el-input> | |
| 153 | - </el-form-item> | |
| 154 | - </el-col> | |
| 155 | - <el-col :span="12"> | |
| 156 | - <el-form-item label="基础业绩提成" prop="jcyjtc"> | |
| 157 | - <el-input v-model="dataForm.jcyjtc" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 158 | - </el-input> | |
| 159 | - </el-form-item> | |
| 160 | - </el-col> | |
| 161 | - <el-col :span="12"> | |
| 162 | - <el-form-item label="合作业绩提成" prop="hzyjtc"> | |
| 163 | - <el-input v-model="dataForm.hzyjtc" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 164 | - </el-input> | |
| 165 | - </el-form-item> | |
| 166 | - </el-col> | |
| 167 | - <el-col :span="12"> | |
| 168 | - <el-form-item label="提成合计" prop="tchj"> | |
| 169 | - <el-input v-model="dataForm.tchj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 170 | - </el-input> | |
| 171 | - </el-form-item> | |
| 172 | - </el-col> | |
| 173 | - <el-col :span="12"> | |
| 174 | - <el-form-item label="个人占比" prop="grzb"> | |
| 175 | - <el-input v-model="dataForm.grzb" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 176 | - </el-input> | |
| 177 | - </el-form-item> | |
| 178 | - </el-col> | |
| 179 | - <el-col :span="12"> | |
| 180 | - <el-form-item label="组员合计" prop="zyhj"> | |
| 181 | - <el-input v-model="dataForm.zyhj" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 182 | - </el-input> | |
| 183 | - </el-form-item> | |
| 184 | - </el-col> | |
| 185 | - <el-col :span="12"> | |
| 186 | - <el-form-item label="顾问提成" prop="gwtc"> | |
| 187 | - <el-input v-model="dataForm.gwtc" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 188 | - </el-input> | |
| 189 | - </el-form-item> | |
| 190 | - </el-col> | |
| 191 | - </el-form> | |
| 192 | - </el-row> | |
| 2 | + <el-dialog | |
| 3 | + :title="dialogTitle" | |
| 4 | + :close-on-click-modal="false" | |
| 5 | + :visible.sync="visible" | |
| 6 | + class="NCC-dialog NCC-dialog_center" | |
| 7 | + lock-scroll | |
| 8 | + width="900px" | |
| 9 | + :before-close="handleClose"> | |
| 10 | + | |
| 11 | + <!-- 基本信息 --> | |
| 12 | + <el-form ref="basicForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 13 | + <el-row :gutter="15"> | |
| 14 | + <el-col :span="12"> | |
| 15 | + <el-form-item label="月份" prop="yf"> | |
| 16 | + <el-date-picker | |
| 17 | + v-model="monthValue" | |
| 18 | + type="month" | |
| 19 | + placeholder="请选择月份" | |
| 20 | + format="yyyyMM" | |
| 21 | + value-format="yyyyMM" | |
| 22 | + :style='{"width":"100%"}' | |
| 23 | + @change="onMonthChange"> | |
| 24 | + </el-date-picker> | |
| 25 | + </el-form-item> | |
| 26 | + </el-col> | |
| 27 | + <el-col :span="12"> | |
| 28 | + <el-form-item label="门店" prop="md"> | |
| 29 | + <el-select | |
| 30 | + v-model="dataForm.md" | |
| 31 | + placeholder="请选择门店" | |
| 32 | + clearable | |
| 33 | + :style='{"width":"100%"}' | |
| 34 | + @change="onStoreChange" | |
| 35 | + filterable> | |
| 36 | + <el-option | |
| 37 | + v-for="store in storeList" | |
| 38 | + :key="store.id" | |
| 39 | + :label="store.name" | |
| 40 | + :value="store.id"> | |
| 41 | + </el-option> | |
| 42 | + </el-select> | |
| 43 | + </el-form-item> | |
| 44 | + </el-col> | |
| 45 | + <el-col :span="24"> | |
| 46 | + <el-form-item label="金三角" prop="jsj"> | |
| 47 | + <el-input | |
| 48 | + v-model="dataForm.jsj" | |
| 49 | + placeholder="请输入金三角名称" | |
| 50 | + clearable | |
| 51 | + :style='{"width":"100%"}' | |
| 52 | + maxlength="50"> | |
| 53 | + </el-input> | |
| 54 | + </el-form-item> | |
| 55 | + </el-col> | |
| 56 | + </el-row> | |
| 57 | + </el-form> | |
| 58 | + | |
| 59 | + <!-- 成员管理 --> | |
| 60 | + <div class="member-section"> | |
| 61 | + <div class="section-title"> | |
| 62 | + <span>{{ isDetail ? '成员信息' : '成员管理' }}</span> | |
| 63 | + <div class="member-actions" v-if="!isDetail"> | |
| 64 | + <el-button type="primary" icon="el-icon-plus" @click="addMember" size="small">添加成员</el-button> | |
| 65 | + <el-button type="warning" icon="el-icon-refresh" @click="refreshMembers" size="small">刷新</el-button> | |
| 66 | + <span class="member-count">共 {{ members.length }} 人</span> | |
| 67 | + </div> | |
| 68 | + <span class="member-count" v-if="isDetail">共 {{ members.length }} 人</span> | |
| 69 | + </div> | |
| 70 | + | |
| 71 | + <el-table :data="members" border style="width: 100%; margin-top: 10px;" :header-cell-style="{ background: '#f5f7fa', color: '#606266', fontWeight: 'bold' }"> | |
| 72 | + <el-table-column type="index" label="序号" min-width="80" align="center" /> | |
| 73 | + <el-table-column prop="userName" label="姓名" min-width="120"> | |
| 74 | + <template slot-scope="scope"> | |
| 75 | + <el-input v-if="!isDetail" v-model="scope.row.userName" size="small" placeholder="请输入姓名" /> | |
| 76 | + <div v-else class="member-name"> | |
| 77 | + <i class="el-icon-user"></i> | |
| 78 | + <span>{{ scope.row.userName }}</span> | |
| 79 | + </div> | |
| 80 | + </template> | |
| 81 | + </el-table-column> | |
| 82 | + <el-table-column prop="userId" label="用户" min-width="180"> | |
| 83 | + <template slot-scope="scope"> | |
| 84 | + <el-select | |
| 85 | + v-if="!isDetail" | |
| 86 | + v-model="scope.row.userId" | |
| 87 | + placeholder="选择用户" | |
| 88 | + size="small" | |
| 89 | + @change="onUserChange(scope.$index, $event)" | |
| 90 | + filterable | |
| 91 | + style="width: 100%;"> | |
| 92 | + <el-option | |
| 93 | + v-for="user in availableUsers" | |
| 94 | + :key="user.id" | |
| 95 | + :label="user.name" | |
| 96 | + :value="user.id"> | |
| 97 | + </el-option> | |
| 98 | + </el-select> | |
| 99 | + <div v-else class="user-info"> | |
| 100 | + <i class="el-icon-user-solid"></i> | |
| 101 | + <span>{{ scope.row.userId }}</span> | |
| 102 | + </div> | |
| 103 | + </template> | |
| 104 | + </el-table-column> | |
| 105 | + <el-table-column label="是否顾问" min-width="120" align="center"> | |
| 106 | + <template slot-scope="scope"> | |
| 107 | + <el-radio-group v-if="!isDetail" v-model="scope.row.isLeader" size="small"> | |
| 108 | + <el-radio :label="1">是</el-radio> | |
| 109 | + <el-radio :label="0">否</el-radio> | |
| 110 | + </el-radio-group> | |
| 111 | + <el-tag v-else :type="scope.row.isLeader === 1 ? 'success' : 'info'" size="small" effect="dark"> | |
| 112 | + <i class="el-icon-star-on" v-if="scope.row.isLeader === 1"></i> | |
| 113 | + <i class="el-icon-star-off" v-else></i> | |
| 114 | + {{ scope.row.isLeader === 1 ? '是' : '否' }} | |
| 115 | + </el-tag> | |
| 116 | + </template> | |
| 117 | + </el-table-column> | |
| 118 | + <el-table-column label="排序" min-width="100" align="center"> | |
| 119 | + <template slot-scope="scope"> | |
| 120 | + <el-input-number | |
| 121 | + v-if="!isDetail" | |
| 122 | + v-model="scope.row.sortOrder" | |
| 123 | + :min="1" | |
| 124 | + :max="999" | |
| 125 | + size="small" | |
| 126 | + style="width: 100%;" /> | |
| 127 | + <el-tag v-else type="info" size="small">{{ scope.row.sortOrder }}</el-tag> | |
| 128 | + </template> | |
| 129 | + </el-table-column> | |
| 130 | + <el-table-column prop="status" label="状态" min-width="100" align="center" v-if="isDetail"> | |
| 131 | + <template slot-scope="scope"> | |
| 132 | + <el-tag :type="scope.row.status === 'ACTIVE' ? 'success' : 'info'" size="small" effect="dark"> | |
| 133 | + <i class="el-icon-check" v-if="scope.row.status === 'ACTIVE'"></i> | |
| 134 | + <i class="el-icon-close" v-else></i> | |
| 135 | + {{ scope.row.status === 'ACTIVE' ? '活跃' : '非活跃' }} | |
| 136 | + </el-tag> | |
| 137 | + </template> | |
| 138 | + </el-table-column> | |
| 139 | + <el-table-column label="操作" min-width="120" align="center" v-if="!isDetail"> | |
| 140 | + <template slot-scope="scope"> | |
| 141 | + <el-button type="danger" icon="el-icon-delete" @click="removeMember(scope.$index)" size="small" plain>删除</el-button> | |
| 142 | + </template> | |
| 143 | + </el-table-column> | |
| 144 | + </el-table> | |
| 145 | + </div> | |
| 146 | + | |
| 193 | 147 | <span slot="footer" class="dialog-footer"> |
| 194 | - <el-button @click="visible = false">取 消</el-button> | |
| 148 | + <el-button @click="handleClose">取 消</el-button> | |
| 195 | 149 | <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> |
| 196 | 150 | </span> |
| 197 | 151 | </el-dialog> |
| 198 | 152 | </template> |
| 153 | + | |
| 199 | 154 | <script> |
| 200 | 155 | import request from '@/utils/request' |
| 201 | 156 | import { getDictionaryDataSelector } from '@/api/systemData/dictionary' |
| 202 | 157 | import { previewDataInterface } from '@/api/systemData/dataInterface' |
| 158 | + | |
| 203 | 159 | export default { |
| 204 | 160 | components: {}, |
| 205 | 161 | props: [], |
| ... | ... | @@ -208,109 +164,430 @@ |
| 208 | 164 | loading: false, |
| 209 | 165 | visible: false, |
| 210 | 166 | isDetail: false, |
| 167 | + isManageMembers: false, | |
| 211 | 168 | dataForm: { |
| 212 | - id:'', | |
| 213 | - id:undefined, | |
| 214 | - yf:undefined, | |
| 215 | - md:undefined, | |
| 216 | - jsj:undefined, | |
| 217 | - gw:undefined, | |
| 218 | - jks:undefined, | |
| 219 | - cjl:undefined, | |
| 220 | - cjyj:undefined, | |
| 221 | - cjtd:undefined, | |
| 222 | - syyj:undefined, | |
| 223 | - cqts:undefined, | |
| 224 | - xtyj:undefined, | |
| 225 | - zyj:undefined, | |
| 226 | - jcyj:undefined, | |
| 227 | - hzyj:undefined, | |
| 228 | - jlyj:undefined, | |
| 229 | - xms:undefined, | |
| 230 | - sg:undefined, | |
| 231 | - sfsyzd:undefined, | |
| 232 | - fsmzkq:undefined, | |
| 233 | - zdzzrs:undefined, | |
| 234 | - kqhbsyzd:undefined, | |
| 235 | - zdtc:undefined, | |
| 236 | - ayrtc:undefined, | |
| 237 | - zztcd:undefined, | |
| 238 | - jcyjtc:undefined, | |
| 239 | - hzyjtc:undefined, | |
| 240 | - tchj:undefined, | |
| 241 | - grzb:undefined, | |
| 242 | - zyhj:undefined, | |
| 243 | - gwtc:undefined, | |
| 169 | + id: '', | |
| 170 | + yf: '', | |
| 171 | + md: '', | |
| 172 | + jsj: '' | |
| 244 | 173 | }, |
| 174 | + members: [], | |
| 175 | + storeList: [], | |
| 176 | + availableUsers: [], | |
| 177 | + monthValue: null, // 月份选择器的值 | |
| 245 | 178 | rules: { |
| 246 | - }, | |
| 179 | + yf: [ | |
| 180 | + { required: true, message: '月份不能为空', trigger: 'blur' }, | |
| 181 | + { pattern: /^\d{6}$/, message: '月份格式必须为yyyyMM', trigger: 'blur' } | |
| 182 | + ], | |
| 183 | + md: [ | |
| 184 | + { required: true, message: '门店不能为空', trigger: 'change' } | |
| 185 | + ], | |
| 186 | + jsj: [ | |
| 187 | + { required: true, message: '金三角名称不能为空', trigger: 'blur' } | |
| 188 | + ] | |
| 189 | + } | |
| 247 | 190 | } |
| 248 | 191 | }, |
| 249 | - computed: {}, | |
| 250 | - watch: {}, | |
| 251 | - created() { | |
| 192 | + computed: { | |
| 193 | + dialogTitle() { | |
| 194 | + if (this.isDetail) return '金三角详情' | |
| 195 | + if (this.isManageMembers) return '管理成员' | |
| 196 | + return this.dataForm.id ? '编辑金三角' : '新建金三角' | |
| 197 | + } | |
| 252 | 198 | }, |
| 253 | - mounted() { | |
| 254 | - }, | |
| 199 | + watch: {}, | |
| 200 | + created() {}, | |
| 201 | + mounted() {}, | |
| 255 | 202 | methods: { |
| 256 | 203 | goBack() { |
| 257 | - this.$emit('refresh') | |
| 258 | - }, | |
| 259 | - init(id, isDetail) { | |
| 260 | - this.dataForm.id = id || 0; | |
| 261 | - this.visible = true; | |
| 262 | - this.isDetail = isDetail || false; | |
| 204 | + this.$emit('refresh') | |
| 205 | + }, | |
| 206 | + init(id, isDetail, isManageMembers) { | |
| 207 | + this.dataForm.id = id || 0 | |
| 208 | + this.visible = true | |
| 209 | + this.isDetail = isDetail || false | |
| 210 | + this.isManageMembers = isManageMembers || false | |
| 211 | + this.members = [] | |
| 212 | + | |
| 263 | 213 | this.$nextTick(() => { |
| 264 | - this.$refs['elForm'].resetFields(); | |
| 214 | + this.$refs['basicForm'] && this.$refs['basicForm'].resetFields() | |
| 215 | + this.loadStoreList() | |
| 265 | 216 | if (this.dataForm.id) { |
| 266 | - request({ | |
| 267 | - url: '/api/Extend/LqYcsdJsj/' + this.dataForm.id, | |
| 268 | - method: 'get' | |
| 269 | - }).then(res =>{ | |
| 270 | - this.dataForm = res.data; | |
| 271 | - }) | |
| 217 | + this.loadData() | |
| 218 | + } | |
| 219 | + }) | |
| 220 | + }, | |
| 221 | + loadData() { | |
| 222 | + // 加载基本信息 | |
| 223 | + request({ | |
| 224 | + url: '/api/Extend/LqYcsdJsj/' + this.dataForm.id, | |
| 225 | + method: 'get' | |
| 226 | + }).then(res => { | |
| 227 | + this.dataForm = res.data | |
| 228 | + // 同步月份选择器的值 | |
| 229 | + this.monthValue = this.dataForm.yf | |
| 230 | + // 门店变化后更新可用用户(不清空成员) | |
| 231 | + if (this.dataForm.md) { | |
| 232 | + this.loadUsersByStore(this.dataForm.md) | |
| 233 | + } | |
| 234 | + }) | |
| 235 | + | |
| 236 | + // 加载成员信息 | |
| 237 | + request({ | |
| 238 | + url: '/api/Extend/LqYcsdJsj/' + this.dataForm.id + '/detail', | |
| 239 | + method: 'get' | |
| 240 | + }).then(res => { | |
| 241 | + this.members = res.data.members || [] | |
| 242 | + }) | |
| 243 | + }, | |
| 244 | + loadStoreList() { | |
| 245 | + // 加载门店列表 | |
| 246 | + request({ | |
| 247 | + url: '/api/Extend/LqMdxx/Selector', | |
| 248 | + method: 'GET' | |
| 249 | + }).then(res => { | |
| 250 | + this.storeList = res.data.list.map(item => ({ | |
| 251 | + id: item.id, | |
| 252 | + name: item.fullName | |
| 253 | + })) | |
| 254 | + }).catch(() => { | |
| 255 | + this.storeList = [] | |
| 256 | + }) | |
| 257 | + }, | |
| 258 | + onStoreChange() { | |
| 259 | + // 门店变化时更新可用用户 | |
| 260 | + if (this.dataForm.md) { | |
| 261 | + this.loadUsersByStore(this.dataForm.md) | |
| 262 | + } else { | |
| 263 | + this.availableUsers = [] | |
| 264 | + } | |
| 265 | + // 清空已选择的成员 | |
| 266 | + this.members = [] | |
| 267 | + }, | |
| 268 | + loadUsersByStore(storeId) { | |
| 269 | + // 根据门店ID加载用户 | |
| 270 | + request({ | |
| 271 | + url: '/api/Extend/User/Selector', | |
| 272 | + method: 'GET', | |
| 273 | + params: { | |
| 274 | + mdid: storeId | |
| 272 | 275 | } |
| 276 | + }).then(res => { | |
| 277 | + this.availableUsers = res.data.map(item => ({ | |
| 278 | + id: item.id, | |
| 279 | + name: item.realName, | |
| 280 | + storeId: item.mdid | |
| 281 | + })) | |
| 282 | + }).catch(() => { | |
| 283 | + this.availableUsers = [] | |
| 273 | 284 | }) |
| 274 | 285 | }, |
| 286 | + onUserChange(index, userId) { | |
| 287 | + // 用户选择变化时自动填充姓名 | |
| 288 | + const selectedUser = this.availableUsers.find(user => user.id === userId) | |
| 289 | + if (selectedUser) { | |
| 290 | + this.$set(this.members[index], 'userName', selectedUser.name) | |
| 291 | + } | |
| 292 | + }, | |
| 293 | + onMonthChange(value) { | |
| 294 | + // 月份选择器变化时更新dataForm.yf | |
| 295 | + this.dataForm.yf = value | |
| 296 | + }, | |
| 275 | 297 | dataFormSubmit() { |
| 276 | - this.$refs['elForm'].validate((valid) => { | |
| 277 | - if (valid) { | |
| 278 | - if (!this.dataForm.id) { | |
| 279 | - request({ | |
| 280 | - url: `/api/Extend/LqYcsdJsj`, | |
| 281 | - method: 'post', | |
| 282 | - data: this.dataForm, | |
| 283 | - }).then((res) => { | |
| 284 | - this.$message({ | |
| 285 | - message: res.msg, | |
| 286 | - type: 'success', | |
| 287 | - duration: 1000, | |
| 288 | - onClose: () => { | |
| 289 | - this.visible = false, | |
| 290 | - this.$emit('refresh', true) | |
| 291 | - } | |
| 292 | - }) | |
| 293 | - }) | |
| 294 | - } else { | |
| 295 | - request({ | |
| 296 | - url: '/api/Extend/LqYcsdJsj/' + this.dataForm.id, | |
| 297 | - method: 'PUT', | |
| 298 | - data: this.dataForm | |
| 299 | - }).then((res) => { | |
| 300 | - this.$message({ | |
| 301 | - message: res.msg, | |
| 302 | - type: 'success', | |
| 303 | - duration: 1000, | |
| 304 | - onClose: () => { | |
| 305 | - this.visible = false | |
| 306 | - this.$emit('refresh', true) | |
| 307 | - } | |
| 308 | - }) | |
| 309 | - }) | |
| 310 | - } | |
| 311 | - } | |
| 312 | - }) | |
| 298 | + this.$refs['basicForm'].validate((valid) => { | |
| 299 | + if (valid) { | |
| 300 | + // 验证多人战队必须有顾问 | |
| 301 | + if (this.members.length >= 2) { | |
| 302 | + const hasLeader = this.members.some(m => m.isLeader === 1) | |
| 303 | + if (!hasLeader) { | |
| 304 | + this.$message.error('两人或两人以上的战队必须有一个顾问') | |
| 305 | + this.activeTab = 'members' | |
| 306 | + return | |
| 307 | + } | |
| 308 | + } | |
| 309 | + | |
| 310 | + const submitData = { | |
| 311 | + ...this.dataForm, | |
| 312 | + members: this.members | |
| 313 | + } | |
| 314 | + | |
| 315 | + if (!this.dataForm.id) { | |
| 316 | + // 新建 | |
| 317 | + request({ | |
| 318 | + url: `/api/Extend/LqYcsdJsj`, | |
| 319 | + method: 'post', | |
| 320 | + data: submitData, | |
| 321 | + }).then((res) => { | |
| 322 | + this.$message({ | |
| 323 | + message: res.msg, | |
| 324 | + type: 'success', | |
| 325 | + duration: 1000, | |
| 326 | + onClose: () => { | |
| 327 | + this.visible = false | |
| 328 | + this.$emit('refresh', true) | |
| 329 | + } | |
| 330 | + }) | |
| 331 | + }) | |
| 332 | + } else { | |
| 333 | + // 编辑 | |
| 334 | + request({ | |
| 335 | + url: '/api/Extend/LqYcsdJsj/' + this.dataForm.id, | |
| 336 | + method: 'PUT', | |
| 337 | + data: submitData | |
| 338 | + }).then((res) => { | |
| 339 | + this.$message({ | |
| 340 | + message: res.msg, | |
| 341 | + type: 'success', | |
| 342 | + duration: 1000, | |
| 343 | + onClose: () => { | |
| 344 | + this.visible = false | |
| 345 | + this.$emit('refresh', true) | |
| 346 | + } | |
| 347 | + }) | |
| 348 | + }) | |
| 349 | + } | |
| 350 | + } | |
| 351 | + }) | |
| 352 | + }, | |
| 353 | + // 成员管理方法 | |
| 354 | + addMember() { | |
| 355 | + if (!this.dataForm.md) { | |
| 356 | + this.$message.warning('请先选择门店') | |
| 357 | + return | |
| 358 | + } | |
| 359 | + this.members.push({ | |
| 360 | + userId: '', | |
| 361 | + userName: '', | |
| 362 | + isLeader: 0, | |
| 363 | + sortOrder: this.members.length + 1 | |
| 364 | + }) | |
| 365 | + }, | |
| 366 | + removeMember(index) { | |
| 367 | + this.$confirm('确定要删除这个成员吗?', '提示', { | |
| 368 | + type: 'warning' | |
| 369 | + }).then(() => { | |
| 370 | + this.members.splice(index, 1) | |
| 371 | + // 重新排序 | |
| 372 | + this.members.forEach((member, index) => { | |
| 373 | + member.sortOrder = index + 1 | |
| 374 | + }) | |
| 375 | + }) | |
| 313 | 376 | }, |
| 377 | + refreshMembers() { | |
| 378 | + if (this.dataForm.id) { | |
| 379 | + this.loadData() | |
| 380 | + } | |
| 381 | + }, | |
| 382 | + handleClose() { | |
| 383 | + this.visible = false | |
| 384 | + } | |
| 314 | 385 | } |
| 315 | 386 | } |
| 316 | 387 | </script> |
| 388 | + | |
| 389 | +<style scoped> | |
| 390 | +/* 基本信息区域 */ | |
| 391 | +.el-form { | |
| 392 | + background: #f8f9fa; | |
| 393 | + padding: 20px; | |
| 394 | + border-radius: 8px; | |
| 395 | + margin-bottom: 20px; | |
| 396 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | |
| 397 | + border: 1px solid #e9ecef; | |
| 398 | +} | |
| 399 | + | |
| 400 | +.el-form-item__label { | |
| 401 | + font-weight: 600; | |
| 402 | + color: #2c3e50; | |
| 403 | +} | |
| 404 | + | |
| 405 | +/* 成员管理区域 */ | |
| 406 | +.member-section { | |
| 407 | + margin-top: 20px; | |
| 408 | + padding: 20px; | |
| 409 | + border: 1px solid #e1e8ed; | |
| 410 | + border-radius: 8px; | |
| 411 | + background: #fff; | |
| 412 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); | |
| 413 | +} | |
| 414 | + | |
| 415 | +.section-title { | |
| 416 | + display: flex; | |
| 417 | + align-items: center; | |
| 418 | + justify-content: space-between; | |
| 419 | + margin-bottom: 16px; | |
| 420 | + font-size: 18px; | |
| 421 | + font-weight: 700; | |
| 422 | + color: #2c3e50; | |
| 423 | + border-bottom: 2px solid #3498db; | |
| 424 | + padding-bottom: 8px; | |
| 425 | +} | |
| 426 | + | |
| 427 | +.member-actions { | |
| 428 | + display: flex; | |
| 429 | + align-items: center; | |
| 430 | + gap: 12px; | |
| 431 | +} | |
| 432 | + | |
| 433 | +.member-count { | |
| 434 | + color: #7f8c8d; | |
| 435 | + font-size: 14px; | |
| 436 | + font-weight: 500; | |
| 437 | + background: #ecf0f1; | |
| 438 | + padding: 4px 12px; | |
| 439 | + border-radius: 20px; | |
| 440 | +} | |
| 441 | + | |
| 442 | +/* 表格样式 */ | |
| 443 | +.el-table { | |
| 444 | + margin-top: 16px; | |
| 445 | + border-radius: 8px; | |
| 446 | + overflow: hidden; | |
| 447 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | |
| 448 | +} | |
| 449 | + | |
| 450 | +.el-table th { | |
| 451 | + background: #409EFF !important; | |
| 452 | + color: #fff !important; | |
| 453 | + font-weight: 600; | |
| 454 | +} | |
| 455 | + | |
| 456 | +.el-table tbody tr:hover > td { | |
| 457 | + background-color: #f8f9fa !important; | |
| 458 | +} | |
| 459 | + | |
| 460 | +/* 成员信息显示 */ | |
| 461 | +.member-name, .user-info { | |
| 462 | + display: flex; | |
| 463 | + align-items: center; | |
| 464 | + gap: 8px; | |
| 465 | + color: #2c3e50; | |
| 466 | + font-weight: 500; | |
| 467 | +} | |
| 468 | + | |
| 469 | +.member-name i, .user-info i { | |
| 470 | + color: #3498db; | |
| 471 | + font-size: 16px; | |
| 472 | +} | |
| 473 | + | |
| 474 | +/* 标签样式 */ | |
| 475 | +.el-tag { | |
| 476 | + border-radius: 16px; | |
| 477 | + font-weight: 500; | |
| 478 | + padding: 4px 12px; | |
| 479 | +} | |
| 480 | + | |
| 481 | +.el-tag i { | |
| 482 | + margin-right: 4px; | |
| 483 | +} | |
| 484 | + | |
| 485 | +/* 按钮样式 */ | |
| 486 | +.el-button { | |
| 487 | + border-radius: 6px; | |
| 488 | + font-weight: 500; | |
| 489 | + transition: all 0.3s ease; | |
| 490 | +} | |
| 491 | + | |
| 492 | +.el-button:hover { | |
| 493 | + transform: translateY(-1px); | |
| 494 | + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); | |
| 495 | +} | |
| 496 | + | |
| 497 | +/* 输入框样式 */ | |
| 498 | +.el-input, .el-select, .el-input-number { | |
| 499 | + border-radius: 6px; | |
| 500 | +} | |
| 501 | + | |
| 502 | +.el-input__inner, .el-textarea__inner { | |
| 503 | + border-radius: 6px; | |
| 504 | + transition: all 0.3s ease; | |
| 505 | +} | |
| 506 | + | |
| 507 | +.el-input__inner:focus, .el-textarea__inner:focus { | |
| 508 | + border-color: #3498db; | |
| 509 | + box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2); | |
| 510 | +} | |
| 511 | + | |
| 512 | +/* 对话框样式 */ | |
| 513 | +.NCC-dialog { | |
| 514 | + border-radius: 8px; | |
| 515 | + overflow: hidden; | |
| 516 | +} | |
| 517 | + | |
| 518 | +.el-dialog__header { | |
| 519 | + background: #409EFF; | |
| 520 | + color: #fff; | |
| 521 | + padding: 20px; | |
| 522 | +} | |
| 523 | + | |
| 524 | +.el-dialog__title { | |
| 525 | + font-weight: 600; | |
| 526 | + font-size: 18px; | |
| 527 | +} | |
| 528 | + | |
| 529 | +.el-dialog__body { | |
| 530 | + padding: 30px; | |
| 531 | + background: #f8f9fa; | |
| 532 | +} | |
| 533 | + | |
| 534 | +.el-dialog__footer { | |
| 535 | + background: #fff; | |
| 536 | + padding: 20px 30px; | |
| 537 | + border-top: 1px solid #e9ecef; | |
| 538 | +} | |
| 539 | + | |
| 540 | +/* 响应式设计 */ | |
| 541 | +@media (max-width: 768px) { | |
| 542 | + .member-actions { | |
| 543 | + flex-direction: column; | |
| 544 | + align-items: flex-start; | |
| 545 | + gap: 8px; | |
| 546 | + } | |
| 547 | + | |
| 548 | + .action-buttons { | |
| 549 | + flex-direction: column; | |
| 550 | + width: 100%; | |
| 551 | + } | |
| 552 | + | |
| 553 | + .action-buttons .el-button { | |
| 554 | + width: 100%; | |
| 555 | + } | |
| 556 | +} | |
| 557 | + | |
| 558 | +/* 动画效果 */ | |
| 559 | +.member-section { | |
| 560 | + animation: fadeInUp 0.5s ease-out; | |
| 561 | +} | |
| 562 | + | |
| 563 | +@keyframes fadeInUp { | |
| 564 | + from { | |
| 565 | + opacity: 0; | |
| 566 | + transform: translateY(20px); | |
| 567 | + } | |
| 568 | + to { | |
| 569 | + opacity: 1; | |
| 570 | + transform: translateY(0); | |
| 571 | + } | |
| 572 | +} | |
| 573 | + | |
| 574 | +/* 滚动条样式 */ | |
| 575 | +.el-table__body-wrapper::-webkit-scrollbar { | |
| 576 | + width: 6px; | |
| 577 | + height: 6px; | |
| 578 | +} | |
| 579 | + | |
| 580 | +.el-table__body-wrapper::-webkit-scrollbar-track { | |
| 581 | + background: #f1f1f1; | |
| 582 | + border-radius: 3px; | |
| 583 | +} | |
| 584 | + | |
| 585 | +.el-table__body-wrapper::-webkit-scrollbar-thumb { | |
| 586 | + background: #c1c1c1; | |
| 587 | + border-radius: 3px; | |
| 588 | +} | |
| 589 | + | |
| 590 | +.el-table__body-wrapper::-webkit-scrollbar-thumb:hover { | |
| 591 | + background: #a8a8a8; | |
| 592 | +} | |
| 593 | +</style> | |
| 317 | 594 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/lqYcsdJsj/MemberDialog.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog | |
| 3 | + title="成员管理" | |
| 4 | + :visible.sync="visible" | |
| 5 | + width="900px" | |
| 6 | + :close-on-click-modal="false" | |
| 7 | + @close="handleClose"> | |
| 8 | + | |
| 9 | + <div class="member-dialog"> | |
| 10 | + <!-- 操作栏 --> | |
| 11 | + <div class="member-toolbar"> | |
| 12 | + <el-button type="primary" icon="el-icon-plus" @click="addMember" size="small">添加成员</el-button> | |
| 13 | + <el-button type="warning" icon="el-icon-refresh" @click="refreshMembers" size="small">刷新</el-button> | |
| 14 | + <el-button type="success" icon="el-icon-check" @click="saveAll" size="small">保存全部</el-button> | |
| 15 | + <span class="member-count">共 {{ members.length }} 人</span> | |
| 16 | + </div> | |
| 17 | + | |
| 18 | + <!-- 成员列表 --> | |
| 19 | + <el-table :data="members" border style="width: 100%; margin-top: 10px;" v-loading="loading"> | |
| 20 | + <el-table-column type="index" label="序号" width="60" align="center" /> | |
| 21 | + <el-table-column prop="userName" label="姓名" width="120"> | |
| 22 | + <template slot-scope="scope"> | |
| 23 | + <el-input v-model="scope.row.userName" size="mini" /> | |
| 24 | + </template> | |
| 25 | + </el-table-column> | |
| 26 | + <el-table-column prop="userId" label="用户ID" width="150"> | |
| 27 | + <template slot-scope="scope"> | |
| 28 | + <el-input v-model="scope.row.userId" size="mini" /> | |
| 29 | + </template> | |
| 30 | + </el-table-column> | |
| 31 | + <el-table-column label="是否顾问" width="120" align="center"> | |
| 32 | + <template slot-scope="scope"> | |
| 33 | + <el-radio-group v-model="scope.row.isLeader" size="mini"> | |
| 34 | + <el-radio :label="1">是</el-radio> | |
| 35 | + <el-radio :label="0">否</el-radio> | |
| 36 | + </el-radio-group> | |
| 37 | + </template> | |
| 38 | + </el-table-column> | |
| 39 | + <el-table-column label="排序" width="100" align="center"> | |
| 40 | + <template slot-scope="scope"> | |
| 41 | + <el-input-number | |
| 42 | + v-model="scope.row.sortOrder" | |
| 43 | + :min="1" | |
| 44 | + :max="999" | |
| 45 | + size="mini" | |
| 46 | + style="width: 80px;" /> | |
| 47 | + </template> | |
| 48 | + </el-table-column> | |
| 49 | + <el-table-column label="操作" width="100" align="center"> | |
| 50 | + <template slot-scope="scope"> | |
| 51 | + <el-button type="text" @click="removeMember(scope.$index)" class="NCC-table-delBtn" size="mini">删除</el-button> | |
| 52 | + </template> | |
| 53 | + </el-table-column> | |
| 54 | + </el-table> | |
| 55 | + | |
| 56 | + <!-- 批量操作 --> | |
| 57 | + <div class="batch-operations" v-if="members.length > 0"> | |
| 58 | + <el-button type="info" @click="sortMembers" size="small">重新排序</el-button> | |
| 59 | + <el-button type="warning" @click="clearAll" size="small">清空全部</el-button> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + | |
| 63 | + <span slot="footer" class="dialog-footer"> | |
| 64 | + <el-button @click="handleClose">取 消</el-button> | |
| 65 | + <el-button type="primary" @click="saveAll">确 定</el-button> | |
| 66 | + </span> | |
| 67 | + </el-dialog> | |
| 68 | +</template> | |
| 69 | + | |
| 70 | +<script> | |
| 71 | + import request from '@/utils/request' | |
| 72 | + | |
| 73 | + export default { | |
| 74 | + name: 'MemberDialog', | |
| 75 | + props: { | |
| 76 | + jsjId: { | |
| 77 | + type: String, | |
| 78 | + default: '' | |
| 79 | + } | |
| 80 | + }, | |
| 81 | + data() { | |
| 82 | + return { | |
| 83 | + visible: false, | |
| 84 | + loading: false, | |
| 85 | + members: [] | |
| 86 | + } | |
| 87 | + }, | |
| 88 | + methods: { | |
| 89 | + init(jsjId) { | |
| 90 | + this.jsjId = jsjId | |
| 91 | + this.visible = true | |
| 92 | + this.loadMembers() | |
| 93 | + }, | |
| 94 | + loadMembers() { | |
| 95 | + if (!this.jsjId) return | |
| 96 | + | |
| 97 | + this.loading = true | |
| 98 | + request({ | |
| 99 | + url: `/api/Extend/LqYcsdJsj/${this.jsjId}/detail`, | |
| 100 | + method: 'GET' | |
| 101 | + }).then(res => { | |
| 102 | + this.members = res.data.members || [] | |
| 103 | + this.loading = false | |
| 104 | + }).catch(() => { | |
| 105 | + this.members = [] | |
| 106 | + this.loading = false | |
| 107 | + }) | |
| 108 | + }, | |
| 109 | + addMember() { | |
| 110 | + this.members.push({ | |
| 111 | + userId: '', | |
| 112 | + userName: '', | |
| 113 | + isLeader: 0, | |
| 114 | + sortOrder: this.members.length + 1 | |
| 115 | + }) | |
| 116 | + }, | |
| 117 | + removeMember(index) { | |
| 118 | + this.$confirm('确定要删除这个成员吗?', '提示', { | |
| 119 | + type: 'warning' | |
| 120 | + }).then(() => { | |
| 121 | + this.members.splice(index, 1) | |
| 122 | + this.sortMembers() | |
| 123 | + }) | |
| 124 | + }, | |
| 125 | + sortMembers() { | |
| 126 | + this.members.forEach((member, index) => { | |
| 127 | + member.sortOrder = index + 1 | |
| 128 | + }) | |
| 129 | + }, | |
| 130 | + clearAll() { | |
| 131 | + this.$confirm('确定要清空所有成员吗?', '提示', { | |
| 132 | + type: 'warning' | |
| 133 | + }).then(() => { | |
| 134 | + this.members = [] | |
| 135 | + }) | |
| 136 | + }, | |
| 137 | + refreshMembers() { | |
| 138 | + this.loadMembers() | |
| 139 | + }, | |
| 140 | + saveAll() { | |
| 141 | + // 验证数据 | |
| 142 | + for (let i = 0; i < this.members.length; i++) { | |
| 143 | + const member = this.members[i] | |
| 144 | + if (!member.userId || !member.userName) { | |
| 145 | + this.$message.error(`第${i + 1}行成员信息不完整`) | |
| 146 | + return | |
| 147 | + } | |
| 148 | + } | |
| 149 | + | |
| 150 | + // 验证多人战队必须有顾问 | |
| 151 | + if (this.members.length >= 2) { | |
| 152 | + const hasLeader = this.members.some(m => m.isLeader === 1) | |
| 153 | + if (!hasLeader) { | |
| 154 | + this.$message.error('两人或两人以上的战队必须有一个顾问') | |
| 155 | + return | |
| 156 | + } | |
| 157 | + } | |
| 158 | + | |
| 159 | + // 发送保存请求 | |
| 160 | + this.$emit('save', this.members) | |
| 161 | + this.handleClose() | |
| 162 | + }, | |
| 163 | + handleClose() { | |
| 164 | + this.visible = false | |
| 165 | + this.$emit('close') | |
| 166 | + } | |
| 167 | + } | |
| 168 | + } | |
| 169 | +</script> | |
| 170 | + | |
| 171 | +<style scoped> | |
| 172 | +.member-dialog { | |
| 173 | + padding: 10px 0; | |
| 174 | +} | |
| 175 | + | |
| 176 | +.member-toolbar { | |
| 177 | + display: flex; | |
| 178 | + align-items: center; | |
| 179 | + gap: 10px; | |
| 180 | +} | |
| 181 | + | |
| 182 | +.member-count { | |
| 183 | + color: #606266; | |
| 184 | + font-size: 14px; | |
| 185 | + margin-left: auto; | |
| 186 | +} | |
| 187 | + | |
| 188 | +.batch-operations { | |
| 189 | + margin-top: 15px; | |
| 190 | + padding-top: 15px; | |
| 191 | + border-top: 1px solid #ebeef5; | |
| 192 | +} | |
| 193 | + | |
| 194 | +.el-table { | |
| 195 | + margin-top: 10px; | |
| 196 | +} | |
| 197 | +</style> | ... | ... |
antis-ncc-admin/src/views/lqYcsdJsj/index.vue
| ... | ... | @@ -4,168 +4,45 @@ |
| 4 | 4 | <el-row class="NCC-common-search-box" :gutter="16"> |
| 5 | 5 | <el-form @submit.native.prevent> |
| 6 | 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 | 7 | <el-form-item label="月份"> |
| 13 | - <el-input v-model="query.yf" placeholder="月份" clearable /> | |
| 8 | + <el-date-picker | |
| 9 | + v-model="monthQuery" | |
| 10 | + type="month" | |
| 11 | + placeholder="请选择月份" | |
| 12 | + format="yyyyMM" | |
| 13 | + value-format="yyyyMM" | |
| 14 | + @change="onMonthQueryChange" | |
| 15 | + clearable> | |
| 16 | + </el-date-picker> | |
| 14 | 17 | </el-form-item> |
| 15 | 18 | </el-col> |
| 16 | 19 | <el-col :span="6"> |
| 17 | 20 | <el-form-item label="门店"> |
| 18 | - <el-input v-model="query.md" placeholder="门店" clearable /> | |
| 21 | + <el-select | |
| 22 | + v-model="query.md" | |
| 23 | + placeholder="请选择门店" | |
| 24 | + clearable | |
| 25 | + filterable> | |
| 26 | + <el-option | |
| 27 | + v-for="store in storeList" | |
| 28 | + :key="store.id" | |
| 29 | + :label="store.name" | |
| 30 | + :value="store.id"> | |
| 31 | + </el-option> | |
| 32 | + </el-select> | |
| 19 | 33 | </el-form-item> |
| 20 | 34 | </el-col> |
| 21 | - <template v-if="showAll"> | |
| 22 | 35 | <el-col :span="6"> |
| 23 | 36 | <el-form-item label="金三角"> |
| 24 | - <el-input v-model="query.jsj" placeholder="金三角" clearable /> | |
| 25 | - </el-form-item> | |
| 26 | - </el-col> | |
| 27 | - <el-col :span="6"> | |
| 28 | - <el-form-item label="岗位"> | |
| 29 | - <el-input v-model="query.gw" 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.jks" 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.cjl" 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.cjyj" placeholder="成交业绩" clearable /> | |
| 45 | - </el-form-item> | |
| 46 | - </el-col> | |
| 47 | - <el-col :span="6"> | |
| 48 | - <el-form-item label="成交提点"> | |
| 49 | - <el-input v-model="query.cjtd" placeholder="成交提点" clearable /> | |
| 50 | - </el-form-item> | |
| 51 | - </el-col> | |
| 52 | - <el-col :span="6"> | |
| 53 | - <el-form-item label="剩余业绩"> | |
| 54 | - <el-input v-model="query.syyj" placeholder="剩余业绩" clearable /> | |
| 55 | - </el-form-item> | |
| 56 | - </el-col> | |
| 57 | - <el-col :span="6"> | |
| 58 | - <el-form-item label="出勤天数"> | |
| 59 | - <el-input v-model="query.cqts" placeholder="出勤天数" clearable /> | |
| 60 | - </el-form-item> | |
| 61 | - </el-col> | |
| 62 | - <el-col :span="6"> | |
| 63 | - <el-form-item label="系统业绩"> | |
| 64 | - <el-input v-model="query.xtyj" placeholder="系统业绩" clearable /> | |
| 65 | - </el-form-item> | |
| 66 | - </el-col> | |
| 67 | - <el-col :span="6"> | |
| 68 | - <el-form-item label="总业绩"> | |
| 69 | - <el-input v-model="query.zyj" placeholder="总业绩" clearable /> | |
| 70 | - </el-form-item> | |
| 71 | - </el-col> | |
| 72 | - <el-col :span="6"> | |
| 73 | - <el-form-item label="基础业绩"> | |
| 74 | - <el-input v-model="query.jcyj" placeholder="基础业绩" clearable /> | |
| 37 | + <el-input v-model="query.jsj" placeholder="金三角名称" clearable /> | |
| 75 | 38 | </el-form-item> |
| 76 | 39 | </el-col> |
| 77 | 40 | <el-col :span="6"> |
| 78 | - <el-form-item label="合作业绩"> | |
| 79 | - <el-input v-model="query.hzyj" placeholder="合作业绩" clearable /> | |
| 80 | - </el-form-item> | |
| 81 | - </el-col> | |
| 82 | - <el-col :span="6"> | |
| 83 | - <el-form-item label="奖励业绩"> | |
| 84 | - <el-input v-model="query.jlyj" placeholder="奖励业绩" clearable /> | |
| 85 | - </el-form-item> | |
| 86 | - </el-col> | |
| 87 | - <el-col :span="6"> | |
| 88 | - <el-form-item label="项目数"> | |
| 89 | - <el-input v-model="query.xms" placeholder="项目数" clearable /> | |
| 90 | - </el-form-item> | |
| 91 | - </el-col> | |
| 92 | - <el-col :span="6"> | |
| 93 | - <el-form-item label="手工"> | |
| 94 | - <el-input v-model="query.sg" placeholder="手工" clearable /> | |
| 95 | - </el-form-item> | |
| 96 | - </el-col> | |
| 97 | - <el-col :span="6"> | |
| 98 | - <el-form-item label="是否属于战队"> | |
| 99 | - <el-input v-model="query.sfsyzd" placeholder="是否属于战队" clearable /> | |
| 100 | - </el-form-item> | |
| 101 | - </el-col> | |
| 102 | - <el-col :span="6"> | |
| 103 | - <el-form-item label="是否满足考勤"> | |
| 104 | - <el-input v-model="query.fsmzkq" placeholder="是否满足考勤" clearable /> | |
| 105 | - </el-form-item> | |
| 106 | - </el-col> | |
| 107 | - <el-col :span="6"> | |
| 108 | - <el-form-item label="战队最终人数"> | |
| 109 | - <el-input v-model="query.zdzzrs" placeholder="战队最终人数" clearable /> | |
| 110 | - </el-form-item> | |
| 111 | - </el-col> | |
| 112 | - <el-col :span="6"> | |
| 113 | - <el-form-item label="视为单人"> | |
| 114 | - <el-input v-model="query.kqhbsyzd" placeholder="视为单人" clearable /> | |
| 115 | - </el-form-item> | |
| 116 | - </el-col> | |
| 117 | - <el-col :span="6"> | |
| 118 | - <el-form-item label="战队提成"> | |
| 119 | - <el-input v-model="query.zdtc" placeholder="战队提成" clearable /> | |
| 120 | - </el-form-item> | |
| 121 | - </el-col> | |
| 122 | - <el-col :span="6"> | |
| 123 | - <el-form-item label="按1人提成"> | |
| 124 | - <el-input v-model="query.ayrtc" placeholder="按1人提成" clearable /> | |
| 125 | - </el-form-item> | |
| 126 | - </el-col> | |
| 127 | - <el-col :span="6"> | |
| 128 | - <el-form-item label="最终提成点"> | |
| 129 | - <el-input v-model="query.zztcd" placeholder="最终提成点" clearable /> | |
| 130 | - </el-form-item> | |
| 131 | - </el-col> | |
| 132 | - <el-col :span="6"> | |
| 133 | - <el-form-item label="基础业绩提成"> | |
| 134 | - <el-input v-model="query.jcyjtc" placeholder="基础业绩提成" clearable /> | |
| 135 | - </el-form-item> | |
| 136 | - </el-col> | |
| 137 | - <el-col :span="6"> | |
| 138 | - <el-form-item label="合作业绩提成"> | |
| 139 | - <el-input v-model="query.hzyjtc" placeholder="合作业绩提成" clearable /> | |
| 140 | - </el-form-item> | |
| 141 | - </el-col> | |
| 142 | - <el-col :span="6"> | |
| 143 | - <el-form-item label="提成合计"> | |
| 144 | - <el-input v-model="query.tchj" placeholder="提成合计" clearable /> | |
| 145 | - </el-form-item> | |
| 146 | - </el-col> | |
| 147 | - <el-col :span="6"> | |
| 148 | - <el-form-item label="个人占比"> | |
| 149 | - <el-input v-model="query.grzb" placeholder="个人占比" clearable /> | |
| 150 | - </el-form-item> | |
| 151 | - </el-col> | |
| 152 | - <el-col :span="6"> | |
| 153 | - <el-form-item label="组员合计"> | |
| 154 | - <el-input v-model="query.zyhj" placeholder="组员合计" clearable /> | |
| 155 | - </el-form-item> | |
| 156 | - </el-col> | |
| 157 | - <el-col :span="6"> | |
| 158 | - <el-form-item label="顾问提成"> | |
| 159 | - <el-input v-model="query.gwtc" placeholder="顾问提成" clearable /> | |
| 160 | - </el-form-item> | |
| 161 | - </el-col> | |
| 162 | - </template> | |
| 163 | - <el-col :span="6"> | |
| 164 | - <el-form-item> | |
| 165 | - <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 166 | - <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 167 | - <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 168 | - <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> | |
| 41 | + <el-form-item label=" "> | |
| 42 | + <div class="search-buttons"> | |
| 43 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 44 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 45 | + </div> | |
| 169 | 46 | </el-form-item> |
| 170 | 47 | </el-col> |
| 171 | 48 | </el-form> |
| ... | ... | @@ -185,41 +62,46 @@ |
| 185 | 62 | </div> |
| 186 | 63 | </div> |
| 187 | 64 | <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> |
| 188 | - <el-table-column prop="id" label="主键" align="left" /> | |
| 189 | - <el-table-column prop="yf" label="月份" align="left" /> | |
| 190 | - <el-table-column prop="md" label="门店" align="left" /> | |
| 191 | - <el-table-column prop="jsj" label="金三角" align="left" /> | |
| 192 | - <el-table-column prop="gw" label="岗位" align="left" /> | |
| 193 | - <el-table-column prop="jks" label="健康师" align="left" /> | |
| 194 | - <el-table-column prop="cjl" label="成交率" align="left" /> | |
| 195 | - <el-table-column prop="cjyj" label="成交业绩" align="left" /> | |
| 196 | - <el-table-column prop="cjtd" label="成交提点" align="left" /> | |
| 197 | - <el-table-column prop="syyj" label="剩余业绩" align="left" /> | |
| 198 | - <el-table-column prop="cqts" label="出勤天数" align="left" /> | |
| 199 | - <el-table-column prop="xtyj" label="系统业绩" align="left" /> | |
| 200 | - <el-table-column prop="zyj" label="总业绩" align="left" /> | |
| 201 | - <el-table-column prop="jcyj" label="基础业绩" align="left" /> | |
| 202 | - <el-table-column prop="hzyj" label="合作业绩" align="left" /> | |
| 203 | - <el-table-column prop="jlyj" label="奖励业绩" align="left" /> | |
| 204 | - <el-table-column prop="xms" label="项目数" align="left" /> | |
| 205 | - <el-table-column prop="sg" label="手工" align="left" /> | |
| 206 | - <el-table-column prop="sfsyzd" label="是否属于战队" align="left" /> | |
| 207 | - <el-table-column prop="fsmzkq" label="是否满足考勤" align="left" /> | |
| 208 | - <el-table-column prop="zdzzrs" label="战队最终人数" align="left" /> | |
| 209 | - <el-table-column prop="kqhbsyzd" label="视为单人" align="left" /> | |
| 210 | - <el-table-column prop="zdtc" label="战队提成" align="left" /> | |
| 211 | - <el-table-column prop="ayrtc" label="按1人提成" align="left" /> | |
| 212 | - <el-table-column prop="zztcd" label="最终提成点" align="left" /> | |
| 213 | - <el-table-column prop="jcyjtc" label="基础业绩提成" align="left" /> | |
| 214 | - <el-table-column prop="hzyjtc" label="合作业绩提成" align="left" /> | |
| 215 | - <el-table-column prop="tchj" label="提成合计" align="left" /> | |
| 216 | - <el-table-column prop="grzb" label="个人占比" align="left" /> | |
| 217 | - <el-table-column prop="zyhj" label="组员合计" align="left" /> | |
| 218 | - <el-table-column prop="gwtc" label="顾问提成" align="left" /> | |
| 219 | - <el-table-column label="操作" fixed="right" width="100"> | |
| 220 | - <template slot-scope="scope"> | |
| 221 | - <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 222 | - <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 65 | + <el-table-column prop="yf" label="月份" align="center" min-width="120"> | |
| 66 | + <template slot-scope="scope"> | |
| 67 | + <el-tag type="primary" size="small">{{ formatMonth(scope.row.yf) }}</el-tag> | |
| 68 | + </template> | |
| 69 | + </el-table-column> | |
| 70 | + <el-table-column prop="md" label="门店" align="left" min-width="150"> | |
| 71 | + <template slot-scope="scope"> | |
| 72 | + <div class="store-info"> | |
| 73 | + <i class="el-icon-shop"></i> | |
| 74 | + <span>{{ getStoreName(scope.row.md) }}</span> | |
| 75 | + </div> | |
| 76 | + </template> | |
| 77 | + </el-table-column> | |
| 78 | + <el-table-column prop="jsj" label="金三角" align="left" min-width="180"> | |
| 79 | + <template slot-scope="scope"> | |
| 80 | + <div class="team-info"> | |
| 81 | + <i class="el-icon-user-solid"></i> | |
| 82 | + <span>{{ scope.row.jsj }}</span> | |
| 83 | + </div> | |
| 84 | + </template> | |
| 85 | + </el-table-column> | |
| 86 | + <el-table-column label="成员数量" align="center" min-width="120"> | |
| 87 | + <template slot-scope="scope"> | |
| 88 | + <el-tag v-if="scope.row.memberCount > 0" type="success" size="small" effect="dark"> | |
| 89 | + <i class="el-icon-user"></i> | |
| 90 | + {{ scope.row.memberCount }}人 | |
| 91 | + </el-tag> | |
| 92 | + <el-tag v-else type="info" size="small"> | |
| 93 | + <i class="el-icon-user"></i> | |
| 94 | + 0人 | |
| 95 | + </el-tag> | |
| 96 | + </template> | |
| 97 | + </el-table-column> | |
| 98 | + <el-table-column label="操作" fixed="right" min-width="200"> | |
| 99 | + <template slot-scope="scope"> | |
| 100 | + <div class="action-buttons"> | |
| 101 | + <el-button type="primary" icon="el-icon-edit" @click="addOrUpdateHandle(scope.row.id)" size="mini" plain>编辑</el-button> | |
| 102 | + <el-button type="info" icon="el-icon-view" @click="viewDetail(scope.row.id)" size="mini" plain>详情</el-button> | |
| 103 | + <el-button type="danger" icon="el-icon-delete" @click="handleDel(scope.row.id)" size="mini" plain>删除</el-button> | |
| 104 | + </div> | |
| 223 | 105 | </template> |
| 224 | 106 | </el-table-column> |
| 225 | 107 | </NCC-table> |
| ... | ... | @@ -230,6 +112,107 @@ |
| 230 | 112 | <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> |
| 231 | 113 | </div> |
| 232 | 114 | </template> |
| 115 | + | |
| 116 | +<style scoped> | |
| 117 | +.store-info { | |
| 118 | + display: flex; | |
| 119 | + align-items: center; | |
| 120 | + gap: 8px; | |
| 121 | + color: #606266; | |
| 122 | +} | |
| 123 | + | |
| 124 | +.store-info i { | |
| 125 | + color: #409EFF; | |
| 126 | + font-size: 16px; | |
| 127 | +} | |
| 128 | + | |
| 129 | +.team-info { | |
| 130 | + display: flex; | |
| 131 | + align-items: center; | |
| 132 | + gap: 8px; | |
| 133 | + color: #303133; | |
| 134 | + font-weight: 500; | |
| 135 | +} | |
| 136 | + | |
| 137 | +.team-info i { | |
| 138 | + color: #67C23A; | |
| 139 | + font-size: 16px; | |
| 140 | +} | |
| 141 | + | |
| 142 | +.action-buttons { | |
| 143 | + display: flex; | |
| 144 | + gap: 8px; | |
| 145 | + flex-wrap: wrap; | |
| 146 | +} | |
| 147 | + | |
| 148 | +.action-buttons .el-button { | |
| 149 | + margin: 0; | |
| 150 | +} | |
| 151 | + | |
| 152 | +/* 表格行悬停效果 */ | |
| 153 | +.el-table tbody tr:hover > td { | |
| 154 | + background-color: #f5f7fa !important; | |
| 155 | +} | |
| 156 | + | |
| 157 | +/* 标签样式优化 */ | |
| 158 | +.el-tag { | |
| 159 | + border-radius: 12px; | |
| 160 | + font-weight: 500; | |
| 161 | +} | |
| 162 | + | |
| 163 | +.el-tag i { | |
| 164 | + margin-right: 4px; | |
| 165 | +} | |
| 166 | + | |
| 167 | +/* 搜索框样式优化 */ | |
| 168 | +.NCC-common-search-box .el-input__inner { | |
| 169 | + border-radius: 6px; | |
| 170 | +} | |
| 171 | + | |
| 172 | +.NCC-common-search-box .el-button { | |
| 173 | + border-radius: 6px; | |
| 174 | +} | |
| 175 | + | |
| 176 | +.search-buttons { | |
| 177 | + display: flex; | |
| 178 | + gap: 8px; | |
| 179 | + align-items: center; | |
| 180 | + height: 32px; | |
| 181 | +} | |
| 182 | + | |
| 183 | +/* 表格容器样式 */ | |
| 184 | +.NCC-common-layout-main { | |
| 185 | + background: #fff; | |
| 186 | + border-radius: 8px; | |
| 187 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | |
| 188 | + overflow: hidden; | |
| 189 | +} | |
| 190 | + | |
| 191 | +/* 头部操作区域 */ | |
| 192 | +.NCC-common-head { | |
| 193 | + background: #f8f9fa; | |
| 194 | + padding: 16px 20px; | |
| 195 | + border-bottom: 1px solid #dee2e6; | |
| 196 | +} | |
| 197 | + | |
| 198 | +/* 按钮组样式 */ | |
| 199 | +.NCC-common-head .el-button { | |
| 200 | + border-radius: 6px; | |
| 201 | + font-weight: 500; | |
| 202 | + transition: all 0.3s ease; | |
| 203 | +} | |
| 204 | + | |
| 205 | +.NCC-common-head .el-button:hover { | |
| 206 | + transform: translateY(-1px); | |
| 207 | + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); | |
| 208 | +} | |
| 209 | + | |
| 210 | +/* 分页样式 */ | |
| 211 | +.pagination { | |
| 212 | + margin-top: 20px; | |
| 213 | + text-align: center; | |
| 214 | +} | |
| 215 | +</style> | |
| 233 | 216 | <script> |
| 234 | 217 | import request from '@/utils/request' |
| 235 | 218 | import { getDictionaryDataSelector } from '@/api/systemData/dictionary' |
| ... | ... | @@ -242,41 +225,17 @@ |
| 242 | 225 | return { |
| 243 | 226 | showAll: false, |
| 244 | 227 | query: { |
| 245 | - id:undefined, | |
| 246 | 228 | yf:undefined, |
| 247 | 229 | md:undefined, |
| 248 | 230 | jsj:undefined, |
| 249 | - gw:undefined, | |
| 250 | - jks:undefined, | |
| 251 | - cjl:undefined, | |
| 252 | - cjyj:undefined, | |
| 253 | - cjtd:undefined, | |
| 254 | - syyj:undefined, | |
| 255 | - cqts:undefined, | |
| 256 | - xtyj:undefined, | |
| 257 | - zyj:undefined, | |
| 258 | - jcyj:undefined, | |
| 259 | - hzyj:undefined, | |
| 260 | - jlyj:undefined, | |
| 261 | - xms:undefined, | |
| 262 | - sg:undefined, | |
| 263 | - sfsyzd:undefined, | |
| 264 | - fsmzkq:undefined, | |
| 265 | - zdzzrs:undefined, | |
| 266 | - kqhbsyzd:undefined, | |
| 267 | - zdtc:undefined, | |
| 268 | - ayrtc:undefined, | |
| 269 | - zztcd:undefined, | |
| 270 | - jcyjtc:undefined, | |
| 271 | - hzyjtc:undefined, | |
| 272 | - tchj:undefined, | |
| 273 | - grzb:undefined, | |
| 274 | - zyhj:undefined, | |
| 275 | - gwtc:undefined, | |
| 276 | 231 | }, |
| 232 | + monthQuery: null, // 月份选择器的值 | |
| 233 | + storeList: [], // 门店列表 | |
| 277 | 234 | list: [], |
| 278 | 235 | listLoading: true, |
| 279 | - multipleSelection: [], total: 0, | |
| 236 | + multipleSelection: [], | |
| 237 | + total: 0, | |
| 238 | + storeMap: {}, // 门店ID到名称的映射 | |
| 280 | 239 | listQuery: { |
| 281 | 240 | currentPage: 1, |
| 282 | 241 | pageSize: 20, |
| ... | ... | @@ -290,38 +249,12 @@ |
| 290 | 249 | { prop: 'yf', label: '月份' }, |
| 291 | 250 | { prop: 'md', label: '门店' }, |
| 292 | 251 | { prop: 'jsj', label: '金三角' }, |
| 293 | - { prop: 'gw', label: '岗位' }, | |
| 294 | - { prop: 'jks', label: '健康师' }, | |
| 295 | - { prop: 'cjl', label: '成交率' }, | |
| 296 | - { prop: 'cjyj', label: '成交业绩' }, | |
| 297 | - { prop: 'cjtd', label: '成交提点' }, | |
| 298 | - { prop: 'syyj', label: '剩余业绩' }, | |
| 299 | - { prop: 'cqts', label: '出勤天数' }, | |
| 300 | - { prop: 'xtyj', label: '系统业绩' }, | |
| 301 | - { prop: 'zyj', label: '总业绩' }, | |
| 302 | - { prop: 'jcyj', label: '基础业绩' }, | |
| 303 | - { prop: 'hzyj', label: '合作业绩' }, | |
| 304 | - { prop: 'jlyj', label: '奖励业绩' }, | |
| 305 | - { prop: 'xms', label: '项目数' }, | |
| 306 | - { prop: 'sg', label: '手工' }, | |
| 307 | - { prop: 'sfsyzd', label: '是否属于战队' }, | |
| 308 | - { prop: 'fsmzkq', label: '是否满足考勤' }, | |
| 309 | - { prop: 'zdzzrs', label: '战队最终人数' }, | |
| 310 | - { prop: 'kqhbsyzd', label: '视为单人' }, | |
| 311 | - { prop: 'zdtc', label: '战队提成' }, | |
| 312 | - { prop: 'ayrtc', label: '按1人提成' }, | |
| 313 | - { prop: 'zztcd', label: '最终提成点' }, | |
| 314 | - { prop: 'jcyjtc', label: '基础业绩提成' }, | |
| 315 | - { prop: 'hzyjtc', label: '合作业绩提成' }, | |
| 316 | - { prop: 'tchj', label: '提成合计' }, | |
| 317 | - { prop: 'grzb', label: '个人占比' }, | |
| 318 | - { prop: 'zyhj', label: '组员合计' }, | |
| 319 | - { prop: 'gwtc', label: '顾问提成' }, | |
| 320 | 252 | ], |
| 321 | 253 | } |
| 322 | 254 | }, |
| 323 | 255 | computed: {}, |
| 324 | 256 | created() { |
| 257 | + this.loadStoreList() | |
| 325 | 258 | this.initData() |
| 326 | 259 | }, |
| 327 | 260 | methods: { |
| ... | ... | @@ -347,6 +280,11 @@ |
| 347 | 280 | this.list = res.data.list |
| 348 | 281 | this.total = res.data.pagination.total |
| 349 | 282 | this.listLoading = false |
| 283 | + | |
| 284 | + // 加载门店映射 | |
| 285 | + this.loadStoreMap() | |
| 286 | + // 为每个金三角加载成员数量 | |
| 287 | + this.loadMemberCounts() | |
| 350 | 288 | }) |
| 351 | 289 | }, |
| 352 | 290 | handleDel(id) { |
| ... | ... | @@ -368,6 +306,70 @@ |
| 368 | 306 | }).catch(() => { |
| 369 | 307 | }); |
| 370 | 308 | }, |
| 309 | + viewDetail(id) { | |
| 310 | + this.formVisible = true | |
| 311 | + this.$nextTick(() => { | |
| 312 | + this.$refs.NCCForm.init(id, true) | |
| 313 | + }) | |
| 314 | + }, | |
| 315 | + loadMemberCounts() { | |
| 316 | + // 批量加载成员数量 | |
| 317 | + const promises = this.list.map(item => { | |
| 318 | + return request({ | |
| 319 | + url: `/api/Extend/LqYcsdJsj/${item.id}/detail`, | |
| 320 | + method: 'GET' | |
| 321 | + }).then(res => { | |
| 322 | + this.$set(item, 'memberCount', res.data.members ? res.data.members.length : 0) | |
| 323 | + }).catch(() => { | |
| 324 | + this.$set(item, 'memberCount', 0) | |
| 325 | + }) | |
| 326 | + }) | |
| 327 | + | |
| 328 | + Promise.all(promises).then(() => { | |
| 329 | + // 所有成员数量加载完成 | |
| 330 | + }) | |
| 331 | + }, | |
| 332 | + loadStoreMap() { | |
| 333 | + // 加载门店映射 | |
| 334 | + request({ | |
| 335 | + url: '/api/Extend/LqMdxx/Selector', | |
| 336 | + method: 'GET' | |
| 337 | + }).then(res => { | |
| 338 | + this.storeMap = {} | |
| 339 | + res.data.list.forEach(store => { | |
| 340 | + this.storeMap[store.id] = store.fullName | |
| 341 | + }) | |
| 342 | + }).catch(() => { | |
| 343 | + this.storeMap = {} | |
| 344 | + }) | |
| 345 | + }, | |
| 346 | + getStoreName(storeId) { | |
| 347 | + return this.storeMap[storeId] || storeId || '未知门店' | |
| 348 | + }, | |
| 349 | + formatMonth(monthStr) { | |
| 350 | + if (!monthStr || monthStr.length !== 6) return monthStr | |
| 351 | + const year = monthStr.substring(0, 4) | |
| 352 | + const month = monthStr.substring(4, 6) | |
| 353 | + return `${year}年${month}月` | |
| 354 | + }, | |
| 355 | + onMonthQueryChange(value) { | |
| 356 | + // 月份选择器变化时更新query.yf | |
| 357 | + this.query.yf = value | |
| 358 | + }, | |
| 359 | + loadStoreList() { | |
| 360 | + // 加载门店列表 | |
| 361 | + request({ | |
| 362 | + url: '/api/Extend/LqMdxx/Selector', | |
| 363 | + method: 'GET' | |
| 364 | + }).then(res => { | |
| 365 | + this.storeList = res.data.list.map(item => ({ | |
| 366 | + id: item.id, | |
| 367 | + name: item.fullName | |
| 368 | + })) | |
| 369 | + }).catch(() => { | |
| 370 | + this.storeList = [] | |
| 371 | + }) | |
| 372 | + }, | |
| 371 | 373 | handleSelectionChange(val) { |
| 372 | 374 | const res = val.map(item => item.id) |
| 373 | 375 | this.multipleSelection = res |
| ... | ... | @@ -442,6 +444,7 @@ |
| 442 | 444 | for (let key in this.query) { |
| 443 | 445 | this.query[key] = undefined |
| 444 | 446 | } |
| 447 | + this.monthQuery = null | |
| 445 | 448 | this.listQuery = { |
| 446 | 449 | currentPage: 1, |
| 447 | 450 | pageSize: 20, | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqJinsanjiaoUser/LqJinsanjiaoUserCrInput.cs
0 → 100644
| 1 | +namespace NCC.Extend.Entitys.Dto.LqJinsanjiaoUser | |
| 2 | +{ | |
| 3 | + /// <summary> | |
| 4 | + /// 金三角用户绑定关系创建输入参数 | |
| 5 | + /// </summary> | |
| 6 | + public class LqJinsanjiaoUserCrInput | |
| 7 | + { | |
| 8 | + /// <summary> | |
| 9 | + /// 金三角ID | |
| 10 | + /// </summary> | |
| 11 | + public string jsjId { get; set; } | |
| 12 | + | |
| 13 | + /// <summary> | |
| 14 | + /// 用户ID | |
| 15 | + /// </summary> | |
| 16 | + public string userId { get; set; } | |
| 17 | + | |
| 18 | + /// <summary> | |
| 19 | + /// 用户姓名 | |
| 20 | + /// </summary> | |
| 21 | + public string userName { get; set; } | |
| 22 | + | |
| 23 | + /// <summary> | |
| 24 | + /// 是否顾问 | |
| 25 | + /// </summary> | |
| 26 | + public int isLeader { get; set; } | |
| 27 | + | |
| 28 | + /// <summary> | |
| 29 | + /// 状态 | |
| 30 | + /// </summary> | |
| 31 | + public string status { get; set; } | |
| 32 | + | |
| 33 | + /// <summary> | |
| 34 | + /// 排序 | |
| 35 | + /// </summary> | |
| 36 | + public int sortOrder { get; set; } | |
| 37 | + } | |
| 38 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqJinsanjiaoUser/LqJinsanjiaoUserInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqJinsanjiaoUser | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 金三角用户绑定关系详情输出参数 | |
| 7 | + /// </summary> | |
| 8 | + public class LqJinsanjiaoUserInfoOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 主键 | |
| 12 | + /// </summary> | |
| 13 | + public string id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 金三角ID | |
| 17 | + /// </summary> | |
| 18 | + public string jsjId { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 金三角名称 | |
| 22 | + /// </summary> | |
| 23 | + public string jsjName { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 用户ID | |
| 27 | + /// </summary> | |
| 28 | + public string userId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 用户姓名 | |
| 32 | + /// </summary> | |
| 33 | + public string userName { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 用户手机号 | |
| 37 | + /// </summary> | |
| 38 | + public string mobilePhone { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 用户职位 | |
| 42 | + /// </summary> | |
| 43 | + public string position { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 是否顾问 | |
| 47 | + /// </summary> | |
| 48 | + public int isLeader { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 状态 | |
| 52 | + /// </summary> | |
| 53 | + public string status { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 排序 | |
| 57 | + /// </summary> | |
| 58 | + public int sortOrder { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 创建时间 | |
| 62 | + /// </summary> | |
| 63 | + public DateTime? creatorTime { get; set; } | |
| 64 | + | |
| 65 | + /// <summary> | |
| 66 | + /// 创建人ID | |
| 67 | + /// </summary> | |
| 68 | + public string creatorUserId { get; set; } | |
| 69 | + | |
| 70 | + /// <summary> | |
| 71 | + /// 最后修改时间 | |
| 72 | + /// </summary> | |
| 73 | + public DateTime? lastModifyTime { get; set; } | |
| 74 | + | |
| 75 | + /// <summary> | |
| 76 | + /// 最后修改人ID | |
| 77 | + /// </summary> | |
| 78 | + public string lastModifyUserId { get; set; } | |
| 79 | + } | |
| 80 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqJinsanjiaoUser/LqJinsanjiaoUserListOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Extend.Entitys.Dto.LqJinsanjiaoUser | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 金三角用户绑定关系列表输出参数 | |
| 7 | + /// </summary> | |
| 8 | + public class LqJinsanjiaoUserListOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 主键 | |
| 12 | + /// </summary> | |
| 13 | + public string id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 金三角ID | |
| 17 | + /// </summary> | |
| 18 | + public string jsjId { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 金三角名称 | |
| 22 | + /// </summary> | |
| 23 | + public string jsjName { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 用户ID | |
| 27 | + /// </summary> | |
| 28 | + public string userId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 用户姓名 | |
| 32 | + /// </summary> | |
| 33 | + public string userName { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 用户手机号 | |
| 37 | + /// </summary> | |
| 38 | + public string mobilePhone { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 用户职位 | |
| 42 | + /// </summary> | |
| 43 | + public string position { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 是否顾问 | |
| 47 | + /// </summary> | |
| 48 | + public int isLeader { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 状态 | |
| 52 | + /// </summary> | |
| 53 | + public string status { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 排序 | |
| 57 | + /// </summary> | |
| 58 | + public int sortOrder { get; set; } | |
| 59 | + | |
| 60 | + /// <summary> | |
| 61 | + /// 创建时间 | |
| 62 | + /// </summary> | |
| 63 | + public DateTime? creatorTime { get; set; } | |
| 64 | + } | |
| 65 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqJinsanjiaoUser/LqJinsanjiaoUserListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Entity; | |
| 2 | +using NCC.Common.Filter; | |
| 3 | + | |
| 4 | +namespace NCC.Extend.Entitys.Dto.LqJinsanjiaoUser | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 金三角用户绑定关系列表查询输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class LqJinsanjiaoUserListQueryInput : PageInputBase | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// 金三角ID | |
| 18 | + /// </summary> | |
| 19 | + public string jsjId { get; set; } | |
| 20 | + | |
| 21 | + /// <summary> | |
| 22 | + /// 用户ID | |
| 23 | + /// </summary> | |
| 24 | + public string userId { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 用户姓名 | |
| 28 | + /// </summary> | |
| 29 | + public string userName { get; set; } | |
| 30 | + | |
| 31 | + /// <summary> | |
| 32 | + /// 是否顾问 | |
| 33 | + /// </summary> | |
| 34 | + public int? isLeader { get; set; } | |
| 35 | + | |
| 36 | + /// <summary> | |
| 37 | + /// 状态 | |
| 38 | + /// </summary> | |
| 39 | + public string status { get; set; } | |
| 40 | + } | |
| 41 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqJinsanjiaoUser/LqJinsanjiaoUserUpInput.cs
0 → 100644
| 1 | +namespace NCC.Extend.Entitys.Dto.LqJinsanjiaoUser | |
| 2 | +{ | |
| 3 | + /// <summary> | |
| 4 | + /// 金三角用户绑定关系更新输入参数 | |
| 5 | + /// </summary> | |
| 6 | + public class LqJinsanjiaoUserUpInput | |
| 7 | + { | |
| 8 | + /// <summary> | |
| 9 | + /// 金三角ID | |
| 10 | + /// </summary> | |
| 11 | + public string jsjId { get; set; } | |
| 12 | + | |
| 13 | + /// <summary> | |
| 14 | + /// 用户ID | |
| 15 | + /// </summary> | |
| 16 | + public string userId { get; set; } | |
| 17 | + | |
| 18 | + /// <summary> | |
| 19 | + /// 用户姓名 | |
| 20 | + /// </summary> | |
| 21 | + public string userName { get; set; } | |
| 22 | + | |
| 23 | + /// <summary> | |
| 24 | + /// 是否顾问 | |
| 25 | + /// </summary> | |
| 26 | + public int isLeader { get; set; } | |
| 27 | + | |
| 28 | + /// <summary> | |
| 29 | + /// 状态 | |
| 30 | + /// </summary> | |
| 31 | + public string status { get; set; } | |
| 32 | + | |
| 33 | + /// <summary> | |
| 34 | + /// 排序 | |
| 35 | + /// </summary> | |
| 36 | + public int sortOrder { get; set; } | |
| 37 | + } | |
| 38 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqYcsdJsj/LqYcsdJsjCrInput.cs
| ... | ... | @@ -4,7 +4,7 @@ using System.Collections.Generic; |
| 4 | 4 | namespace NCC.Extend.Entitys.Dto.LqYcsdJsj |
| 5 | 5 | { |
| 6 | 6 | /// <summary> |
| 7 | - /// 金三角设定修改输入参数 | |
| 7 | + /// 金三角设定创建输入参数 | |
| 8 | 8 | /// </summary> |
| 9 | 9 | public class LqYcsdJsjCrInput |
| 10 | 10 | { |
| ... | ... | @@ -14,154 +14,49 @@ namespace NCC.Extend.Entitys.Dto.LqYcsdJsj |
| 14 | 14 | public string id { get; set; } |
| 15 | 15 | |
| 16 | 16 | /// <summary> |
| 17 | - /// 月份 | |
| 17 | + /// 月份(yyyyMM格式) | |
| 18 | 18 | /// </summary> |
| 19 | 19 | public string yf { get; set; } |
| 20 | 20 | |
| 21 | 21 | /// <summary> |
| 22 | - /// 门店 | |
| 22 | + /// 门店ID | |
| 23 | 23 | /// </summary> |
| 24 | 24 | public string md { get; set; } |
| 25 | 25 | |
| 26 | 26 | /// <summary> |
| 27 | - /// 金三角 | |
| 27 | + /// 金三角名称 | |
| 28 | 28 | /// </summary> |
| 29 | 29 | public string jsj { get; set; } |
| 30 | 30 | |
| 31 | 31 | /// <summary> |
| 32 | - /// 岗位 | |
| 32 | + /// 金三角成员列表 | |
| 33 | 33 | /// </summary> |
| 34 | - public string gw { get; set; } | |
| 35 | - | |
| 36 | - /// <summary> | |
| 37 | - /// 健康师 | |
| 38 | - /// </summary> | |
| 39 | - public string jks { get; set; } | |
| 40 | - | |
| 41 | - /// <summary> | |
| 42 | - /// 成交率 | |
| 43 | - /// </summary> | |
| 44 | - public decimal cjl { get; set; } | |
| 45 | - | |
| 46 | - /// <summary> | |
| 47 | - /// 成交业绩 | |
| 48 | - /// </summary> | |
| 49 | - public decimal cjyj { get; set; } | |
| 50 | - | |
| 51 | - /// <summary> | |
| 52 | - /// 成交提点 | |
| 53 | - /// </summary> | |
| 54 | - public decimal cjtd { get; set; } | |
| 55 | - | |
| 56 | - /// <summary> | |
| 57 | - /// 剩余业绩 | |
| 58 | - /// </summary> | |
| 59 | - public decimal syyj { get; set; } | |
| 60 | - | |
| 61 | - /// <summary> | |
| 62 | - /// 出勤天数 | |
| 63 | - /// </summary> | |
| 64 | - public int? cqts { get; set; } | |
| 65 | - | |
| 66 | - /// <summary> | |
| 67 | - /// 系统业绩 | |
| 68 | - /// </summary> | |
| 69 | - public decimal xtyj { get; set; } | |
| 70 | - | |
| 71 | - /// <summary> | |
| 72 | - /// 总业绩 | |
| 73 | - /// </summary> | |
| 74 | - public decimal zyj { get; set; } | |
| 75 | - | |
| 76 | - /// <summary> | |
| 77 | - /// 基础业绩 | |
| 78 | - /// </summary> | |
| 79 | - public decimal jcyj { get; set; } | |
| 80 | - | |
| 81 | - /// <summary> | |
| 82 | - /// 合作业绩 | |
| 83 | - /// </summary> | |
| 84 | - public decimal hzyj { get; set; } | |
| 85 | - | |
| 86 | - /// <summary> | |
| 87 | - /// 奖励业绩 | |
| 88 | - /// </summary> | |
| 89 | - public decimal jlyj { get; set; } | |
| 90 | - | |
| 91 | - /// <summary> | |
| 92 | - /// 项目数 | |
| 93 | - /// </summary> | |
| 94 | - public int? xms { get; set; } | |
| 95 | - | |
| 96 | - /// <summary> | |
| 97 | - /// 手工 | |
| 98 | - /// </summary> | |
| 99 | - public int? sg { get; set; } | |
| 100 | - | |
| 101 | - /// <summary> | |
| 102 | - /// ①是否属于战队 | |
| 103 | - /// </summary> | |
| 104 | - public string sfsyzd { get; set; } | |
| 105 | - | |
| 106 | - /// <summary> | |
| 107 | - /// ②是否满足考勤 | |
| 108 | - /// </summary> | |
| 109 | - public string fsmzkq { get; set; } | |
| 110 | - | |
| 111 | - /// <summary> | |
| 112 | - /// ③战队最终人数 | |
| 113 | - /// </summary> | |
| 114 | - public int? zdzzrs { get; set; } | |
| 115 | - | |
| 116 | - /// <summary> | |
| 117 | - /// ④考勤后不属于战队视为单人 | |
| 118 | - /// </summary> | |
| 119 | - public int? kqhbsyzd { get; set; } | |
| 120 | - | |
| 121 | - /// <summary> | |
| 122 | - /// ⑤战队提成 | |
| 123 | - /// </summary> | |
| 124 | - public decimal zdtc { get; set; } | |
| 125 | - | |
| 126 | - /// <summary> | |
| 127 | - /// ⑥按1人提成 | |
| 128 | - /// </summary> | |
| 129 | - public decimal ayrtc { get; set; } | |
| 130 | - | |
| 131 | - /// <summary> | |
| 132 | - /// 最终提成点 | |
| 133 | - /// </summary> | |
| 134 | - public decimal zztcd { get; set; } | |
| 135 | - | |
| 136 | - /// <summary> | |
| 137 | - /// 基础业绩提成 | |
| 138 | - /// </summary> | |
| 139 | - public decimal jcyjtc { get; set; } | |
| 140 | - | |
| 141 | - /// <summary> | |
| 142 | - /// 合作业绩提成 | |
| 143 | - /// </summary> | |
| 144 | - public decimal hzyjtc { get; set; } | |
| 145 | - | |
| 34 | + public List<JsjMemberInput> members { get; set; } | |
| 35 | + } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 金三角成员输入参数 | |
| 39 | + /// </summary> | |
| 40 | + public class JsjMemberInput | |
| 41 | + { | |
| 146 | 42 | /// <summary> |
| 147 | - /// 提成合计 | |
| 43 | + /// 用户ID | |
| 148 | 44 | /// </summary> |
| 149 | - public decimal tchj { get; set; } | |
| 45 | + public string userId { get; set; } | |
| 150 | 46 | |
| 151 | 47 | /// <summary> |
| 152 | - /// 个人占比 | |
| 48 | + /// 用户姓名 | |
| 153 | 49 | /// </summary> |
| 154 | - public decimal grzb { get; set; } | |
| 50 | + public string userName { get; set; } | |
| 155 | 51 | |
| 156 | 52 | /// <summary> |
| 157 | - /// 组员合计 | |
| 53 | + /// 是否顾问(0-否,1-是) | |
| 158 | 54 | /// </summary> |
| 159 | - public decimal zyhj { get; set; } | |
| 55 | + public int isLeader { get; set; } | |
| 160 | 56 | |
| 161 | 57 | /// <summary> |
| 162 | - /// 顾问提成 | |
| 58 | + /// 排序 | |
| 163 | 59 | /// </summary> |
| 164 | - public decimal gwtc { get; set; } | |
| 165 | - | |
| 60 | + public int sortOrder { get; set; } | |
| 166 | 61 | } |
| 167 | 62 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqYcsdJsj/LqYcsdJsjInfoOutput.cs
| ... | ... | @@ -28,140 +28,5 @@ namespace NCC.Extend.Entitys.Dto.LqYcsdJsj |
| 28 | 28 | /// </summary> |
| 29 | 29 | public string jsj { get; set; } |
| 30 | 30 | |
| 31 | - /// <summary> | |
| 32 | - /// 岗位 | |
| 33 | - /// </summary> | |
| 34 | - public string gw { get; set; } | |
| 35 | - | |
| 36 | - /// <summary> | |
| 37 | - /// 健康师 | |
| 38 | - /// </summary> | |
| 39 | - public string jks { get; set; } | |
| 40 | - | |
| 41 | - /// <summary> | |
| 42 | - /// 成交率 | |
| 43 | - /// </summary> | |
| 44 | - public decimal cjl { get; set; } | |
| 45 | - | |
| 46 | - /// <summary> | |
| 47 | - /// 成交业绩 | |
| 48 | - /// </summary> | |
| 49 | - public decimal cjyj { get; set; } | |
| 50 | - | |
| 51 | - /// <summary> | |
| 52 | - /// 成交提点 | |
| 53 | - /// </summary> | |
| 54 | - public decimal cjtd { get; set; } | |
| 55 | - | |
| 56 | - /// <summary> | |
| 57 | - /// 剩余业绩 | |
| 58 | - /// </summary> | |
| 59 | - public decimal syyj { get; set; } | |
| 60 | - | |
| 61 | - /// <summary> | |
| 62 | - /// 出勤天数 | |
| 63 | - /// </summary> | |
| 64 | - public int? cqts { get; set; } | |
| 65 | - | |
| 66 | - /// <summary> | |
| 67 | - /// 系统业绩 | |
| 68 | - /// </summary> | |
| 69 | - public decimal xtyj { get; set; } | |
| 70 | - | |
| 71 | - /// <summary> | |
| 72 | - /// 总业绩 | |
| 73 | - /// </summary> | |
| 74 | - public decimal zyj { get; set; } | |
| 75 | - | |
| 76 | - /// <summary> | |
| 77 | - /// 基础业绩 | |
| 78 | - /// </summary> | |
| 79 | - public decimal jcyj { get; set; } | |
| 80 | - | |
| 81 | - /// <summary> | |
| 82 | - /// 合作业绩 | |
| 83 | - /// </summary> | |
| 84 | - public decimal hzyj { get; set; } | |
| 85 | - | |
| 86 | - /// <summary> | |
| 87 | - /// 奖励业绩 | |
| 88 | - /// </summary> | |
| 89 | - public decimal jlyj { get; set; } | |
| 90 | - | |
| 91 | - /// <summary> | |
| 92 | - /// 项目数 | |
| 93 | - /// </summary> | |
| 94 | - public int? xms { get; set; } | |
| 95 | - | |
| 96 | - /// <summary> | |
| 97 | - /// 手工 | |
| 98 | - /// </summary> | |
| 99 | - public int? sg { get; set; } | |
| 100 | - | |
| 101 | - /// <summary> | |
| 102 | - /// ①是否属于战队 | |
| 103 | - /// </summary> | |
| 104 | - public string sfsyzd { get; set; } | |
| 105 | - | |
| 106 | - /// <summary> | |
| 107 | - /// ②是否满足考勤 | |
| 108 | - /// </summary> | |
| 109 | - public string fsmzkq { get; set; } | |
| 110 | - | |
| 111 | - /// <summary> | |
| 112 | - /// ③战队最终人数 | |
| 113 | - /// </summary> | |
| 114 | - public int? zdzzrs { get; set; } | |
| 115 | - | |
| 116 | - /// <summary> | |
| 117 | - /// ④考勤后不属于战队视为单人 | |
| 118 | - /// </summary> | |
| 119 | - public int? kqhbsyzd { get; set; } | |
| 120 | - | |
| 121 | - /// <summary> | |
| 122 | - /// ⑤战队提成 | |
| 123 | - /// </summary> | |
| 124 | - public decimal zdtc { get; set; } | |
| 125 | - | |
| 126 | - /// <summary> | |
| 127 | - /// ⑥按1人提成 | |
| 128 | - /// </summary> | |
| 129 | - public decimal ayrtc { get; set; } | |
| 130 | - | |
| 131 | - /// <summary> | |
| 132 | - /// 最终提成点 | |
| 133 | - /// </summary> | |
| 134 | - public decimal zztcd { get; set; } | |
| 135 | - | |
| 136 | - /// <summary> | |
| 137 | - /// 基础业绩提成 | |
| 138 | - /// </summary> | |
| 139 | - public decimal jcyjtc { get; set; } | |
| 140 | - | |
| 141 | - /// <summary> | |
| 142 | - /// 合作业绩提成 | |
| 143 | - /// </summary> | |
| 144 | - public decimal hzyjtc { get; set; } | |
| 145 | - | |
| 146 | - /// <summary> | |
| 147 | - /// 提成合计 | |
| 148 | - /// </summary> | |
| 149 | - public decimal tchj { get; set; } | |
| 150 | - | |
| 151 | - /// <summary> | |
| 152 | - /// 个人占比 | |
| 153 | - /// </summary> | |
| 154 | - public decimal grzb { get; set; } | |
| 155 | - | |
| 156 | - /// <summary> | |
| 157 | - /// 组员合计 | |
| 158 | - /// </summary> | |
| 159 | - public decimal zyhj { get; set; } | |
| 160 | - | |
| 161 | - /// <summary> | |
| 162 | - /// 顾问提成 | |
| 163 | - /// </summary> | |
| 164 | - public decimal gwtc { get; set; } | |
| 165 | - | |
| 166 | 31 | } |
| 167 | 32 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqYcsdJsj/LqYcsdJsjListOutput.cs
| ... | ... | @@ -27,140 +27,5 @@ namespace NCC.Extend.Entitys.Dto.LqYcsdJsj |
| 27 | 27 | /// </summary> |
| 28 | 28 | public string jsj { get; set; } |
| 29 | 29 | |
| 30 | - /// <summary> | |
| 31 | - /// 岗位 | |
| 32 | - /// </summary> | |
| 33 | - public string gw { get; set; } | |
| 34 | - | |
| 35 | - /// <summary> | |
| 36 | - /// 健康师 | |
| 37 | - /// </summary> | |
| 38 | - public string jks { get; set; } | |
| 39 | - | |
| 40 | - /// <summary> | |
| 41 | - /// 成交率 | |
| 42 | - /// </summary> | |
| 43 | - public decimal cjl { get; set; } | |
| 44 | - | |
| 45 | - /// <summary> | |
| 46 | - /// 成交业绩 | |
| 47 | - /// </summary> | |
| 48 | - public decimal cjyj { get; set; } | |
| 49 | - | |
| 50 | - /// <summary> | |
| 51 | - /// 成交提点 | |
| 52 | - /// </summary> | |
| 53 | - public decimal cjtd { get; set; } | |
| 54 | - | |
| 55 | - /// <summary> | |
| 56 | - /// 剩余业绩 | |
| 57 | - /// </summary> | |
| 58 | - public decimal syyj { get; set; } | |
| 59 | - | |
| 60 | - /// <summary> | |
| 61 | - /// 出勤天数 | |
| 62 | - /// </summary> | |
| 63 | - public int? cqts { get; set; } | |
| 64 | - | |
| 65 | - /// <summary> | |
| 66 | - /// 系统业绩 | |
| 67 | - /// </summary> | |
| 68 | - public decimal xtyj { get; set; } | |
| 69 | - | |
| 70 | - /// <summary> | |
| 71 | - /// 总业绩 | |
| 72 | - /// </summary> | |
| 73 | - public decimal zyj { get; set; } | |
| 74 | - | |
| 75 | - /// <summary> | |
| 76 | - /// 基础业绩 | |
| 77 | - /// </summary> | |
| 78 | - public decimal jcyj { get; set; } | |
| 79 | - | |
| 80 | - /// <summary> | |
| 81 | - /// 合作业绩 | |
| 82 | - /// </summary> | |
| 83 | - public decimal hzyj { get; set; } | |
| 84 | - | |
| 85 | - /// <summary> | |
| 86 | - /// 奖励业绩 | |
| 87 | - /// </summary> | |
| 88 | - public decimal jlyj { get; set; } | |
| 89 | - | |
| 90 | - /// <summary> | |
| 91 | - /// 项目数 | |
| 92 | - /// </summary> | |
| 93 | - public int? xms { get; set; } | |
| 94 | - | |
| 95 | - /// <summary> | |
| 96 | - /// 手工 | |
| 97 | - /// </summary> | |
| 98 | - public int? sg { get; set; } | |
| 99 | - | |
| 100 | - /// <summary> | |
| 101 | - /// ①是否属于战队 | |
| 102 | - /// </summary> | |
| 103 | - public string sfsyzd { get; set; } | |
| 104 | - | |
| 105 | - /// <summary> | |
| 106 | - /// ②是否满足考勤 | |
| 107 | - /// </summary> | |
| 108 | - public string fsmzkq { get; set; } | |
| 109 | - | |
| 110 | - /// <summary> | |
| 111 | - /// ③战队最终人数 | |
| 112 | - /// </summary> | |
| 113 | - public int? zdzzrs { get; set; } | |
| 114 | - | |
| 115 | - /// <summary> | |
| 116 | - /// ④考勤后不属于战队视为单人 | |
| 117 | - /// </summary> | |
| 118 | - public int? kqhbsyzd { get; set; } | |
| 119 | - | |
| 120 | - /// <summary> | |
| 121 | - /// ⑤战队提成 | |
| 122 | - /// </summary> | |
| 123 | - public decimal zdtc { get; set; } | |
| 124 | - | |
| 125 | - /// <summary> | |
| 126 | - /// ⑥按1人提成 | |
| 127 | - /// </summary> | |
| 128 | - public decimal ayrtc { get; set; } | |
| 129 | - | |
| 130 | - /// <summary> | |
| 131 | - /// 最终提成点 | |
| 132 | - /// </summary> | |
| 133 | - public decimal zztcd { get; set; } | |
| 134 | - | |
| 135 | - /// <summary> | |
| 136 | - /// 基础业绩提成 | |
| 137 | - /// </summary> | |
| 138 | - public decimal jcyjtc { get; set; } | |
| 139 | - | |
| 140 | - /// <summary> | |
| 141 | - /// 合作业绩提成 | |
| 142 | - /// </summary> | |
| 143 | - public decimal hzyjtc { get; set; } | |
| 144 | - | |
| 145 | - /// <summary> | |
| 146 | - /// 提成合计 | |
| 147 | - /// </summary> | |
| 148 | - public decimal tchj { get; set; } | |
| 149 | - | |
| 150 | - /// <summary> | |
| 151 | - /// 个人占比 | |
| 152 | - /// </summary> | |
| 153 | - public decimal grzb { get; set; } | |
| 154 | - | |
| 155 | - /// <summary> | |
| 156 | - /// 组员合计 | |
| 157 | - /// </summary> | |
| 158 | - public decimal zyhj { get; set; } | |
| 159 | - | |
| 160 | - /// <summary> | |
| 161 | - /// 顾问提成 | |
| 162 | - /// </summary> | |
| 163 | - public decimal gwtc { get; set; } | |
| 164 | - | |
| 165 | 30 | } |
| 166 | 31 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqYcsdJsj/LqYcsdJsjListQueryInput.cs
| ... | ... | @@ -39,140 +39,5 @@ namespace NCC.Extend.Entitys.Dto.LqYcsdJsj |
| 39 | 39 | /// </summary> |
| 40 | 40 | public string jsj { get; set; } |
| 41 | 41 | |
| 42 | - /// <summary> | |
| 43 | - /// 岗位 | |
| 44 | - /// </summary> | |
| 45 | - public string gw { get; set; } | |
| 46 | - | |
| 47 | - /// <summary> | |
| 48 | - /// 健康师 | |
| 49 | - /// </summary> | |
| 50 | - public string jks { get; set; } | |
| 51 | - | |
| 52 | - /// <summary> | |
| 53 | - /// 成交率 | |
| 54 | - /// </summary> | |
| 55 | - public string cjl { get; set; } | |
| 56 | - | |
| 57 | - /// <summary> | |
| 58 | - /// 成交业绩 | |
| 59 | - /// </summary> | |
| 60 | - public string cjyj { get; set; } | |
| 61 | - | |
| 62 | - /// <summary> | |
| 63 | - /// 成交提点 | |
| 64 | - /// </summary> | |
| 65 | - public string cjtd { get; set; } | |
| 66 | - | |
| 67 | - /// <summary> | |
| 68 | - /// 剩余业绩 | |
| 69 | - /// </summary> | |
| 70 | - public string syyj { get; set; } | |
| 71 | - | |
| 72 | - /// <summary> | |
| 73 | - /// 出勤天数 | |
| 74 | - /// </summary> | |
| 75 | - public string cqts { get; set; } | |
| 76 | - | |
| 77 | - /// <summary> | |
| 78 | - /// 系统业绩 | |
| 79 | - /// </summary> | |
| 80 | - public string xtyj { get; set; } | |
| 81 | - | |
| 82 | - /// <summary> | |
| 83 | - /// 总业绩 | |
| 84 | - /// </summary> | |
| 85 | - public string zyj { get; set; } | |
| 86 | - | |
| 87 | - /// <summary> | |
| 88 | - /// 基础业绩 | |
| 89 | - /// </summary> | |
| 90 | - public string jcyj { get; set; } | |
| 91 | - | |
| 92 | - /// <summary> | |
| 93 | - /// 合作业绩 | |
| 94 | - /// </summary> | |
| 95 | - public string hzyj { get; set; } | |
| 96 | - | |
| 97 | - /// <summary> | |
| 98 | - /// 奖励业绩 | |
| 99 | - /// </summary> | |
| 100 | - public string jlyj { get; set; } | |
| 101 | - | |
| 102 | - /// <summary> | |
| 103 | - /// 项目数 | |
| 104 | - /// </summary> | |
| 105 | - public string xms { get; set; } | |
| 106 | - | |
| 107 | - /// <summary> | |
| 108 | - /// 手工 | |
| 109 | - /// </summary> | |
| 110 | - public string sg { get; set; } | |
| 111 | - | |
| 112 | - /// <summary> | |
| 113 | - /// ①是否属于战队 | |
| 114 | - /// </summary> | |
| 115 | - public string sfsyzd { get; set; } | |
| 116 | - | |
| 117 | - /// <summary> | |
| 118 | - /// ②是否满足考勤 | |
| 119 | - /// </summary> | |
| 120 | - public string fsmzkq { get; set; } | |
| 121 | - | |
| 122 | - /// <summary> | |
| 123 | - /// ③战队最终人数 | |
| 124 | - /// </summary> | |
| 125 | - public string zdzzrs { get; set; } | |
| 126 | - | |
| 127 | - /// <summary> | |
| 128 | - /// ④考勤后不属于战队视为单人 | |
| 129 | - /// </summary> | |
| 130 | - public string kqhbsyzd { get; set; } | |
| 131 | - | |
| 132 | - /// <summary> | |
| 133 | - /// ⑤战队提成 | |
| 134 | - /// </summary> | |
| 135 | - public string zdtc { get; set; } | |
| 136 | - | |
| 137 | - /// <summary> | |
| 138 | - /// ⑥按1人提成 | |
| 139 | - /// </summary> | |
| 140 | - public string ayrtc { get; set; } | |
| 141 | - | |
| 142 | - /// <summary> | |
| 143 | - /// 最终提成点 | |
| 144 | - /// </summary> | |
| 145 | - public string zztcd { get; set; } | |
| 146 | - | |
| 147 | - /// <summary> | |
| 148 | - /// 基础业绩提成 | |
| 149 | - /// </summary> | |
| 150 | - public string jcyjtc { get; set; } | |
| 151 | - | |
| 152 | - /// <summary> | |
| 153 | - /// 合作业绩提成 | |
| 154 | - /// </summary> | |
| 155 | - public string hzyjtc { get; set; } | |
| 156 | - | |
| 157 | - /// <summary> | |
| 158 | - /// 提成合计 | |
| 159 | - /// </summary> | |
| 160 | - public string tchj { get; set; } | |
| 161 | - | |
| 162 | - /// <summary> | |
| 163 | - /// 个人占比 | |
| 164 | - /// </summary> | |
| 165 | - public string grzb { get; set; } | |
| 166 | - | |
| 167 | - /// <summary> | |
| 168 | - /// 组员合计 | |
| 169 | - /// </summary> | |
| 170 | - public string zyhj { get; set; } | |
| 171 | - | |
| 172 | - /// <summary> | |
| 173 | - /// 顾问提成 | |
| 174 | - /// </summary> | |
| 175 | - public string gwtc { get; set; } | |
| 176 | - | |
| 177 | 42 | } |
| 178 | 43 | } | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_jinsanjiao_user/LqJinsanjiaoUserEntity.cs
0 → 100644
| 1 | +using NCC.Common.Const; | |
| 2 | +using SqlSugar; | |
| 3 | +using System; | |
| 4 | + | |
| 5 | +namespace NCC.Extend.Entitys.lq_jinsanjiao_user | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 金三角用户绑定关系 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("lq_jinsanjiao_user")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class LqJinsanjiaoUserEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 金三角ID(关联lq_ycsd_jsj.F_Id) | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "jsj_id")] | |
| 24 | + public string JsjId { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 用户ID(关联BASE_USER.F_Id) | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "user_id")] | |
| 30 | + public string UserId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 用户姓名 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "user_name")] | |
| 36 | + public string UserName { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 是否顾问 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "is_leader")] | |
| 42 | + public int IsLeader { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 状态(ACTIVE-活跃,INACTIVE-非活跃) | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "status")] | |
| 48 | + public string Status { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 排序 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "sort_order")] | |
| 54 | + public int SortOrder { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 创建时间 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_CreatorTime")] | |
| 60 | + public DateTime? CreatorTime { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 创建人ID | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_CreatorUserId")] | |
| 66 | + public string CreatorUserId { get; set; } | |
| 67 | + | |
| 68 | + /// <summary> | |
| 69 | + /// 最后修改时间 | |
| 70 | + /// </summary> | |
| 71 | + [SugarColumn(ColumnName = "F_LastModifyTime")] | |
| 72 | + public DateTime? LastModifyTime { get; set; } | |
| 73 | + | |
| 74 | + /// <summary> | |
| 75 | + /// 最后修改人ID | |
| 76 | + /// </summary> | |
| 77 | + [SugarColumn(ColumnName = "F_LastModifyUserId")] | |
| 78 | + public string LastModifyUserId { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 删除标记 | |
| 82 | + /// </summary> | |
| 83 | + [SugarColumn(ColumnName = "F_DeleteMark")] | |
| 84 | + public int DeleteMark { get; set; } | |
| 85 | + } | |
| 86 | +} | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_ycsd_jsj/LqYcsdJsjEntity.cs
| ... | ... | @@ -24,178 +24,15 @@ namespace NCC.Extend.Entitys.lq_ycsd_jsj |
| 24 | 24 | public string Yf { get; set; } |
| 25 | 25 | |
| 26 | 26 | /// <summary> |
| 27 | - /// 门店 | |
| 28 | - /// </summary> | |
| 29 | - [SugarColumn(ColumnName = "md")] | |
| 30 | - public string Md { get; set; } | |
| 31 | - | |
| 32 | - /// <summary> | |
| 33 | 27 | /// 金三角 |
| 34 | 28 | /// </summary> |
| 35 | 29 | [SugarColumn(ColumnName = "jsj")] |
| 36 | 30 | public string Jsj { get; set; } |
| 37 | 31 | |
| 38 | 32 | /// <summary> |
| 39 | - /// 岗位 | |
| 40 | - /// </summary> | |
| 41 | - [SugarColumn(ColumnName = "gw")] | |
| 42 | - public string Gw { get; set; } | |
| 43 | - | |
| 44 | - /// <summary> | |
| 45 | - /// 健康师 | |
| 46 | - /// </summary> | |
| 47 | - [SugarColumn(ColumnName = "jks")] | |
| 48 | - public string Jks { get; set; } | |
| 49 | - | |
| 50 | - /// <summary> | |
| 51 | - /// 成交率 | |
| 52 | - /// </summary> | |
| 53 | - [SugarColumn(ColumnName = "cjl")] | |
| 54 | - public decimal Cjl { get; set; } | |
| 55 | - | |
| 56 | - /// <summary> | |
| 57 | - /// 成交业绩 | |
| 58 | - /// </summary> | |
| 59 | - [SugarColumn(ColumnName = "cjyj")] | |
| 60 | - public decimal Cjyj { get; set; } | |
| 61 | - | |
| 62 | - /// <summary> | |
| 63 | - /// 成交提点 | |
| 64 | - /// </summary> | |
| 65 | - [SugarColumn(ColumnName = "cjtd")] | |
| 66 | - public decimal Cjtd { get; set; } | |
| 67 | - | |
| 68 | - /// <summary> | |
| 69 | - /// 剩余业绩 | |
| 70 | - /// </summary> | |
| 71 | - [SugarColumn(ColumnName = "syyj")] | |
| 72 | - public decimal Syyj { get; set; } | |
| 73 | - | |
| 74 | - /// <summary> | |
| 75 | - /// 出勤天数 | |
| 76 | - /// </summary> | |
| 77 | - [SugarColumn(ColumnName = "cqts")] | |
| 78 | - public int? Cqts { get; set; } | |
| 79 | - | |
| 80 | - /// <summary> | |
| 81 | - /// 系统业绩 | |
| 82 | - /// </summary> | |
| 83 | - [SugarColumn(ColumnName = "xtyj")] | |
| 84 | - public decimal Xtyj { get; set; } | |
| 85 | - | |
| 86 | - /// <summary> | |
| 87 | - /// 总业绩 | |
| 88 | - /// </summary> | |
| 89 | - [SugarColumn(ColumnName = "zyj")] | |
| 90 | - public decimal Zyj { get; set; } | |
| 91 | - | |
| 92 | - /// <summary> | |
| 93 | - /// 基础业绩 | |
| 94 | - /// </summary> | |
| 95 | - [SugarColumn(ColumnName = "jcyj")] | |
| 96 | - public decimal Jcyj { get; set; } | |
| 97 | - | |
| 98 | - /// <summary> | |
| 99 | - /// 合作业绩 | |
| 100 | - /// </summary> | |
| 101 | - [SugarColumn(ColumnName = "hzyj")] | |
| 102 | - public decimal Hzyj { get; set; } | |
| 103 | - | |
| 104 | - /// <summary> | |
| 105 | - /// 奖励业绩 | |
| 106 | - /// </summary> | |
| 107 | - [SugarColumn(ColumnName = "jlyj")] | |
| 108 | - public decimal Jlyj { get; set; } | |
| 109 | - | |
| 110 | - /// <summary> | |
| 111 | - /// 项目数 | |
| 112 | - /// </summary> | |
| 113 | - [SugarColumn(ColumnName = "xms")] | |
| 114 | - public int? Xms { get; set; } | |
| 115 | - | |
| 116 | - /// <summary> | |
| 117 | - /// 手工 | |
| 118 | - /// </summary> | |
| 119 | - [SugarColumn(ColumnName = "sg")] | |
| 120 | - public int? Sg { get; set; } | |
| 121 | - | |
| 122 | - /// <summary> | |
| 123 | - /// ①是否属于战队 | |
| 124 | - /// </summary> | |
| 125 | - [SugarColumn(ColumnName = "sfsyzd")] | |
| 126 | - public string Sfsyzd { get; set; } | |
| 127 | - | |
| 128 | - /// <summary> | |
| 129 | - /// ②是否满足考勤 | |
| 130 | - /// </summary> | |
| 131 | - [SugarColumn(ColumnName = "fsmzkq")] | |
| 132 | - public string Fsmzkq { get; set; } | |
| 133 | - | |
| 134 | - /// <summary> | |
| 135 | - /// ③战队最终人数 | |
| 136 | - /// </summary> | |
| 137 | - [SugarColumn(ColumnName = "zdzzrs")] | |
| 138 | - public int? Zdzzrs { get; set; } | |
| 139 | - | |
| 140 | - /// <summary> | |
| 141 | - /// ④考勤后不属于战队视为单人 | |
| 142 | - /// </summary> | |
| 143 | - [SugarColumn(ColumnName = "kqhbsyzd")] | |
| 144 | - public int? Kqhbsyzd { get; set; } | |
| 145 | - | |
| 146 | - /// <summary> | |
| 147 | - /// ⑤战队提成 | |
| 148 | - /// </summary> | |
| 149 | - [SugarColumn(ColumnName = "zdtc")] | |
| 150 | - public decimal Zdtc { get; set; } | |
| 151 | - | |
| 152 | - /// <summary> | |
| 153 | - /// ⑥按1人提成 | |
| 154 | - /// </summary> | |
| 155 | - [SugarColumn(ColumnName = "ayrtc")] | |
| 156 | - public decimal Ayrtc { get; set; } | |
| 157 | - | |
| 158 | - /// <summary> | |
| 159 | - /// 最终提成点 | |
| 33 | + /// 门店ID | |
| 160 | 34 | /// </summary> |
| 161 | - [SugarColumn(ColumnName = "zztcd")] | |
| 162 | - public decimal Zztcd { get; set; } | |
| 163 | - | |
| 164 | - /// <summary> | |
| 165 | - /// 基础业绩提成 | |
| 166 | - /// </summary> | |
| 167 | - [SugarColumn(ColumnName = "jcyjtc")] | |
| 168 | - public decimal Jcyjtc { get; set; } | |
| 169 | - | |
| 170 | - /// <summary> | |
| 171 | - /// 合作业绩提成 | |
| 172 | - /// </summary> | |
| 173 | - [SugarColumn(ColumnName = "hzyjtc")] | |
| 174 | - public decimal Hzyjtc { get; set; } | |
| 175 | - | |
| 176 | - /// <summary> | |
| 177 | - /// 提成合计 | |
| 178 | - /// </summary> | |
| 179 | - [SugarColumn(ColumnName = "tchj")] | |
| 180 | - public decimal Tchj { get; set; } | |
| 181 | - | |
| 182 | - /// <summary> | |
| 183 | - /// 个人占比 | |
| 184 | - /// </summary> | |
| 185 | - [SugarColumn(ColumnName = "grzb")] | |
| 186 | - public decimal Grzb { get; set; } | |
| 187 | - | |
| 188 | - /// <summary> | |
| 189 | - /// 组员合计 | |
| 190 | - /// </summary> | |
| 191 | - [SugarColumn(ColumnName = "zyhj")] | |
| 192 | - public decimal Zyhj { get; set; } | |
| 193 | - | |
| 194 | - /// <summary> | |
| 195 | - /// 顾问提成 | |
| 196 | - /// </summary> | |
| 197 | - [SugarColumn(ColumnName = "gwtc")] | |
| 198 | - public decimal Gwtc { get; set; } | |
| 199 | - | |
| 35 | + [SugarColumn(ColumnName = "md")] | |
| 36 | + public string Md { get; set; } | |
| 200 | 37 | } |
| 201 | 38 | } |
| 202 | 39 | \ No newline at end of file | ... | ... |
netcore/src/Modularity/Extend/NCC.Extend/LqYcsdJsjService.cs
| ... | ... | @@ -11,9 +11,12 @@ using Microsoft.AspNetCore.Mvc; |
| 11 | 11 | using SqlSugar; |
| 12 | 12 | using System; |
| 13 | 13 | using System.Collections.Generic; |
| 14 | +using System.Globalization; | |
| 14 | 15 | using System.Linq; |
| 15 | 16 | using System.Threading.Tasks; |
| 16 | 17 | using NCC.Extend.Entitys.lq_ycsd_jsj; |
| 18 | +using NCC.Extend.Entitys.lq_jinsanjiao_user; | |
| 19 | +using NCC.Extend.Entitys.lq_mdxx; | |
| 17 | 20 | using NCC.Extend.Entitys.Dto.LqYcsdJsj; |
| 18 | 21 | using Yitter.IdGenerator; |
| 19 | 22 | using NCC.Common.Helper; |
| ... | ... | @@ -62,6 +65,41 @@ namespace NCC.Extend.LqYcsdJsj |
| 62 | 65 | } |
| 63 | 66 | |
| 64 | 67 | /// <summary> |
| 68 | + /// 获取金三角设定详情(包含成员信息) | |
| 69 | + /// </summary> | |
| 70 | + /// <param name="id">金三角ID</param> | |
| 71 | + /// <returns></returns> | |
| 72 | + [HttpGet("{id}/detail")] | |
| 73 | + public async Task<dynamic> GetDetail(string id) | |
| 74 | + { | |
| 75 | + var entity = await _db.Queryable<LqYcsdJsjEntity>().FirstAsync(p => p.Id == id); | |
| 76 | + if (entity == null) throw NCCException.Oh(ErrorCode.COM1005); | |
| 77 | + | |
| 78 | + var output = entity.Adapt<LqYcsdJsjInfoOutput>(); | |
| 79 | + | |
| 80 | + // 获取成员信息 | |
| 81 | + var members = await _db.Queryable<LqJinsanjiaoUserEntity>() | |
| 82 | + .Where(x => x.JsjId == id && x.Status == "ACTIVE") | |
| 83 | + .OrderBy(x => x.SortOrder) | |
| 84 | + .Select(x => new | |
| 85 | + { | |
| 86 | + id = x.Id, | |
| 87 | + userId = x.UserId, | |
| 88 | + userName = x.UserName, | |
| 89 | + isLeader = x.IsLeader, | |
| 90 | + sortOrder = x.SortOrder, | |
| 91 | + status = x.Status | |
| 92 | + }) | |
| 93 | + .ToListAsync(); | |
| 94 | + | |
| 95 | + return new | |
| 96 | + { | |
| 97 | + jsj = output, | |
| 98 | + members = members | |
| 99 | + }; | |
| 100 | + } | |
| 101 | + | |
| 102 | + /// <summary> | |
| 65 | 103 | /// 获取金三角设定列表 |
| 66 | 104 | /// </summary> |
| 67 | 105 | /// <param name="input">请求参数</param> |
| ... | ... | @@ -75,72 +113,18 @@ namespace NCC.Extend.LqYcsdJsj |
| 75 | 113 | .WhereIF(!string.IsNullOrEmpty(input.yf), p => p.Yf.Contains(input.yf)) |
| 76 | 114 | .WhereIF(!string.IsNullOrEmpty(input.md), p => p.Md.Contains(input.md)) |
| 77 | 115 | .WhereIF(!string.IsNullOrEmpty(input.jsj), p => p.Jsj.Contains(input.jsj)) |
| 78 | - .WhereIF(!string.IsNullOrEmpty(input.gw), p => p.Gw.Contains(input.gw)) | |
| 79 | - .WhereIF(!string.IsNullOrEmpty(input.jks), p => p.Jks.Contains(input.jks)) | |
| 80 | - .WhereIF(!string.IsNullOrEmpty(input.cjl), p => p.Cjl.Equals(input.cjl)) | |
| 81 | - .WhereIF(!string.IsNullOrEmpty(input.cjyj), p => p.Cjyj.Equals(input.cjyj)) | |
| 82 | - .WhereIF(!string.IsNullOrEmpty(input.cjtd), p => p.Cjtd.Equals(input.cjtd)) | |
| 83 | - .WhereIF(!string.IsNullOrEmpty(input.syyj), p => p.Syyj.Equals(input.syyj)) | |
| 84 | - .WhereIF(!string.IsNullOrEmpty(input.cqts), p => p.Cqts.Equals(input.cqts)) | |
| 85 | - .WhereIF(!string.IsNullOrEmpty(input.xtyj), p => p.Xtyj.Equals(input.xtyj)) | |
| 86 | - .WhereIF(!string.IsNullOrEmpty(input.zyj), p => p.Zyj.Equals(input.zyj)) | |
| 87 | - .WhereIF(!string.IsNullOrEmpty(input.jcyj), p => p.Jcyj.Equals(input.jcyj)) | |
| 88 | - .WhereIF(!string.IsNullOrEmpty(input.hzyj), p => p.Hzyj.Equals(input.hzyj)) | |
| 89 | - .WhereIF(!string.IsNullOrEmpty(input.jlyj), p => p.Jlyj.Equals(input.jlyj)) | |
| 90 | - .WhereIF(!string.IsNullOrEmpty(input.xms), p => p.Xms.Equals(input.xms)) | |
| 91 | - .WhereIF(!string.IsNullOrEmpty(input.sg), p => p.Sg.Equals(input.sg)) | |
| 92 | - .WhereIF(!string.IsNullOrEmpty(input.sfsyzd), p => p.Sfsyzd.Contains(input.sfsyzd)) | |
| 93 | - .WhereIF(!string.IsNullOrEmpty(input.fsmzkq), p => p.Fsmzkq.Contains(input.fsmzkq)) | |
| 94 | - .WhereIF(!string.IsNullOrEmpty(input.zdzzrs), p => p.Zdzzrs.Equals(input.zdzzrs)) | |
| 95 | - .WhereIF(!string.IsNullOrEmpty(input.kqhbsyzd), p => p.Kqhbsyzd.Equals(input.kqhbsyzd)) | |
| 96 | - .WhereIF(!string.IsNullOrEmpty(input.zdtc), p => p.Zdtc.Equals(input.zdtc)) | |
| 97 | - .WhereIF(!string.IsNullOrEmpty(input.ayrtc), p => p.Ayrtc.Equals(input.ayrtc)) | |
| 98 | - .WhereIF(!string.IsNullOrEmpty(input.zztcd), p => p.Zztcd.Equals(input.zztcd)) | |
| 99 | - .WhereIF(!string.IsNullOrEmpty(input.jcyjtc), p => p.Jcyjtc.Equals(input.jcyjtc)) | |
| 100 | - .WhereIF(!string.IsNullOrEmpty(input.hzyjtc), p => p.Hzyjtc.Equals(input.hzyjtc)) | |
| 101 | - .WhereIF(!string.IsNullOrEmpty(input.tchj), p => p.Tchj.Equals(input.tchj)) | |
| 102 | - .WhereIF(!string.IsNullOrEmpty(input.grzb), p => p.Grzb.Equals(input.grzb)) | |
| 103 | - .WhereIF(!string.IsNullOrEmpty(input.zyhj), p => p.Zyhj.Equals(input.zyhj)) | |
| 104 | - .WhereIF(!string.IsNullOrEmpty(input.gwtc), p => p.Gwtc.Equals(input.gwtc)) | |
| 105 | 116 | .Select(it=> new LqYcsdJsjListOutput |
| 106 | 117 | { |
| 107 | 118 | id = it.Id, |
| 108 | - yf=it.Yf, | |
| 109 | - md=it.Md, | |
| 110 | - jsj=it.Jsj, | |
| 111 | - gw=it.Gw, | |
| 112 | - jks=it.Jks, | |
| 113 | - cjl=it.Cjl, | |
| 114 | - cjyj=it.Cjyj, | |
| 115 | - cjtd=it.Cjtd, | |
| 116 | - syyj=it.Syyj, | |
| 117 | - cqts=it.Cqts, | |
| 118 | - xtyj=it.Xtyj, | |
| 119 | - zyj=it.Zyj, | |
| 120 | - jcyj=it.Jcyj, | |
| 121 | - hzyj=it.Hzyj, | |
| 122 | - jlyj=it.Jlyj, | |
| 123 | - xms=it.Xms, | |
| 124 | - sg=it.Sg, | |
| 125 | - sfsyzd=it.Sfsyzd, | |
| 126 | - fsmzkq=it.Fsmzkq, | |
| 127 | - zdzzrs=it.Zdzzrs, | |
| 128 | - kqhbsyzd=it.Kqhbsyzd, | |
| 129 | - zdtc=it.Zdtc, | |
| 130 | - ayrtc=it.Ayrtc, | |
| 131 | - zztcd=it.Zztcd, | |
| 132 | - jcyjtc=it.Jcyjtc, | |
| 133 | - hzyjtc=it.Hzyjtc, | |
| 134 | - tchj=it.Tchj, | |
| 135 | - grzb=it.Grzb, | |
| 136 | - zyhj=it.Zyhj, | |
| 137 | - gwtc=it.Gwtc, | |
| 119 | + yf = it.Yf, | |
| 120 | + md = it.Md, | |
| 121 | + jsj = it.Jsj | |
| 138 | 122 | }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); |
| 139 | 123 | return PageResult<LqYcsdJsjListOutput>.SqlSugarPageResult(data); |
| 140 | 124 | } |
| 141 | 125 | |
| 142 | 126 | /// <summary> |
| 143 | - /// 新建金三角设定 | |
| 127 | + /// 新建金三角 | |
| 144 | 128 | /// </summary> |
| 145 | 129 | /// <param name="input">参数</param> |
| 146 | 130 | /// <returns></returns> |
| ... | ... | @@ -148,10 +132,69 @@ namespace NCC.Extend.LqYcsdJsj |
| 148 | 132 | public async Task Create([FromBody] LqYcsdJsjCrInput input) |
| 149 | 133 | { |
| 150 | 134 | var userInfo = await _userManager.GetUserInfo(); |
| 151 | - var entity = input.Adapt<LqYcsdJsjEntity>(); | |
| 152 | - entity.Id = YitIdHelper.NextId().ToString(); | |
| 153 | - var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); | |
| 154 | - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 135 | + | |
| 136 | + // 参数验证 | |
| 137 | + if (string.IsNullOrEmpty(input.yf)) | |
| 138 | + throw NCCException.Oh(ErrorCode.COM1000, "月份不能为空"); | |
| 139 | + if (string.IsNullOrEmpty(input.md)) | |
| 140 | + throw NCCException.Oh(ErrorCode.COM1000, "门店不能为空"); | |
| 141 | + if (string.IsNullOrEmpty(input.jsj)) | |
| 142 | + throw NCCException.Oh(ErrorCode.COM1000, "金三角名称不能为空"); | |
| 143 | + | |
| 144 | + // 验证月份格式 | |
| 145 | + if (!DateTime.TryParseExact(input.yf, "yyyyMM", null, DateTimeStyles.None, out _)) | |
| 146 | + { | |
| 147 | + throw NCCException.Oh(ErrorCode.COM1000, "月份格式必须为yyyyMM"); | |
| 148 | + } | |
| 149 | + | |
| 150 | + // 验证多人战队必须有顾问 | |
| 151 | + if (input.members != null && input.members.Count >= 2) | |
| 152 | + { | |
| 153 | + var hasLeader = input.members.Any(m => m.isLeader == 1); | |
| 154 | + if (!hasLeader) | |
| 155 | + { | |
| 156 | + throw NCCException.Oh(ErrorCode.COM1000, "两人或两人以上的战队必须有一个顾问"); | |
| 157 | + } | |
| 158 | + } | |
| 159 | + | |
| 160 | + // 验证金三角名称是否已存在 | |
| 161 | + var existingJsj = await _db.Queryable<LqYcsdJsjEntity>() | |
| 162 | + .Where(x => x.Yf == input.yf && x.Md == input.md && x.Jsj == input.jsj) | |
| 163 | + .FirstAsync(); | |
| 164 | + if (existingJsj != null) | |
| 165 | + { | |
| 166 | + throw NCCException.Oh(ErrorCode.COM1000, "该门店该月份已存在同名金三角"); | |
| 167 | + } | |
| 168 | + try | |
| 169 | + { | |
| 170 | + // 开启事务 | |
| 171 | + _db.BeginTran(); | |
| 172 | + // 1. 创建门店T区(如果不存在) | |
| 173 | + await CreateOrUpdateStoreTArea(input.yf, input.md, userInfo.userId); | |
| 174 | + // 2. 创建金三角基础信息 | |
| 175 | + var entity = input.Adapt<LqYcsdJsjEntity>(); | |
| 176 | + entity.Id = YitIdHelper.NextId().ToString(); | |
| 177 | + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); | |
| 178 | + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | |
| 179 | + // 3. 创建金三角成员绑定关系 | |
| 180 | + if (input.members != null && input.members.Count > 0) | |
| 181 | + { | |
| 182 | + await CreateJsjMembers(entity.Id, input.members, userInfo.userId); | |
| 183 | + } | |
| 184 | + // 4. 创建站点战队T区(如果金三角不是T区) | |
| 185 | + if (!input.jsj.EndsWith("T区")) | |
| 186 | + { | |
| 187 | + await CreateOrUpdateTeamTArea(input.yf, input.jsj, input.md, userInfo.userId); | |
| 188 | + } | |
| 189 | + // 提交事务 | |
| 190 | + _db.CommitTran(); | |
| 191 | + } | |
| 192 | + catch (Exception ex) | |
| 193 | + { | |
| 194 | + // 回滚事务 | |
| 195 | + _db.RollbackTran(); | |
| 196 | + throw NCCException.Oh(ErrorCode.COM1000, ex.Message); | |
| 197 | + } | |
| 155 | 198 | } |
| 156 | 199 | |
| 157 | 200 | /// <summary> |
| ... | ... | @@ -168,66 +211,12 @@ namespace NCC.Extend.LqYcsdJsj |
| 168 | 211 | .WhereIF(!string.IsNullOrEmpty(input.yf), p => p.Yf.Contains(input.yf)) |
| 169 | 212 | .WhereIF(!string.IsNullOrEmpty(input.md), p => p.Md.Contains(input.md)) |
| 170 | 213 | .WhereIF(!string.IsNullOrEmpty(input.jsj), p => p.Jsj.Contains(input.jsj)) |
| 171 | - .WhereIF(!string.IsNullOrEmpty(input.gw), p => p.Gw.Contains(input.gw)) | |
| 172 | - .WhereIF(!string.IsNullOrEmpty(input.jks), p => p.Jks.Contains(input.jks)) | |
| 173 | - .WhereIF(!string.IsNullOrEmpty(input.cjl), p => p.Cjl.Equals(input.cjl)) | |
| 174 | - .WhereIF(!string.IsNullOrEmpty(input.cjyj), p => p.Cjyj.Equals(input.cjyj)) | |
| 175 | - .WhereIF(!string.IsNullOrEmpty(input.cjtd), p => p.Cjtd.Equals(input.cjtd)) | |
| 176 | - .WhereIF(!string.IsNullOrEmpty(input.syyj), p => p.Syyj.Equals(input.syyj)) | |
| 177 | - .WhereIF(!string.IsNullOrEmpty(input.cqts), p => p.Cqts.Equals(input.cqts)) | |
| 178 | - .WhereIF(!string.IsNullOrEmpty(input.xtyj), p => p.Xtyj.Equals(input.xtyj)) | |
| 179 | - .WhereIF(!string.IsNullOrEmpty(input.zyj), p => p.Zyj.Equals(input.zyj)) | |
| 180 | - .WhereIF(!string.IsNullOrEmpty(input.jcyj), p => p.Jcyj.Equals(input.jcyj)) | |
| 181 | - .WhereIF(!string.IsNullOrEmpty(input.hzyj), p => p.Hzyj.Equals(input.hzyj)) | |
| 182 | - .WhereIF(!string.IsNullOrEmpty(input.jlyj), p => p.Jlyj.Equals(input.jlyj)) | |
| 183 | - .WhereIF(!string.IsNullOrEmpty(input.xms), p => p.Xms.Equals(input.xms)) | |
| 184 | - .WhereIF(!string.IsNullOrEmpty(input.sg), p => p.Sg.Equals(input.sg)) | |
| 185 | - .WhereIF(!string.IsNullOrEmpty(input.sfsyzd), p => p.Sfsyzd.Contains(input.sfsyzd)) | |
| 186 | - .WhereIF(!string.IsNullOrEmpty(input.fsmzkq), p => p.Fsmzkq.Contains(input.fsmzkq)) | |
| 187 | - .WhereIF(!string.IsNullOrEmpty(input.zdzzrs), p => p.Zdzzrs.Equals(input.zdzzrs)) | |
| 188 | - .WhereIF(!string.IsNullOrEmpty(input.kqhbsyzd), p => p.Kqhbsyzd.Equals(input.kqhbsyzd)) | |
| 189 | - .WhereIF(!string.IsNullOrEmpty(input.zdtc), p => p.Zdtc.Equals(input.zdtc)) | |
| 190 | - .WhereIF(!string.IsNullOrEmpty(input.ayrtc), p => p.Ayrtc.Equals(input.ayrtc)) | |
| 191 | - .WhereIF(!string.IsNullOrEmpty(input.zztcd), p => p.Zztcd.Equals(input.zztcd)) | |
| 192 | - .WhereIF(!string.IsNullOrEmpty(input.jcyjtc), p => p.Jcyjtc.Equals(input.jcyjtc)) | |
| 193 | - .WhereIF(!string.IsNullOrEmpty(input.hzyjtc), p => p.Hzyjtc.Equals(input.hzyjtc)) | |
| 194 | - .WhereIF(!string.IsNullOrEmpty(input.tchj), p => p.Tchj.Equals(input.tchj)) | |
| 195 | - .WhereIF(!string.IsNullOrEmpty(input.grzb), p => p.Grzb.Equals(input.grzb)) | |
| 196 | - .WhereIF(!string.IsNullOrEmpty(input.zyhj), p => p.Zyhj.Equals(input.zyhj)) | |
| 197 | - .WhereIF(!string.IsNullOrEmpty(input.gwtc), p => p.Gwtc.Equals(input.gwtc)) | |
| 198 | 214 | .Select(it=> new LqYcsdJsjListOutput |
| 199 | 215 | { |
| 200 | 216 | id = it.Id, |
| 201 | - yf=it.Yf, | |
| 202 | - md=it.Md, | |
| 203 | - jsj=it.Jsj, | |
| 204 | - gw=it.Gw, | |
| 205 | - jks=it.Jks, | |
| 206 | - cjl=it.Cjl, | |
| 207 | - cjyj=it.Cjyj, | |
| 208 | - cjtd=it.Cjtd, | |
| 209 | - syyj=it.Syyj, | |
| 210 | - cqts=it.Cqts, | |
| 211 | - xtyj=it.Xtyj, | |
| 212 | - zyj=it.Zyj, | |
| 213 | - jcyj=it.Jcyj, | |
| 214 | - hzyj=it.Hzyj, | |
| 215 | - jlyj=it.Jlyj, | |
| 216 | - xms=it.Xms, | |
| 217 | - sg=it.Sg, | |
| 218 | - sfsyzd=it.Sfsyzd, | |
| 219 | - fsmzkq=it.Fsmzkq, | |
| 220 | - zdzzrs=it.Zdzzrs, | |
| 221 | - kqhbsyzd=it.Kqhbsyzd, | |
| 222 | - zdtc=it.Zdtc, | |
| 223 | - ayrtc=it.Ayrtc, | |
| 224 | - zztcd=it.Zztcd, | |
| 225 | - jcyjtc=it.Jcyjtc, | |
| 226 | - hzyjtc=it.Hzyjtc, | |
| 227 | - tchj=it.Tchj, | |
| 228 | - grzb=it.Grzb, | |
| 229 | - zyhj=it.Zyhj, | |
| 230 | - gwtc=it.Gwtc, | |
| 217 | + yf = it.Yf, | |
| 218 | + md = it.Md, | |
| 219 | + jsj = it.Jsj | |
| 231 | 220 | }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); |
| 232 | 221 | return data; |
| 233 | 222 | } |
| ... | ... | @@ -251,7 +240,7 @@ namespace NCC.Extend.LqYcsdJsj |
| 251 | 240 | { |
| 252 | 241 | exportData = await this.GetNoPagingList(input); |
| 253 | 242 | } |
| 254 | - List<ParamsModel> paramList = "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"月份\",\"field\":\"yf\"},{\"value\":\"门店\",\"field\":\"md\"},{\"value\":\"金三角\",\"field\":\"jsj\"},{\"value\":\"岗位\",\"field\":\"gw\"},{\"value\":\"健康师\",\"field\":\"jks\"},{\"value\":\"成交率\",\"field\":\"cjl\"},{\"value\":\"成交业绩\",\"field\":\"cjyj\"},{\"value\":\"成交提点\",\"field\":\"cjtd\"},{\"value\":\"剩余业绩\",\"field\":\"syyj\"},{\"value\":\"出勤天数\",\"field\":\"cqts\"},{\"value\":\"系统业绩\",\"field\":\"xtyj\"},{\"value\":\"总业绩\",\"field\":\"zyj\"},{\"value\":\"基础业绩\",\"field\":\"jcyj\"},{\"value\":\"合作业绩\",\"field\":\"hzyj\"},{\"value\":\"奖励业绩\",\"field\":\"jlyj\"},{\"value\":\"项目数\",\"field\":\"xms\"},{\"value\":\"手工\",\"field\":\"sg\"},{\"value\":\"是否属于战队\",\"field\":\"sfsyzd\"},{\"value\":\"是否满足考勤\",\"field\":\"fsmzkq\"},{\"value\":\"战队最终人数\",\"field\":\"zdzzrs\"},{\"value\":\"视为单人\",\"field\":\"kqhbsyzd\"},{\"value\":\"战队提成\",\"field\":\"zdtc\"},{\"value\":\"按1人提成\",\"field\":\"ayrtc\"},{\"value\":\"最终提成点\",\"field\":\"zztcd\"},{\"value\":\"基础业绩提成\",\"field\":\"jcyjtc\"},{\"value\":\"合作业绩提成\",\"field\":\"hzyjtc\"},{\"value\":\"提成合计\",\"field\":\"tchj\"},{\"value\":\"个人占比\",\"field\":\"grzb\"},{\"value\":\"组员合计\",\"field\":\"zyhj\"},{\"value\":\"顾问提成\",\"field\":\"gwtc\"},]".ToList<ParamsModel>(); | |
| 243 | + List<ParamsModel> paramList = "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"月份\",\"field\":\"yf\"},{\"value\":\"门店\",\"field\":\"md\"},{\"value\":\"金三角\",\"field\":\"jsj\"}]".ToList<ParamsModel>(); | |
| 255 | 244 | ExcelConfig excelconfig = new ExcelConfig(); |
| 256 | 245 | excelconfig.FileName = "金三角设定.xls"; |
| 257 | 246 | excelconfig.HeadFont = "微软雅黑"; |
| ... | ... | @@ -333,5 +322,132 @@ namespace NCC.Extend.LqYcsdJsj |
| 333 | 322 | var isOk = await _db.Deleteable<LqYcsdJsjEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); |
| 334 | 323 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); |
| 335 | 324 | } |
| 325 | + | |
| 326 | + #region 私有辅助方法 | |
| 327 | + | |
| 328 | + /// <summary> | |
| 329 | + /// 创建或更新门店T区 | |
| 330 | + /// </summary> | |
| 331 | + /// <param name="yf">月份</param> | |
| 332 | + /// <param name="mdId">门店ID</param> | |
| 333 | + /// <param name="creatorUserId">创建人ID</param> | |
| 334 | + /// <returns></returns> | |
| 335 | + private async Task CreateOrUpdateStoreTArea(string yf, string mdId, string creatorUserId) | |
| 336 | + { | |
| 337 | + // 获取门店名称 | |
| 338 | + var storeName = await GetStoreNameById(mdId); | |
| 339 | + var tAreaName = $"{storeName}T区"; | |
| 340 | + | |
| 341 | + // 检查该门店该月份是否已有T区 | |
| 342 | + var existingTArea = await _db.Queryable<LqYcsdJsjEntity>() | |
| 343 | + .Where(x => x.Yf == yf && x.Md == mdId && x.Jsj == tAreaName) | |
| 344 | + .FirstAsync(); | |
| 345 | + | |
| 346 | + if (existingTArea == null) | |
| 347 | + { | |
| 348 | + // 创建门店T区 | |
| 349 | + var tAreaEntity = new LqYcsdJsjEntity | |
| 350 | + { | |
| 351 | + Id = YitIdHelper.NextId().ToString(), | |
| 352 | + Yf = yf, | |
| 353 | + Md = mdId, | |
| 354 | + Jsj = tAreaName | |
| 355 | + }; | |
| 356 | + | |
| 357 | + await _db.Insertable(tAreaEntity).ExecuteCommandAsync(); | |
| 358 | + } | |
| 359 | + } | |
| 360 | + | |
| 361 | + /// <summary> | |
| 362 | + /// 创建或更新战队T区 | |
| 363 | + /// </summary> | |
| 364 | + /// <param name="yf">月份</param> | |
| 365 | + /// <param name="teamName">战队名称</param> | |
| 366 | + /// <param name="mdId">门店ID</param> | |
| 367 | + /// <param name="creatorUserId">创建人ID</param> | |
| 368 | + /// <returns></returns> | |
| 369 | + private async Task CreateOrUpdateTeamTArea(string yf, string teamName, string mdId, string creatorUserId) | |
| 370 | + { | |
| 371 | + var tAreaName = $"{teamName}T区"; | |
| 372 | + | |
| 373 | + // 检查该战队该月份是否已有T区 | |
| 374 | + var existingTArea = await _db.Queryable<LqYcsdJsjEntity>() | |
| 375 | + .Where(x => x.Yf == yf && x.Md == mdId && x.Jsj == tAreaName) | |
| 376 | + .FirstAsync(); | |
| 377 | + | |
| 378 | + if (existingTArea == null) | |
| 379 | + { | |
| 380 | + // 创建战队T区 | |
| 381 | + var tAreaEntity = new LqYcsdJsjEntity | |
| 382 | + { | |
| 383 | + Id = YitIdHelper.NextId().ToString(), | |
| 384 | + Yf = yf, | |
| 385 | + Md = mdId, | |
| 386 | + Jsj = tAreaName | |
| 387 | + }; | |
| 388 | + | |
| 389 | + await _db.Insertable(tAreaEntity).ExecuteCommandAsync(); | |
| 390 | + } | |
| 391 | + } | |
| 392 | + | |
| 393 | + /// <summary> | |
| 394 | + /// 创建金三角成员绑定关系 | |
| 395 | + /// </summary> | |
| 396 | + /// <param name="jsjId">金三角ID</param> | |
| 397 | + /// <param name="members">成员列表</param> | |
| 398 | + /// <param name="creatorUserId">创建人ID</param> | |
| 399 | + /// <returns></returns> | |
| 400 | + private async Task CreateJsjMembers(string jsjId, List<JsjMemberInput> members, string creatorUserId) | |
| 401 | + { | |
| 402 | + var memberEntities = new List<LqJinsanjiaoUserEntity>(); | |
| 403 | + | |
| 404 | + for (int i = 0; i < members.Count; i++) | |
| 405 | + { | |
| 406 | + var member = members[i]; | |
| 407 | + var memberEntity = new LqJinsanjiaoUserEntity | |
| 408 | + { | |
| 409 | + Id = YitIdHelper.NextId().ToString(), | |
| 410 | + JsjId = jsjId, | |
| 411 | + UserId = member.userId, | |
| 412 | + UserName = member.userName, | |
| 413 | + IsLeader = member.isLeader, | |
| 414 | + Status = "ACTIVE", | |
| 415 | + SortOrder = member.sortOrder > 0 ? member.sortOrder : i + 1, | |
| 416 | + CreatorTime = DateTime.Now, | |
| 417 | + CreatorUserId = creatorUserId, | |
| 418 | + DeleteMark = 0 | |
| 419 | + }; | |
| 420 | + | |
| 421 | + memberEntities.Add(memberEntity); | |
| 422 | + } | |
| 423 | + | |
| 424 | + if (memberEntities.Count > 0) | |
| 425 | + { | |
| 426 | + await _db.Insertable(memberEntities).ExecuteCommandAsync(); | |
| 427 | + } | |
| 428 | + } | |
| 429 | + | |
| 430 | + /// <summary> | |
| 431 | + /// 根据门店ID获取门店名称 | |
| 432 | + /// </summary> | |
| 433 | + /// <param name="mdId">门店ID</param> | |
| 434 | + /// <returns></returns> | |
| 435 | + private async Task<string> GetStoreNameById(string mdId) | |
| 436 | + { | |
| 437 | + try | |
| 438 | + { | |
| 439 | + var storeName = await _db.Queryable<LqMdxxEntity>() | |
| 440 | + .Where(x => x.Id == mdId) | |
| 441 | + .Select(x => x.Dm) | |
| 442 | + .FirstAsync(); | |
| 443 | + return string.IsNullOrEmpty(storeName) ? "未知门店" : storeName; | |
| 444 | + } | |
| 445 | + catch | |
| 446 | + { | |
| 447 | + return "未知门店"; | |
| 448 | + } | |
| 449 | + } | |
| 450 | + | |
| 451 | + #endregion | |
| 336 | 452 | } |
| 337 | 453 | } | ... | ... |
参考资料/.DS_Store
No preview for this file type
参考资料/工资核算 -7月/.DS_Store
No preview for this file type
数据库说明.md
| ... | ... | @@ -27,6 +27,9 @@ |
| 27 | 27 | - **时间字段**:统一使用 `datetime` 类型 |
| 28 | 28 | - **金额字段**:统一使用 `decimal` 类型 |
| 29 | 29 | |
| 30 | +### 已弃用表 | |
| 31 | +- **lq_ryzl (人员资料表)** - 已弃用,人员信息现在使用系统用户表 `BASE_USER` 管理 | |
| 32 | + | |
| 30 | 33 | --- |
| 31 | 34 | |
| 32 | 35 | ## 核心业务表 |
| ... | ... | @@ -80,7 +83,9 @@ |
| 80 | 83 | |
| 81 | 84 | ### 2. 人员相关表 |
| 82 | 85 | |
| 83 | -#### lq_ryzl (人员资料) | |
| 86 | +#### lq_ryzl (人员资料) - ⚠️ 已弃用 | |
| 87 | +> **注意**:此表已弃用,人员信息现在使用系统用户表 `BASE_USER` 管理 | |
| 88 | + | |
| 84 | 89 | | 字段名 | 数据类型 | 是否可空 | 字段说明 | 主键 | |
| 85 | 90 | |--------|----------|----------|----------|------| |
| 86 | 91 | | F_Id | varchar | NO | 序号 | PRI | |
| ... | ... | @@ -150,37 +155,37 @@ |
| 150 | 155 | #### lq_ycsd_jsj (金三角设定) |
| 151 | 156 | | 字段名 | 数据类型 | 是否可空 | 字段说明 | 主键 | |
| 152 | 157 | |--------|----------|----------|----------|------| |
| 153 | -| F_Id | varchar | NO | 主键 | PRI | | |
| 154 | -| yf | varchar | YES | 月份 | | | |
| 155 | -| md | varchar | YES | 门店 | | | |
| 156 | -| jsj | varchar | YES | 金三角 | | | |
| 157 | -| gw | varchar | YES | 岗位 | | | |
| 158 | -| jks | varchar | YES | 健康师 | | | |
| 159 | -| cjl | decimal | YES | 成交率 | | | |
| 160 | -| cjyj | decimal | YES | 成交业绩 | | | |
| 161 | -| cjtd | decimal | YES | 成交提点 | | | |
| 162 | -| syyj | decimal | YES | 剩余业绩 | | | |
| 163 | -| cqts | int | YES | 出勤天数 | | | |
| 164 | -| xtyj | decimal | YES | 系统业绩 | | | |
| 165 | -| zyj | decimal | YES | 总业绩 | | | |
| 166 | -| jcyj | decimal | YES | 基础业绩 | | | |
| 167 | -| hzyj | decimal | YES | 合作业绩 | | | |
| 168 | -| jlyj | decimal | YES | 奖励业绩 | | | |
| 169 | -| xms | int | YES | 项目数 | | | |
| 170 | -| sg | int | YES | 手工 | | | |
| 171 | -| sfsyzd | varchar | YES | ①是否属于战队 | | | |
| 172 | -| fsmzkq | varchar | YES | ②是否满足考勤 | | | |
| 173 | -| zdzzrs | int | YES | ③战队最终人数 | | | |
| 174 | -| kqhbsyzd | int | YES | ④考勤后不属于战队视为单人 | | | |
| 175 | -| zdtc | decimal | YES | ⑤战队提成 | | | |
| 176 | -| ayrtc | decimal | YES | ⑥按1人提成 | | | |
| 177 | -| zztcd | decimal | YES | 最终提成点 | | | |
| 178 | -| jcyjtc | decimal | YES | 基础业绩提成 | | | |
| 179 | -| hzyjtc | decimal | YES | 合作业绩提成 | | | |
| 180 | -| tchj | decimal | YES | 提成合计 | | | |
| 181 | -| grzb | decimal | YES | 个人占比 | | | |
| 182 | -| zyhj | decimal | YES | 组员合计 | | | |
| 183 | -| gwtc | decimal | YES | 顾问提成 | | | |
| 158 | +| F_Id | varchar(50) | NO | 主键 | PRI | | |
| 159 | +| yf | varchar(50) | YES | 月份 | | | |
| 160 | +| jsj | varchar(50) | YES | 金三角 | | | |
| 161 | +| md | varchar(255) | YES | 门店ID | | | |
| 162 | + | |
| 163 | +**业务说明**: | |
| 164 | +- 这是金三角基础信息表,只记录金三角的基本信息 | |
| 165 | +- 金三角与用户的绑定关系通过 `lq_jinsanjiao_user` 表管理 | |
| 166 | +- 金三角的业绩统计等数据通过业务逻辑计算,不存储在此表中 | |
| 167 | + | |
| 168 | +#### lq_jinsanjiao_user (金三角用户绑定关系) | |
| 169 | +| 字段名 | 数据类型 | 是否可空 | 字段说明 | 主键 | | |
| 170 | +|--------|----------|----------|----------|------| | |
| 171 | +| F_Id | varchar(50) | NO | 主键 | PRI | | |
| 172 | +| jsj_id | varchar(50) | NO | 金三角ID(关联lq_ycsd_jsj.F_Id) | | | |
| 173 | +| user_id | varchar(50) | NO | 用户ID(关联BASE_USER.F_Id) | | | |
| 174 | +| user_name | varchar(50) | NO | 用户姓名 | | | |
| 175 | +| is_leader | int(11) | YES | 是否顾问(0-否,1-是) | | | |
| 176 | +| status | varchar(20) | YES | 状态(ACTIVE-活跃,INACTIVE-非活跃) | | | |
| 177 | +| sort_order | int(11) | YES | 排序 | | | |
| 178 | +| F_CreatorTime | datetime | YES | 创建时间 | | | |
| 179 | +| F_CreatorUserId | varchar(50) | YES | 创建人ID | | | |
| 180 | +| F_LastModifyTime | datetime | YES | 最后修改时间 | | | |
| 181 | +| F_LastModifyUserId | varchar(50) | YES | 最后修改人ID | | | |
| 182 | +| F_DeleteMark | int(11) | YES | 删除标记 | | | |
| 183 | + | |
| 184 | +**业务说明**: | |
| 185 | +- 这是金三角与用户的绑定关系表,管理金三角成员信息 | |
| 186 | +- 支持多人或单人金三角,通过 `is_leader` 字段标识队长 | |
| 187 | +- 支持用户在不同金三角间流动,通过 `status` 字段管理状态 | |
| 188 | +- 通过 `sort_order` 字段控制成员排序 | |
| 184 | 189 | |
| 185 | 190 | ### 6. 开单相关表 |
| 186 | 191 | |
| ... | ... | @@ -246,20 +251,21 @@ |
| 246 | 251 | ## 表关联关系 |
| 247 | 252 | |
| 248 | 253 | ### 主要关联关系 |
| 249 | -1. **门店与人员**:`lq_mdxx.dm` ↔ `lq_ryzl.dm` | |
| 250 | -2. **人员与业绩**:`lq_ryzl.xm` ↔ `lq_yjmxb.jks` | |
| 254 | +1. **门店与人员**:`lq_mdxx.dm` ↔ `BASE_USER.F_MDID` (人员信息已迁移到系统用户表) | |
| 255 | +2. **人员与业绩**:`BASE_USER.F_REALNAME` ↔ `lq_yjmxb.jks` (通过姓名关联) | |
| 251 | 256 | 3. **项目与业绩**:`lq_xmzl.xmbh` ↔ `lq_yjmxb.xmbh` |
| 252 | 257 | 4. **门店与业绩**:`lq_mdxx.mdbm` ↔ `lq_yjmxb.mdbh` |
| 253 | -5. **金三角设定与人员**:`lq_ycsd_jsj.jks` ↔ `lq_ryzl.xm` | |
| 254 | -6. **开单记录与门店**:`lq_kd_kdjlb.djmd` ↔ `lq_mdxx.dm` | |
| 255 | -7. **开单记录与金三角**:`lq_kd_kdjlb.jsj` ↔ `lq_ycsd_jsj.jsj` | |
| 256 | -8. **开单记录与业绩**:`lq_kd_kdjlb.F_Id` ↔ `lq_yjmxb.F_Id` (通过开单编号关联) | |
| 257 | -9. **门店与新店保护时间**:`lq_mdxx.F_Id` ↔ `lq_md_xdbhsj.mdid` | |
| 258 | +5. **金三角设定与用户绑定**:`lq_ycsd_jsj.F_Id` ↔ `lq_jinsanjiao_user.jsj_id` | |
| 259 | +6. **金三角用户绑定与用户**:`lq_jinsanjiao_user.user_id` ↔ `BASE_USER.F_Id` | |
| 260 | +7. **开单记录与门店**:`lq_kd_kdjlb.djmd` ↔ `lq_mdxx.dm` | |
| 261 | +8. **开单记录与金三角**:`lq_kd_kdjlb.jsj` ↔ `lq_ycsd_jsj.jsj` | |
| 262 | +9. **开单记录与业绩**:`lq_kd_kdjlb.F_Id` ↔ `lq_yjmxb.F_Id` (通过开单编号关联) | |
| 263 | +10. **门店与新店保护时间**:`lq_mdxx.F_Id` ↔ `lq_md_xdbhsj.mdid` | |
| 258 | 264 | |
| 259 | 265 | ### 业务逻辑关联 |
| 260 | 266 | - **开单记录表是核心业务表**:所有业务操作都围绕开单进行,是系统的业务中心 |
| 261 | 267 | - 门店信息是基础数据,人员、业绩、金三角设定都依赖门店 |
| 262 | -- 人员资料包含战队信息,与金三角设定表关联 | |
| 268 | +- **人员信息已迁移**:人员资料现在使用系统用户表 `BASE_USER` 管理,包含门店ID、职位等扩展字段 | |
| 263 | 269 | - 业绩明细表从开单记录表衍生,用于业绩统计和薪酬计算 |
| 264 | 270 | - 金三角设定表用于薪酬计算,关联人员业绩数据 |
| 265 | 271 | - 开单记录表包含完整的业务信息:客户、业绩、付款、品项等 |
| ... | ... | @@ -271,10 +277,12 @@ |
| 271 | 277 | ### 门店状态 (lq_mdxx.zxzt) |
| 272 | 278 | - 待补充具体枚举值 |
| 273 | 279 | |
| 274 | -### 在职情况 (lq_ryzl.zzqk) | |
| 280 | +### 在职情况 (BASE_USER.F_ENABLEDMARK) - ⚠️ 已迁移 | |
| 281 | +- 人员在职状态现在使用系统用户表的 `F_ENABLEDMARK` 字段管理 | |
| 275 | 282 | - 待补充具体枚举值 |
| 276 | 283 | |
| 277 | -### 岗位分类 (lq_ryzl.gwfl1, gwfl2) | |
| 284 | +### 岗位分类 (BASE_USER.F_GWFL, F_GW) - ⚠️ 已迁移 | |
| 285 | +- 岗位信息现在使用系统用户表的 `F_GWFL` 和 `F_GW` 字段管理 | |
| 278 | 286 | - 待补充具体枚举值 |
| 279 | 287 | |
| 280 | 288 | ### 项目分类 (lq_xmzl.fl1, fl2, fl3, fl4) | ... | ... |