Commit bfb7c0b9baafc34bfe68d06852aa54c293e767f1

Authored by “wangming”
1 parent bdf9e891

更新Form.vue和用户相关表单,调整字段名称和增加新字段以支持门店、职位和费用分摊等信息,同时优化了表单布局和样式。修复了部分功能逻辑,确保数据提交和加载的正确性。

.DS_Store
No preview for this file type
antis-ncc-admin/src/api/extend/store.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 获取门店下拉框列表
  4 +export const getStoreSelector = () => {
  5 + return request({
  6 + url: '/api/Extend/LqMdxx/Selector',
  7 + method: 'GET'
  8 + })
  9 +}
antis-ncc-admin/src/views/lqKdKdjlb/Form copy.vue 0 → 100644
  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="90%">
  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="8">
  6 + <el-form-item label="开单编号" prop="id">
  7 + <el-input v-model="dataForm.id" placeholder="请输入" clearable readonly :style='{"width":"100%"}' >
  8 + </el-input>
  9 + </el-form-item>
  10 + </el-col>
  11 + <el-col :span="8">
  12 + <el-form-item label="开单会员" prop="kdhy">
  13 + <el-select v-model="dataForm.kdhy" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
  14 + <el-option v-for="(item, index) in kdhyOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  15 + </el-select>
  16 + </el-form-item>
  17 + </el-col>
  18 + <el-col :span="8" v-if="false" >
  19 + <el-form-item label="开单会员名称" prop="kdhyc">
  20 + <el-input v-model="dataForm.kdhyc" placeholder="请输入" clearable :style='{"width":"100%"}' >
  21 + </el-input>
  22 + </el-form-item>
  23 + </el-col>
  24 + <el-col :span="8" v-if="false" >
  25 + <el-form-item label="会员手机号" prop="kdhysjh">
  26 + <el-input v-model="dataForm.kdhysjh" placeholder="请输入" clearable :style='{"width":"100%"}' >
  27 + </el-input>
  28 + </el-form-item>
  29 + </el-col>
  30 + <el-col :span="8">
  31 + <el-form-item label="单据门店" prop="djmd">
  32 + <el-select v-model="dataForm.djmd" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
  33 + <el-option v-for="(item, index) in djmdOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  34 + </el-select>
  35 + </el-form-item>
  36 + </el-col>
  37 + <el-col :span="8">
  38 + <el-form-item label="金三角" prop="jsj">
  39 + <el-select v-model="dataForm.jsj" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
  40 + <el-option v-for="(item, index) in jsjOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  41 + </el-select>
  42 + </el-form-item>
  43 + </el-col>
  44 + <el-col :span="8" v-if="false">
  45 + <el-form-item label="开单日期" prop="kdrq">
  46 + <el-date-picker v-model="dataForm.kdrq" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" >
  47 + </el-date-picker>
  48 + </el-form-item>
  49 + </el-col>
  50 + <el-col :span="8">
  51 + <el-form-item label="顾客类型" prop="gjlx">
  52 + <el-select v-model="dataForm.gjlx" placeholder="请选择" clearable :style='{"width":"100%"}' >
  53 + <el-option v-for="(item, index) in gjlxOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  54 + </el-select>
  55 + </el-form-item>
  56 + </el-col>
  57 + <el-col :span="8">
  58 + <el-form-item label="整单业绩" prop="zdyj">
  59 + <el-input v-model="dataForm.zdyj" placeholder="请输入" clearable :style='{"width":"100%"}' >
  60 + </el-input>
  61 + </el-form-item>
  62 + </el-col>
  63 + <el-col :span="8">
  64 + <el-form-item label="实付业绩" prop="sfyj">
  65 + <el-input v-model="dataForm.sfyj" placeholder="请输入" clearable :style='{"width":"100%"}' >
  66 + </el-input>
  67 + </el-form-item>
  68 + </el-col>
  69 + <el-col :span="8">
  70 + <el-form-item label="欠款" prop="qk">
  71 + <el-input v-model="dataForm.qk" placeholder="请输入" clearable :style='{"width":"100%"}' >
  72 + </el-input>
  73 + </el-form-item>
  74 + </el-col>
  75 + <el-col :span="8">
  76 + <el-form-item label="是否储扣" prop="sfck">
  77 + <el-radio-group v-model="dataForm.sfck" :style='{}' >
  78 + <el-radio v-for="(item, index) in sfckOptions" :key="index" :label="item.id" >{{item.fullName}}</el-radio>
  79 + </el-radio-group>
  80 + </el-form-item>
  81 + </el-col>
  82 + <el-col :span="8" v-if="dataForm.sfck === '是'">
  83 + <el-form-item label="储扣方式" prop="ckfs">
  84 + <el-select v-model="dataForm.ckfs" placeholder="请选择" clearable :style='{"width":"100%"}' >
  85 + <el-option v-for="(item, index) in ckfsOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  86 + </el-select>
  87 + </el-form-item>
  88 + </el-col>
  89 + <el-col :span="8" v-if="dataForm.sfck === '是'">
  90 + <el-form-item label="储扣明细" prop="ckmx">
  91 + <el-input v-model="dataForm.ckmx" placeholder="请输入" clearable :style='{"width":"100%"}' >
  92 + </el-input>
  93 + </el-form-item>
  94 + </el-col>
  95 + <el-col :span="8">
  96 + <el-form-item label="付款方式" prop="fkfs">
  97 + <el-select v-model="dataForm.fkfs" placeholder="请选择" clearable :style='{"width":"100%"}' >
  98 + <el-option v-for="(item, index) in fkfsOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  99 + </el-select>
  100 + </el-form-item>
  101 + </el-col>
  102 + <el-col :span="8">
  103 + <el-form-item label="付款医院" prop="fkyy">
  104 + <el-select v-model="dataForm.fkyy" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
  105 + <el-option v-for="(item, index) in fkyyOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  106 + </el-select>
  107 + </el-form-item>
  108 + </el-col>
  109 + <el-col :span="8">
  110 + <el-form-item label="合作机构" prop="hgjg">
  111 + <el-select v-model="dataForm.hgjg" placeholder="请选择" clearable :style='{"width":"100%"}' >
  112 + <el-option v-for="(item, index) in hgjgOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  113 + </el-select>
  114 + </el-form-item>
  115 + </el-col>
  116 + <el-col :span="8" v-if="false">
  117 + <el-form-item label="付款判断" prop="fkpd">
  118 + <el-input v-model="dataForm.fkpd" placeholder="请输入" clearable :style='{"width":"100%"}' >
  119 + </el-input>
  120 + </el-form-item>
  121 + </el-col>
  122 + <el-col :span="8" v-if="false">
  123 + <el-form-item label="客户来源" prop="khly">
  124 + <el-select v-model="dataForm.khly" placeholder="请选择" clearable :style='{"width":"100%"}' >
  125 + <el-option v-for="(item, index) in khlyOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  126 + </el-select>
  127 + </el-form-item>
  128 + </el-col>
  129 + <el-col :span="8" v-if="false">
  130 + <el-form-item label="推荐人" prop="tjr">
  131 + <el-input v-model="dataForm.tjr" placeholder="请输入" clearable :style='{"width":"100%"}' >
  132 + </el-input>
  133 + </el-form-item>
  134 + </el-col>
  135 + <el-col :span="8">
  136 + <el-form-item label="是否首开订单" prop="sfskdd">
  137 + <el-radio-group v-model="dataForm.sfskdd" :style='{}' >
  138 + <el-radio v-for="(item, index) in sfskddOptions" :key="index" :label="item.id" >{{item.fullName}}</el-radio>
  139 + </el-radio-group>
  140 + </el-form-item>
  141 + </el-col>
  142 +
  143 + <el-col :span="24">
  144 + <el-form-item label-width="0">
  145 + <el-table :data="dataForm.lqKdJksyjList" size='mini'>
  146 + <el-table-column type="index" width="50" label="序号" align="center" />
  147 + <el-table-column prop="id" label="业绩编号" v-if="false">
  148 + <template slot-scope="scope">
  149 + <el-input v-model="scope.row.id" placeholder="请输入" clearable ></el-input>
  150 + </template>
  151 + </el-table-column>
  152 + <el-table-column prop="glkdbh" label="关联开单编号" v-if="false">
  153 + <template slot-scope="scope">
  154 + <el-input v-model="scope.row.glkdbh" placeholder="请输入" clearable ></el-input>
  155 + </template>
  156 + </el-table-column>
  157 + <el-table-column prop="jks" label="健康师">
  158 + <template slot-scope="scope">
  159 + <user-select v-model="scope.row.jks" placeholder="请选择" clearable ></user-select>
  160 + </template>
  161 + </el-table-column>
  162 + <el-table-column prop="jksxm" label="健康师姓名">
  163 + <template slot-scope="scope">
  164 + <el-input v-model="scope.row.jksxm" placeholder="请输入" clearable ></el-input>
  165 + </template>
  166 + </el-table-column>
  167 + <el-table-column prop="jkszh" label="健康师账号">
  168 + <template slot-scope="scope">
  169 + <el-input v-model="scope.row.jkszh" placeholder="请输入" clearable ></el-input>
  170 + </template>
  171 + </el-table-column>
  172 + <el-table-column prop="jksyj" label="健康师业绩">
  173 + <template slot-scope="scope">
  174 + <el-input v-model="scope.row.jksyj" placeholder="请输入" clearable ></el-input>
  175 + </template>
  176 + </el-table-column>
  177 + <el-table-column prop="yjsj" label="业绩时间" v-if="false">
  178 + <template slot-scope="scope">
  179 + <el-input v-model="scope.row.yjsj" placeholder="请输入" clearable ></el-input>
  180 + </template>
  181 + </el-table-column>
  182 + <el-table-column label="操作" width="50">
  183 + <template slot-scope="scope">
  184 + <el-button size="mini" type="text" class="NCC-table-delBtn" @click="handleDelLqKdJksyjEntityList(scope.$index)">删除</el-button>
  185 + </template>
  186 + </el-table-column>
  187 + </el-table>
  188 + <div class="table-actions" @click="addHandleLqKdJksyjEntityList()">
  189 + <el-button type="text" icon="el-icon-plus">新增</el-button>
  190 + </div>
  191 + </el-form-item>
  192 + </el-col>
  193 + <el-col :span="24">
  194 + <el-form-item label-width="0">
  195 + <el-table :data="dataForm.lqKdKjbsyjList" size='mini'>
  196 + <el-table-column type="index" width="50" label="序号" align="center" />
  197 + <el-table-column prop="id" label="业绩编号" v-if="false">
  198 + <template slot-scope="scope">
  199 + <el-input v-model="scope.row.id" placeholder="请输入" clearable ></el-input>
  200 + </template>
  201 + </el-table-column>
  202 + <el-table-column prop="glkdbh" label="关联开单编号" v-if="false">
  203 + <template slot-scope="scope">
  204 + <el-input v-model="scope.row.glkdbh" placeholder="请输入" clearable ></el-input>
  205 + </template>
  206 + </el-table-column>
  207 + <el-table-column prop="kjbls" label="科技部老师">
  208 + <template slot-scope="scope">
  209 + <user-select v-model="scope.row.kjbls" placeholder="请选择" clearable ></user-select>
  210 + </template>
  211 + </el-table-column>
  212 + <el-table-column prop="kjblsxm" label="科技部老师姓名">
  213 + <template slot-scope="scope">
  214 + <el-input v-model="scope.row.kjblsxm" placeholder="请输入" clearable ></el-input>
  215 + </template>
  216 + </el-table-column>
  217 + <el-table-column prop="kjblszh" label="科技部老师账号">
  218 + <template slot-scope="scope">
  219 + <el-input v-model="scope.row.kjblszh" placeholder="请输入" clearable ></el-input>
  220 + </template>
  221 + </el-table-column>
  222 + <el-table-column prop="kjblsyj" label="科技部老师业绩">
  223 + <template slot-scope="scope">
  224 + <el-input v-model="scope.row.kjblsyj" placeholder="请输入" clearable ></el-input>
  225 + </template>
  226 + </el-table-column>
  227 + <el-table-column prop="yjsj" label="业绩时间" v-if="false">
  228 + <template slot-scope="scope">
  229 + <el-input v-model="scope.row.yjsj" placeholder="请输入" clearable ></el-input>
  230 + </template>
  231 + </el-table-column>
  232 + <el-table-column label="操作" width="50">
  233 + <template slot-scope="scope">
  234 + <el-button size="mini" type="text" class="NCC-table-delBtn" @click="handleDelLqKdKjbsyjEntityList(scope.$index)">删除</el-button>
  235 + </template>
  236 + </el-table-column>
  237 + </el-table>
  238 + <div class="table-actions" @click="addHandleLqKdKjbsyjEntityList()">
  239 + <el-button type="text" icon="el-icon-plus">新增</el-button>
  240 + </div>
  241 + </el-form-item>
  242 + </el-col>
  243 + <el-col :span="24">
  244 + <el-form-item label-width="0">
  245 + <el-table :data="dataForm.lqKdPxmxList" size='mini'>
  246 + <el-table-column type="index" width="50" label="序号" align="center" />
  247 + <el-table-column prop="id" label="明细编号" v-if="false">
  248 + <template slot-scope="scope">
  249 + <el-input v-model="scope.row.id" placeholder="请输入" clearable ></el-input>
  250 + </template>
  251 + </el-table-column>
  252 + <el-table-column prop="glkdbh" label="关联开单编号" v-if="false">
  253 + <template slot-scope="scope">
  254 + <el-input v-model="scope.row.glkdbh" placeholder="请输入" clearable ></el-input>
  255 + </template>
  256 + </el-table-column>
  257 + <el-table-column prop="px" label="品项">
  258 + <template slot-scope="scope">
  259 + <el-select v-model="scope.row.px" placeholder="请选择" clearable >
  260 + <el-option v-for="(item, index) in pxOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
  261 + </el-select>
  262 + </template>
  263 + </el-table-column>
  264 + <el-table-column prop="pxmc" label="品项名称">
  265 + <template slot-scope="scope">
  266 + <el-input v-model="scope.row.pxmc" placeholder="请输入" clearable ></el-input>
  267 + </template>
  268 + </el-table-column>
  269 + <el-table-column prop="pxjg" label="品项价格">
  270 + <template slot-scope="scope">
  271 + <el-input v-model="scope.row.pxjg" placeholder="请输入" clearable ></el-input>
  272 + </template>
  273 + </el-table-column>
  274 + <el-table-column label="操作" width="50">
  275 + <template slot-scope="scope">
  276 + <el-button size="mini" type="text" class="NCC-table-delBtn" @click="handleDelLqKdPxmxEntityList(scope.$index)">删除</el-button>
  277 + </template>
  278 + </el-table-column>
  279 + </el-table>
  280 + <div class="table-actions" @click="addHandleLqKdPxmxEntityList()">
  281 + <el-button type="text" icon="el-icon-plus">新增</el-button>
  282 + </div>
  283 + </el-form-item>
  284 + </el-col>
  285 +
  286 + <el-col :span="24">
  287 + <el-form-item label="简介" prop="jj">
  288 + <el-input v-model="dataForm.jj" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' >
  289 + </el-input>
  290 + </el-form-item>
  291 + </el-col>
  292 + <el-col :span="24">
  293 + <el-form-item label="上传文件" prop="scwj">
  294 + <NCC-UploadImg v-model="dataForm.scwj" :fileSize="30" sizeUnit="MB" :limit="9" >
  295 + </NCC-UploadImg>
  296 + </el-form-item>
  297 + </el-col>
  298 + <el-col :span="24">
  299 + <el-form-item label="会员签字" prop="hyqz">
  300 + <NCC-UploadImg v-model="dataForm.hyqz" :fileSize="5" sizeUnit="MB" :limit="9" >
  301 + </NCC-UploadImg>
  302 + </el-form-item>
  303 + </el-col>
  304 + <el-col :span="24">
  305 + <el-form-item label="备注" prop="bz">
  306 + <el-input v-model="dataForm.bz" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' >
  307 + </el-input>
  308 + </el-form-item>
  309 + </el-col>
  310 + <el-col :span="24">
  311 + <el-form-item label="健康师业绩" prop="jksyj" v-if="false">
  312 + <el-input v-model="dataForm.jksyj" placeholder="请输入" clearable :style='{"width":"100%"}' >
  313 + </el-input>
  314 + </el-form-item>
  315 + </el-col>
  316 + <el-col :span="24">
  317 + <el-form-item label="科技部老师业绩" prop="kjblsyj" v-if="false">
  318 + <el-input v-model="dataForm.kjblsyj" placeholder="请输入" clearable :style='{"width":"100%"}' >
  319 + </el-input>
  320 + </el-form-item>
  321 + </el-col>
  322 + <el-col :span="24">
  323 + <el-form-item label="品项信息" prop="pxxx" v-if="false">
  324 + <el-input v-model="dataForm.pxxx" placeholder="请输入" clearable :style='{"width":"100%"}' >
  325 + </el-input>
  326 + </el-form-item>
  327 + </el-col>
  328 + </el-form>
  329 + </el-row>
  330 + <span slot="footer" class="dialog-footer">
  331 + <el-button @click="visible = false">取 消</el-button>
  332 + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button>
  333 + </span>
  334 + </el-dialog>
  335 +</template>
  336 +<script>
  337 + import request from '@/utils/request'
  338 + import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
  339 + import { previewDataInterface } from '@/api/systemData/dataInterface'
  340 + import { getUserInfo } from '@/api/permission/user'
  341 + export default {
  342 + components: {},
  343 + props: [],
  344 + data() {
  345 + return {
  346 + loading: false,
  347 + visible: false,
  348 + isDetail: false,
  349 + dataForm: {
  350 + id:'',
  351 + id:undefined,
  352 + kdhy:undefined,
  353 + kdhyc:undefined,
  354 + kdhysjh:undefined,
  355 + djmd:undefined,
  356 + jsj:undefined,
  357 + kdrq:undefined,
  358 + gjlx:undefined,
  359 + hgjg:undefined,
  360 + zdyj:undefined,
  361 + sfyj:undefined,
  362 + qk:undefined,
  363 + ckfs:undefined,
  364 + ckmx:undefined,
  365 + fkfs:undefined,
  366 + fkyy:undefined,
  367 + fkpd:undefined,
  368 + khly:undefined,
  369 + tjr:undefined,
  370 + sfskdd:undefined,
  371 + sfck:undefined,
  372 + jj:undefined,
  373 + scwj:[],
  374 + hyqz:[],
  375 + bz:undefined,
  376 + lqKdJksyjList:[],
  377 + lqKdKjbsyjList:[],
  378 + lqKdPxmxList:[],
  379 + jksyj:undefined,
  380 + kjblsyj:undefined,
  381 + pxxx:undefined,
  382 + },
  383 + rules: {
  384 + },
  385 + kdhyOptions : [],
  386 + djmdOptions : [],
  387 + jsjOptions : [],
  388 + gjlxOptions:[{"fullName":"会员","id":"会员"},{"fullName":"非会员","id":"非会员"}],
  389 + hgjgOptions : [],
  390 + ckfsOptions:[{"fullName":"储值卡","id":"储值卡"},{"fullName":"扣项","id":"扣项"},{"fullName":"套餐","id":"套餐"}],
  391 + fkfsOptions:[{"fullName":"现金","id":"现金"},{"fullName":"微信","id":"微信"},{"fullName":"支付宝","id":"支付宝"},{"fullName":"银行卡","id":"银行卡"},{"fullName":"医院","id":"医院"}],
  392 + fkyyOptions : [],
  393 + khlyOptions:[{"fullName":"自然到店","id":"自然到店"},{"fullName":"会员推广","id":"会员推广"},{"fullName":"网络推广","id":"网络推广"}],
  394 + sfskddOptions:[{"fullName":"是","id":"是"},{"fullName":"否","id":"否"}],
  395 + sfckOptions:[{"fullName":"是","id":"是"},{"fullName":"否","id":"否"}],
  396 + pxOptions : [],
  397 + }
  398 + },
  399 + computed: {},
  400 + watch: {
  401 + 'dataForm.zdyj': {
  402 + handler(newVal) {
  403 + this.calculateQk();
  404 + }
  405 + },
  406 + 'dataForm.sfyj': {
  407 + handler(newVal) {
  408 + this.calculateQk();
  409 + }
  410 + }
  411 + },
  412 + created() {
  413 + this.getkdhyOptions();
  414 + this.getdjmdOptions();
  415 + this.getjsjOptions();
  416 + this.gethgjgOptions();
  417 + this.getfkyyOptions();
  418 + this.getpxOptions();
  419 + },
  420 + mounted() {
  421 + },
  422 + methods: {
  423 + getkdhyOptions(){
  424 + previewDataInterface('730998109110273285').then(res => {
  425 + this.kdhyOptions = res.data
  426 + });
  427 + },
  428 + getdjmdOptions(){
  429 + previewDataInterface('730960205902251269').then(res => {
  430 + this.djmdOptions = res.data
  431 + });
  432 + },
  433 + getjsjOptions(){
  434 + previewDataInterface('733894897408410885').then(res => {
  435 + this.jsjOptions = res.data
  436 + });
  437 + },
  438 + gethgjgOptions(){
  439 + previewDataInterface('733896629660157189').then(res => {
  440 + this.hgjgOptions = res.data
  441 + });
  442 + },
  443 + getfkyyOptions(){
  444 + previewDataInterface('733898797075137797').then(res => {
  445 + this.fkyyOptions = res.data
  446 + });
  447 + },
  448 + getpxOptions(){
  449 + previewDataInterface('730971133356016901').then(res => {
  450 + this.pxOptions = res.data
  451 + });
  452 + },
  453 + goBack() {
  454 + this.$emit('refresh')
  455 + },
  456 + init(id, isDetail) {
  457 + this.dataForm.id = id || 0;
  458 + this.visible = true;
  459 + this.isDetail = isDetail || false;
  460 + this.$nextTick(() => {
  461 + this.$refs['elForm'].resetFields();
  462 + if (this.dataForm.id) {
  463 + request({
  464 + url: '/api/Extend/LqKdKdjlb/' + this.dataForm.id,
  465 + method: 'get'
  466 + }).then(res =>{
  467 + this.dataForm = res.data;
  468 + if(!this.dataForm.scwj)this.dataForm.scwj=[];
  469 + if(!this.dataForm.hyqz)this.dataForm.hyqz=[];
  470 + })
  471 + } else {
  472 + // 新增时获取当前用户门店
  473 + this.getCurrentUserStore();
  474 + }
  475 + })
  476 + },
  477 + getCurrentUserStore() {
  478 + getUserInfo().then(res => {
  479 + if (res.data && res.data.organizeId) {
  480 + this.dataForm.djmd = res.data.organizeId;
  481 + }
  482 + }).catch(() => {
  483 + // 获取失败时忽略
  484 + });
  485 + },
  486 + calculateQk() {
  487 + const zdyj = parseFloat(this.dataForm.zdyj) || 0;
  488 + const sfyj = parseFloat(this.dataForm.sfyj) || 0;
  489 + this.dataForm.qk = (zdyj - sfyj).toFixed(2);
  490 + },
  491 + dataFormSubmit() {
  492 + this.$refs['elForm'].validate((valid) => {
  493 + if (valid) {
  494 + if (!this.dataForm.id) {
  495 + request({
  496 + url: `/api/Extend/LqKdKdjlb`,
  497 + method: 'post',
  498 + data: this.dataForm,
  499 + }).then((res) => {
  500 + this.$message({
  501 + message: res.msg,
  502 + type: 'success',
  503 + duration: 1000,
  504 + onClose: () => {
  505 + this.visible = false,
  506 + this.$emit('refresh', true)
  507 + }
  508 + })
  509 + })
  510 + } else {
  511 + request({
  512 + url: '/api/Extend/LqKdKdjlb/' + this.dataForm.id,
  513 + method: 'PUT',
  514 + data: this.dataForm
  515 + }).then((res) => {
  516 + this.$message({
  517 + message: res.msg,
  518 + type: 'success',
  519 + duration: 1000,
  520 + onClose: () => {
  521 + this.visible = false
  522 + this.$emit('refresh', true)
  523 + }
  524 + })
  525 + })
  526 + }
  527 + }
  528 + })
  529 + },
  530 + addHandleLqKdJksyjEntityList() {
  531 + let item = {
  532 + id:undefined,
  533 + glkdbh:undefined,
  534 + jks:undefined,
  535 + jksxm:undefined,
  536 + jkszh:undefined,
  537 + jksyj:undefined,
  538 + yjsj:undefined,
  539 + }
  540 + this.dataForm.lqKdJksyjList.push(item)
  541 + },
  542 + handleDelLqKdJksyjEntityList(index) {
  543 + this.dataForm.lqKdJksyjList.splice(index, 1);
  544 + },
  545 + addHandleLqKdKjbsyjEntityList() {
  546 + let item = {
  547 + id:undefined,
  548 + glkdbh:undefined,
  549 + kjbls:undefined,
  550 + kjblsxm:undefined,
  551 + kjblszh:undefined,
  552 + kjblsyj:undefined,
  553 + yjsj:undefined,
  554 + }
  555 + this.dataForm.lqKdKjbsyjList.push(item)
  556 + },
  557 + handleDelLqKdKjbsyjEntityList(index) {
  558 + this.dataForm.lqKdKjbsyjList.splice(index, 1);
  559 + },
  560 + addHandleLqKdPxmxEntityList() {
  561 + let item = {
  562 + id:undefined,
  563 + glkdbh:undefined,
  564 + px:undefined,
  565 + pxmc:undefined,
  566 + pxjg:undefined,
  567 + }
  568 + this.dataForm.lqKdPxmxList.push(item)
  569 + },
  570 + handleDelLqKdPxmxEntityList(index) {
  571 + this.dataForm.lqKdPxmxList.splice(index, 1);
  572 + },
  573 + }
  574 + }
  575 +</script>
antis-ncc-admin/src/views/lqKdKdjlb/Form.vue
1 <template> 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="90%">  
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="8">  
6 - <el-form-item label="开单编号" prop="id">  
7 - <el-input v-model="dataForm.id" placeholder="请输入" clearable readonly :style='{"width":"100%"}' >  
8 - </el-input>  
9 - </el-form-item>  
10 - </el-col>  
11 - <el-col :span="8">  
12 - <el-form-item label="开单会员" prop="kdhy">  
13 - <el-select v-model="dataForm.kdhy" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >  
14 - <el-option v-for="(item, index) in kdhyOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>  
15 - </el-select>  
16 - </el-form-item>  
17 - </el-col>  
18 - <el-col :span="8" v-if="false" >  
19 - <el-form-item label="开单会员名称" prop="kdhyc">  
20 - <el-input v-model="dataForm.kdhyc" placeholder="请输入" clearable :style='{"width":"100%"}' >  
21 - </el-input>  
22 - </el-form-item>  
23 - </el-col>  
24 - <el-col :span="8" v-if="false" >  
25 - <el-form-item label="会员手机号" prop="kdhysjh">  
26 - <el-input v-model="dataForm.kdhysjh" placeholder="请输入" clearable :style='{"width":"100%"}' >  
27 - </el-input>  
28 - </el-form-item>  
29 - </el-col>  
30 - <el-col :span="8">  
31 - <el-form-item label="单据门店" prop="djmd">  
32 - <el-select v-model="dataForm.djmd" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >  
33 - <el-option v-for="(item, index) in djmdOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>  
34 - </el-select>  
35 - </el-form-item>  
36 - </el-col>  
37 - <el-col :span="8">  
38 - <el-form-item label="金三角" prop="jsj">  
39 - <el-select v-model="dataForm.jsj" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >  
40 - <el-option v-for="(item, index) in jsjOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>  
41 - </el-select>  
42 - </el-form-item>  
43 - </el-col>  
44 - <el-col :span="8">  
45 - <el-form-item label="开单日期" prop="kdrq">  
46 - <el-date-picker v-model="dataForm.kdrq" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" >  
47 - </el-date-picker>  
48 - </el-form-item>  
49 - </el-col>  
50 - <el-col :span="8">  
51 - <el-form-item label="顾客类型" prop="gjlx">  
52 - <el-select v-model="dataForm.gjlx" placeholder="请选择" clearable :style='{"width":"100%"}' >  
53 - <el-option v-for="(item, index) in gjlxOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>  
54 - </el-select>  
55 - </el-form-item>  
56 - </el-col>  
57 - <el-col :span="8">  
58 - <el-form-item label="合作机构" prop="hgjg">  
59 - <el-select v-model="dataForm.hgjg" placeholder="请选择" clearable :style='{"width":"100%"}' >  
60 - <el-option v-for="(item, index) in hgjgOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>  
61 - </el-select>  
62 - </el-form-item>  
63 - </el-col>  
64 - <el-col :span="8">  
65 - <el-form-item label="整单业绩" prop="zdyj">  
66 - <el-input v-model="dataForm.zdyj" placeholder="请输入" clearable :style='{"width":"100%"}' >  
67 - </el-input>  
68 - </el-form-item>  
69 - </el-col>  
70 - <el-col :span="8">  
71 - <el-form-item label="实付业绩" prop="sfyj">  
72 - <el-input v-model="dataForm.sfyj" placeholder="请输入" clearable :style='{"width":"100%"}' >  
73 - </el-input>  
74 - </el-form-item>  
75 - </el-col>  
76 - <el-col :span="8">  
77 - <el-form-item label="欠款" prop="qk">  
78 - <el-input v-model="dataForm.qk" placeholder="请输入" clearable :style='{"width":"100%"}' >  
79 - </el-input>  
80 - </el-form-item>  
81 - </el-col>  
82 - <el-col :span="8">  
83 - <el-form-item label="储扣方式" prop="ckfs">  
84 - <el-select v-model="dataForm.ckfs" placeholder="请选择" clearable :style='{"width":"100%"}' >  
85 - <el-option v-for="(item, index) in ckfsOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>  
86 - </el-select>  
87 - </el-form-item>  
88 - </el-col>  
89 - <el-col :span="8">  
90 - <el-form-item label="储扣明细" prop="ckmx">  
91 - <el-input v-model="dataForm.ckmx" placeholder="请输入" clearable :style='{"width":"100%"}' >  
92 - </el-input>  
93 - </el-form-item>  
94 - </el-col>  
95 - <el-col :span="8">  
96 - <el-form-item label="付款方式" prop="fkfs">  
97 - <el-select v-model="dataForm.fkfs" placeholder="请选择" clearable :style='{"width":"100%"}' >  
98 - <el-option v-for="(item, index) in fkfsOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>  
99 - </el-select>  
100 - </el-form-item>  
101 - </el-col>  
102 - <el-col :span="8">  
103 - <el-form-item label="付款医院" prop="fkyy">  
104 - <el-select v-model="dataForm.fkyy" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >  
105 - <el-option v-for="(item, index) in fkyyOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>  
106 - </el-select>  
107 - </el-form-item>  
108 - </el-col>  
109 - <el-col :span="8">  
110 - <el-form-item label="付款判断" prop="fkpd">  
111 - <el-input v-model="dataForm.fkpd" placeholder="请输入" clearable :style='{"width":"100%"}' >  
112 - </el-input>  
113 - </el-form-item>  
114 - </el-col>  
115 - <el-col :span="8">  
116 - <el-form-item label="客户来源" prop="khly">  
117 - <el-select v-model="dataForm.khly" placeholder="请选择" clearable :style='{"width":"100%"}' >  
118 - <el-option v-for="(item, index) in khlyOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>  
119 - </el-select>  
120 - </el-form-item>  
121 - </el-col>  
122 - <el-col :span="8">  
123 - <el-form-item label="推荐人" prop="tjr">  
124 - <el-input v-model="dataForm.tjr" placeholder="请输入" clearable :style='{"width":"100%"}' >  
125 - </el-input>  
126 - </el-form-item>  
127 - </el-col>  
128 - <el-col :span="8">  
129 - <el-form-item label="是否首开订单" prop="sfskdd">  
130 - <el-radio-group v-model="dataForm.sfskdd" :style='{}' >  
131 - <el-radio v-for="(item, index) in sfskddOptions" :key="index" :label="item.id" >{{item.fullName}}</el-radio>  
132 - </el-radio-group>  
133 - </el-form-item>  
134 - </el-col>  
135 -  
136 - <el-col :span="24">  
137 - <el-form-item label-width="0">  
138 - <el-table :data="dataForm.lqKdJksyjList" size='mini'>  
139 - <el-table-column type="index" width="50" label="序号" align="center" />  
140 - <el-table-column prop="id" label="业绩编号" v-if="false">  
141 - <template slot-scope="scope">  
142 - <el-input v-model="scope.row.id" placeholder="请输入" clearable ></el-input>  
143 - </template>  
144 - </el-table-column>  
145 - <el-table-column prop="glkdbh" label="关联开单编号" v-if="false">  
146 - <template slot-scope="scope">  
147 - <el-input v-model="scope.row.glkdbh" placeholder="请输入" clearable ></el-input>  
148 - </template>  
149 - </el-table-column>  
150 - <el-table-column prop="jks" label="健康师">  
151 - <template slot-scope="scope">  
152 - <user-select v-model="scope.row.jks" placeholder="请选择" clearable ></user-select>  
153 - </template>  
154 - </el-table-column>  
155 - <el-table-column prop="jksxm" label="健康师姓名">  
156 - <template slot-scope="scope">  
157 - <el-input v-model="scope.row.jksxm" placeholder="请输入" clearable ></el-input>  
158 - </template>  
159 - </el-table-column>  
160 - <el-table-column prop="jkszh" label="健康师账号">  
161 - <template slot-scope="scope">  
162 - <el-input v-model="scope.row.jkszh" placeholder="请输入" clearable ></el-input>  
163 - </template>  
164 - </el-table-column>  
165 - <el-table-column prop="jksyj" label="健康师业绩">  
166 - <template slot-scope="scope">  
167 - <el-input v-model="scope.row.jksyj" placeholder="请输入" clearable ></el-input>  
168 - </template>  
169 - </el-table-column>  
170 - <el-table-column prop="yjsj" label="业绩时间" v-if="false">  
171 - <template slot-scope="scope">  
172 - <el-input v-model="scope.row.yjsj" placeholder="请输入" clearable ></el-input>  
173 - </template>  
174 - </el-table-column>  
175 - <el-table-column label="操作" width="50">  
176 - <template slot-scope="scope">  
177 - <el-button size="mini" type="text" class="NCC-table-delBtn" @click="handleDelLqKdJksyjEntityList(scope.$index)">删除</el-button>  
178 - </template>  
179 - </el-table-column>  
180 - </el-table>  
181 - <div class="table-actions" @click="addHandleLqKdJksyjEntityList()">  
182 - <el-button type="text" icon="el-icon-plus">新增</el-button>  
183 - </div>  
184 - </el-form-item>  
185 - </el-col>  
186 - <el-col :span="24">  
187 - <el-form-item label-width="0">  
188 - <el-table :data="dataForm.lqKdKjbsyjList" size='mini'>  
189 - <el-table-column type="index" width="50" label="序号" align="center" />  
190 - <el-table-column prop="id" label="业绩编号" v-if="false">  
191 - <template slot-scope="scope">  
192 - <el-input v-model="scope.row.id" placeholder="请输入" clearable ></el-input>  
193 - </template>  
194 - </el-table-column>  
195 - <el-table-column prop="glkdbh" label="关联开单编号" v-if="false">  
196 - <template slot-scope="scope">  
197 - <el-input v-model="scope.row.glkdbh" placeholder="请输入" clearable ></el-input>  
198 - </template>  
199 - </el-table-column>  
200 - <el-table-column prop="kjbls" label="科技部老师">  
201 - <template slot-scope="scope">  
202 - <user-select v-model="scope.row.kjbls" placeholder="请选择" clearable ></user-select>  
203 - </template>  
204 - </el-table-column>  
205 - <el-table-column prop="kjblsxm" label="科技部老师姓名">  
206 - <template slot-scope="scope">  
207 - <el-input v-model="scope.row.kjblsxm" placeholder="请输入" clearable ></el-input>  
208 - </template>  
209 - </el-table-column>  
210 - <el-table-column prop="kjblszh" label="科技部老师账号">  
211 - <template slot-scope="scope">  
212 - <el-input v-model="scope.row.kjblszh" placeholder="请输入" clearable ></el-input>  
213 - </template>  
214 - </el-table-column>  
215 - <el-table-column prop="kjblsyj" label="科技部老师业绩">  
216 - <template slot-scope="scope">  
217 - <el-input v-model="scope.row.kjblsyj" placeholder="请输入" clearable ></el-input>  
218 - </template>  
219 - </el-table-column>  
220 - <el-table-column prop="yjsj" label="业绩时间" v-if="false">  
221 - <template slot-scope="scope">  
222 - <el-input v-model="scope.row.yjsj" placeholder="请输入" clearable ></el-input>  
223 - </template>  
224 - </el-table-column>  
225 - <el-table-column label="操作" width="50">  
226 - <template slot-scope="scope">  
227 - <el-button size="mini" type="text" class="NCC-table-delBtn" @click="handleDelLqKdKjbsyjEntityList(scope.$index)">删除</el-button>  
228 - </template>  
229 - </el-table-column>  
230 - </el-table>  
231 - <div class="table-actions" @click="addHandleLqKdKjbsyjEntityList()">  
232 - <el-button type="text" icon="el-icon-plus">新增</el-button>  
233 - </div>  
234 - </el-form-item>  
235 - </el-col>  
236 - <el-col :span="24">  
237 - <el-form-item label-width="0">  
238 - <el-table :data="dataForm.lqKdPxmxList" size='mini'>  
239 - <el-table-column type="index" width="50" label="序号" align="center" />  
240 - <el-table-column prop="id" label="明细编号" v-if="false">  
241 - <template slot-scope="scope">  
242 - <el-input v-model="scope.row.id" placeholder="请输入" clearable ></el-input>  
243 - </template>  
244 - </el-table-column>  
245 - <el-table-column prop="glkdbh" label="关联开单编号" v-if="false">  
246 - <template slot-scope="scope">  
247 - <el-input v-model="scope.row.glkdbh" placeholder="请输入" clearable ></el-input>  
248 - </template>  
249 - </el-table-column>  
250 - <el-table-column prop="px" label="品项">  
251 - <template slot-scope="scope">  
252 - <el-select v-model="scope.row.px" placeholder="请选择" clearable >  
253 - <el-option v-for="(item, index) in pxOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>  
254 - </el-select>  
255 - </template>  
256 - </el-table-column>  
257 - <el-table-column prop="pxmc" label="品项名称">  
258 - <template slot-scope="scope">  
259 - <el-input v-model="scope.row.pxmc" placeholder="请输入" clearable ></el-input>  
260 - </template>  
261 - </el-table-column>  
262 - <el-table-column prop="pxjg" label="品项价格">  
263 - <template slot-scope="scope">  
264 - <el-input v-model="scope.row.pxjg" placeholder="请输入" clearable ></el-input>  
265 - </template>  
266 - </el-table-column>  
267 - <el-table-column label="操作" width="50">  
268 - <template slot-scope="scope">  
269 - <el-button size="mini" type="text" class="NCC-table-delBtn" @click="handleDelLqKdPxmxEntityList(scope.$index)">删除</el-button>  
270 - </template>  
271 - </el-table-column>  
272 - </el-table>  
273 - <div class="table-actions" @click="addHandleLqKdPxmxEntityList()">  
274 - <el-button type="text" icon="el-icon-plus">新增</el-button>  
275 - </div>  
276 - </el-form-item>  
277 - </el-col> 2 + <el-dialog :title="!dataForm.id ? '新建开单记录' : isDetail ? '开单记录详情' : '编辑开单记录'" :close-on-click-modal="false"
  3 + :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="1200px">
  4 + <el-row :gutter="10" class="compact-form">
  5 + <el-form ref="elForm" :model="dataForm" size="mini" label-width="100px" label-position="right"
  6 + :disabled="!!isDetail" :rules="rules">
  7 + <!-- 基本信息 -->
  8 + <el-col :span="24">
  9 + <div class="form-section-title">
  10 + <i class="el-icon-user"></i>
  11 + <span>基本信息</span>
  12 + </div>
  13 + </el-col>
  14 + <el-col :span="8" v-if="false">
  15 + <el-form-item label="开单编号" prop="id">
  16 + <el-input v-model="dataForm.id" placeholder="请输入" clearable readonly :style='{"width":"100%"}' >
  17 + </el-input>
  18 + </el-form-item>
  19 + </el-col>
  20 + <el-col :span="6">
  21 + <el-form-item label="开单会员" prop="kdhy" required>
  22 + <el-select v-model="dataForm.kdhy" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
  23 + <el-option v-for="(item, index) in kdhyOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  24 + </el-select>
  25 + </el-form-item>
  26 + </el-col>
  27 + <el-col :span="6">
  28 + <el-form-item label="单据门店" prop="djmd" required>
  29 + <el-select v-model="dataForm.djmd" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
  30 + <el-option v-for="(item, index) in djmdOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  31 + </el-select>
  32 + </el-form-item>
  33 + </el-col>
  34 + <el-col :span="6">
  35 + <el-form-item label="金三角" prop="jsj" required>
  36 + <el-select v-model="dataForm.jsj" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
  37 + <el-option v-for="(item, index) in jsjOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  38 + </el-select>
  39 + </el-form-item>
  40 + </el-col>
  41 + <el-col :span="6">
  42 + <el-form-item label="顾客类型" prop="gjlx" required>
  43 + <el-select v-model="dataForm.gjlx" placeholder="请选择" clearable :style='{"width":"100%"}' >
  44 + <el-option v-for="(item, index) in gjlxOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  45 + </el-select>
  46 + </el-form-item>
  47 + </el-col>
  48 + <el-col :span="8" v-if="false">
  49 + <el-form-item label="开单日期" prop="kdrq">
  50 + <el-date-picker v-model="dataForm.kdrq" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" >
  51 + </el-date-picker>
  52 + </el-form-item>
  53 + </el-col>
  54 + <!-- 业绩信息 -->
  55 + <el-col :span="24">
  56 + <div class="form-section-title">
  57 + <i class="el-icon-money"></i>
  58 + <span>业绩信息</span>
  59 + </div>
  60 + </el-col>
  61 + <el-col :span="6">
  62 + <el-form-item label="整单业绩" prop="zdyj" required>
  63 + <el-input v-model="dataForm.zdyj" placeholder="请输入" clearable :style='{"width":"100%"}' @input="formatNumber('zdyj')">
  64 + <template slot="append">元</template>
  65 + </el-input>
  66 + </el-form-item>
  67 + </el-col>
  68 + <el-col :span="6">
  69 + <el-form-item label="实付业绩" prop="sfyj" required>
  70 + <el-input v-model="dataForm.sfyj" placeholder="请输入" clearable :style='{"width":"100%"}' @input="formatNumber('sfyj')">
  71 + <template slot="append">元</template>
  72 + </el-input>
  73 + </el-form-item>
  74 + </el-col>
  75 + <el-col :span="6">
  76 + <el-form-item label="欠款" prop="qk">
  77 + <el-input v-model="dataForm.qk" placeholder="自动计算" clearable readonly :style='{"width":"100%"}' >
  78 + <template slot="append">元</template>
  79 + </el-input>
  80 + </el-form-item>
  81 + </el-col>
  82 + <el-col :span="6">
  83 + <el-form-item label="是否储扣" prop="sfck">
  84 + <el-radio-group v-model="dataForm.sfck" :style='{}' >
  85 + <el-radio v-for="(item, index) in sfckOptions" :key="index" :label="item.id" >{{item.fullName}}</el-radio>
  86 + </el-radio-group>
  87 + </el-form-item>
  88 + </el-col>
  89 + <el-col :span="6" v-if="dataForm.sfck === '是'">
  90 + <el-form-item label="储扣方式" prop="ckfs">
  91 + <el-select v-model="dataForm.ckfs" placeholder="请选择" clearable :style='{"width":"100%"}' >
  92 + <el-option v-for="(item, index) in ckfsOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  93 + </el-select>
  94 + </el-form-item>
  95 + </el-col>
  96 + <el-col :span="6" v-if="dataForm.sfck === '是'">
  97 + <el-form-item label="储扣明细" prop="ckmx">
  98 + <el-input v-model="dataForm.ckmx" placeholder="请输入" clearable :style='{"width":"100%"}' >
  99 + </el-input>
  100 + </el-form-item>
  101 + </el-col>
  102 + <!-- 付款信息 -->
  103 + <el-col :span="24">
  104 + <div class="form-section-title">
  105 + <i class="el-icon-credit-card"></i>
  106 + <span>付款信息</span>
  107 + </div>
  108 + </el-col>
  109 + <el-col :span="6">
  110 + <el-form-item label="付款方式" prop="fkfs" required>
  111 + <el-select v-model="dataForm.fkfs" placeholder="请选择" clearable :style='{"width":"100%"}' >
  112 + <el-option v-for="(item, index) in fkfsOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  113 + </el-select>
  114 + </el-form-item>
  115 + </el-col>
  116 + <el-col :span="6">
  117 + <el-form-item label="付款医院" prop="fkyy">
  118 + <el-select v-model="dataForm.fkyy" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
  119 + <el-option v-for="(item, index) in fkyyOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  120 + </el-select>
  121 + </el-form-item>
  122 + </el-col>
  123 + <el-col :span="6">
  124 + <el-form-item label="合作机构" prop="hgjg">
  125 + <el-select v-model="dataForm.hgjg" placeholder="请选择" clearable :style='{"width":"100%"}' >
  126 + <el-option v-for="(item, index) in hgjgOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  127 + </el-select>
  128 + </el-form-item>
  129 + </el-col>
  130 + <el-col :span="6">
  131 + <el-form-item label="是否首开订单" prop="sfskdd">
  132 + <el-radio-group v-model="dataForm.sfskdd" :style='{}' >
  133 + <el-radio v-for="(item, index) in sfskddOptions" :key="index" :label="item.id" >{{item.fullName}}</el-radio>
  134 + </el-radio-group>
  135 + </el-form-item>
  136 + </el-col>
  137 + <el-col :span="8" v-if="false">
  138 + <el-form-item label="付款判断" prop="fkpd">
  139 + <el-input v-model="dataForm.fkpd" placeholder="请输入" clearable :style='{"width":"100%"}' >
  140 + </el-input>
  141 + </el-form-item>
  142 + </el-col>
  143 + <el-col :span="8" v-if="false">
  144 + <el-form-item label="客户来源" prop="khly">
  145 + <el-select v-model="dataForm.khly" placeholder="请选择" clearable :style='{"width":"100%"}' >
  146 + <el-option v-for="(item, index) in khlyOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  147 + </el-select>
  148 + </el-form-item>
  149 + </el-col>
  150 + <el-col :span="8" v-if="false">
  151 + <el-form-item label="推荐人" prop="tjr">
  152 + <el-input v-model="dataForm.tjr" placeholder="请输入" clearable :style='{"width":"100%"}' >
  153 + </el-input>
  154 + </el-form-item>
  155 + </el-col>
278 156
279 - <el-col :span="24">  
280 - <el-form-item label="简介" prop="jj">  
281 - <el-input v-model="dataForm.jj" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' >  
282 - </el-input>  
283 - </el-form-item>  
284 - </el-col>  
285 - <el-col :span="24">  
286 - <el-form-item label="上传文件" prop="scwj">  
287 - <NCC-UploadImg v-model="dataForm.scwj" :fileSize="30" sizeUnit="MB" :limit="9" >  
288 - </NCC-UploadImg>  
289 - </el-form-item>  
290 - </el-col>  
291 - <el-col :span="24">  
292 - <el-form-item label="会员签字" prop="hyqz">  
293 - <NCC-UploadImg v-model="dataForm.hyqz" :fileSize="5" sizeUnit="MB" :limit="9" >  
294 - </NCC-UploadImg>  
295 - </el-form-item>  
296 - </el-col>  
297 - <el-col :span="24">  
298 - <el-form-item label="备注" prop="bz">  
299 - <el-input v-model="dataForm.bz" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' >  
300 - </el-input>  
301 - </el-form-item>  
302 - </el-col>  
303 - <el-col :span="24">  
304 - <el-form-item label="健康师业绩" prop="jksyj" v-if="false">  
305 - <el-input v-model="dataForm.jksyj" placeholder="请输入" clearable :style='{"width":"100%"}' >  
306 - </el-input>  
307 - </el-form-item>  
308 - </el-col>  
309 - <el-col :span="24">  
310 - <el-form-item label="科技部老师业绩" prop="kjblsyj" v-if="false">  
311 - <el-input v-model="dataForm.kjblsyj" placeholder="请输入" clearable :style='{"width":"100%"}' >  
312 - </el-input>  
313 - </el-form-item>  
314 - </el-col>  
315 - <el-col :span="24">  
316 - <el-form-item label="品项信息" prop="pxxx" v-if="false">  
317 - <el-input v-model="dataForm.pxxx" placeholder="请输入" clearable :style='{"width":"100%"}' >  
318 - </el-input>  
319 - </el-form-item>  
320 - </el-col>  
321 - </el-form> 157 + <!-- 业绩明细 -->
  158 + <el-col :span="24">
  159 + <div class="form-section-title">
  160 + <i class="el-icon-s-data"></i>
  161 + <span>业绩明细</span>
  162 + </div>
  163 + </el-col>
  164 + <el-col :span="24">
  165 + <el-form-item label-width="0">
  166 + <div class="table-header">
  167 + <span class="table-title">健康师业绩</span>
  168 + <el-button type="primary" size="mini" icon="el-icon-plus" @click="addHandleLqKdJksyjEntityList()">新增健康师</el-button>
  169 + </div>
  170 + <el-table :data="dataForm.lqKdJksyjList" size='mini' border stripe style="width: 100%">
  171 + <el-table-column type="index" width="60" label="序号" align="center" />
  172 + <el-table-column prop="jks" label="健康师" min-width="150">
  173 + <template slot-scope="scope">
  174 + <user-select v-model="scope.row.jks" placeholder="请选择" clearable @change="handleJksChange(scope.$index, scope.row)"></user-select>
  175 + </template>
  176 + </el-table-column>
  177 + <el-table-column prop="jksxm" label="健康师姓名" min-width="120">
  178 + <template slot-scope="scope">
  179 + <el-input v-model="scope.row.jksxm" placeholder="请输入" clearable ></el-input>
  180 + </template>
  181 + </el-table-column>
  182 + <el-table-column prop="jkszh" label="健康师账号" min-width="120">
  183 + <template slot-scope="scope">
  184 + <el-input v-model="scope.row.jkszh" placeholder="请输入" clearable ></el-input>
  185 + </template>
  186 + </el-table-column>
  187 + <el-table-column prop="jksyj" label="健康师业绩" min-width="150">
  188 + <template slot-scope="scope">
  189 + <el-input v-model="scope.row.jksyj" placeholder="请输入" clearable @input="formatTableNumber(scope.$index, 'jksyj', 'lqKdJksyjList')">
  190 + <template slot="append">元</template>
  191 + </el-input>
  192 + </template>
  193 + </el-table-column>
  194 + <el-table-column label="操作" width="80" align="center" fixed="right">
  195 + <template slot-scope="scope">
  196 + <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelLqKdJksyjEntityList(scope.$index)">删除</el-button>
  197 + </template>
  198 + </el-table-column>
  199 + </el-table>
  200 + </el-form-item>
  201 + </el-col>
  202 + <el-col :span="24">
  203 + <el-form-item label-width="0">
  204 + <div class="table-header">
  205 + <span class="table-title">科技部老师业绩</span>
  206 + <el-button type="success" size="mini" icon="el-icon-plus" @click="addHandleLqKdKjbsyjEntityList()">新增科技老师</el-button>
  207 + </div>
  208 + <el-table :data="dataForm.lqKdKjbsyjList" size='mini' border stripe style="width: 100%">
  209 + <el-table-column type="index" width="60" label="序号" align="center" />
  210 + <el-table-column prop="kjbls" label="科技部老师" min-width="150">
  211 + <template slot-scope="scope">
  212 + <user-select v-model="scope.row.kjbls" placeholder="请选择" clearable @change="handleKjblsChange(scope.$index, scope.row)"></user-select>
  213 + </template>
  214 + </el-table-column>
  215 + <el-table-column prop="kjblsxm" label="科技部老师姓名" min-width="120">
  216 + <template slot-scope="scope">
  217 + <el-input v-model="scope.row.kjblsxm" placeholder="请输入" clearable ></el-input>
  218 + </template>
  219 + </el-table-column>
  220 + <el-table-column prop="kjblszh" label="科技部老师账号" min-width="120">
  221 + <template slot-scope="scope">
  222 + <el-input v-model="scope.row.kjblszh" placeholder="请输入" clearable ></el-input>
  223 + </template>
  224 + </el-table-column>
  225 + <el-table-column prop="kjblsyj" label="科技部老师业绩" min-width="150">
  226 + <template slot-scope="scope">
  227 + <el-input v-model="scope.row.kjblsyj" placeholder="请输入" clearable @input="formatTableNumber(scope.$index, 'kjblsyj', 'lqKdKjbsyjList')">
  228 + <template slot="append">元</template>
  229 + </el-input>
  230 + </template>
  231 + </el-table-column>
  232 + <el-table-column label="操作" width="80" align="center" fixed="right">
  233 + <template slot-scope="scope">
  234 + <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelLqKdKjbsyjEntityList(scope.$index)">删除</el-button>
  235 + </template>
  236 + </el-table-column>
  237 + </el-table>
  238 + </el-form-item>
  239 + </el-col>
  240 + <el-col :span="24">
  241 + <el-form-item label-width="0">
  242 + <div class="table-header">
  243 + <span class="table-title">品项明细</span>
  244 + <el-button type="warning" size="mini" icon="el-icon-plus" @click="addHandleLqKdPxmxEntityList()">新增品项</el-button>
  245 + </div>
  246 + <el-table :data="dataForm.lqKdPxmxList" size='mini' border stripe style="width: 100%">
  247 + <el-table-column type="index" width="60" label="序号" align="center" />
  248 + <el-table-column prop="px" label="品项" min-width="150">
  249 + <template slot-scope="scope">
  250 + <el-select v-model="scope.row.px" placeholder="请选择" clearable filterable >
  251 + <el-option v-for="(item, index) in pxOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
  252 + </el-select>
  253 + </template>
  254 + </el-table-column>
  255 + <el-table-column prop="pxmc" label="品项名称" min-width="200">
  256 + <template slot-scope="scope">
  257 + <el-input v-model="scope.row.pxmc" placeholder="请输入品项名称" clearable ></el-input>
  258 + </template>
  259 + </el-table-column>
  260 + <el-table-column prop="pxjg" label="品项价格" min-width="150">
  261 + <template slot-scope="scope">
  262 + <el-input v-model="scope.row.pxjg" placeholder="请输入价格" clearable @input="formatTableNumber(scope.$index, 'pxjg', 'lqKdPxmxList')">
  263 + <template slot="append">元</template>
  264 + </el-input>
  265 + </template>
  266 + </el-table-column>
  267 + <el-table-column label="操作" width="80" align="center" fixed="right">
  268 + <template slot-scope="scope">
  269 + <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelLqKdPxmxEntityList(scope.$index)">删除</el-button>
  270 + </template>
  271 + </el-table-column>
  272 + </el-table>
  273 + </el-form-item>
  274 + </el-col>
  275 +
  276 + <!-- 其他信息 -->
  277 + <el-col :span="24">
  278 + <div class="form-section-title">
  279 + <i class="el-icon-document"></i>
  280 + <span>其他信息</span>
  281 + </div>
  282 + </el-col>
  283 + <el-col :span="24">
  284 + <el-form-item label="简介" prop="jj">
  285 + <el-input v-model="dataForm.jj" placeholder="请输入简介信息" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":3,"maxRows":6}' >
  286 + </el-input>
  287 + </el-form-item>
  288 + </el-col>
  289 + <el-col :span="12">
  290 + <el-form-item label="上传文件" prop="scwj">
  291 + <NCC-UploadImg v-model="dataForm.scwj" :fileSize="30" sizeUnit="MB" :limit="9" >
  292 + </NCC-UploadImg>
  293 + </el-form-item>
  294 + </el-col>
  295 + <el-col :span="12">
  296 + <el-form-item label="会员签字" prop="hyqz">
  297 + <NCC-UploadImg v-model="dataForm.hyqz" :fileSize="5" sizeUnit="MB" :limit="9" >
  298 + </NCC-UploadImg>
  299 + </el-form-item>
  300 + </el-col>
  301 + <el-col :span="24">
  302 + <el-form-item label="备注" prop="bz">
  303 + <el-input v-model="dataForm.bz" placeholder="请输入备注信息" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":3,"maxRows":6}' >
  304 + </el-input>
  305 + </el-form-item>
  306 + </el-col>
  307 + <el-col :span="24">
  308 + <el-form-item label="健康师业绩" prop="jksyj" v-if="false">
  309 + <el-input v-model="dataForm.jksyj" placeholder="请输入" clearable :style='{"width":"100%"}' >
  310 + </el-input>
  311 + </el-form-item>
  312 + </el-col>
  313 + <el-col :span="24">
  314 + <el-form-item label="科技部老师业绩" prop="kjblsyj" v-if="false">
  315 + <el-input v-model="dataForm.kjblsyj" placeholder="请输入" clearable :style='{"width":"100%"}' >
  316 + </el-input>
  317 + </el-form-item>
  318 + </el-col>
  319 + <el-col :span="24">
  320 + <el-form-item label="品项信息" prop="pxxx" v-if="false">
  321 + <el-input v-model="dataForm.pxxx" placeholder="请输入" clearable :style='{"width":"100%"}' >
  322 + </el-input>
  323 + </el-form-item>
  324 + </el-col>
  325 + </el-form>
322 </el-row> 326 </el-row>
323 <span slot="footer" class="dialog-footer"> 327 <span slot="footer" class="dialog-footer">
324 <el-button @click="visible = false">取 消</el-button> 328 <el-button @click="visible = false">取 消</el-button>
  329 + <el-button @click="resetForm" v-if="!isDetail">重 置</el-button>
325 <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> 330 <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button>
326 </span> 331 </span>
327 </el-dialog> 332 </el-dialog>
328 </template> 333 </template>
329 <script> 334 <script>
330 - import request from '@/utils/request'  
331 - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'  
332 - import { previewDataInterface } from '@/api/systemData/dataInterface'  
333 - export default {  
334 - components: {},  
335 - props: [],  
336 - data() {  
337 - return {  
338 - loading: false,  
339 - visible: false,  
340 - isDetail: false,  
341 - dataForm: {  
342 - id:'',  
343 - id:undefined,  
344 - kdhy:undefined,  
345 - kdhyc:undefined,  
346 - kdhysjh:undefined,  
347 - djmd:undefined,  
348 - jsj:undefined,  
349 - kdrq:undefined,  
350 - gjlx:undefined,  
351 - hgjg:undefined,  
352 - zdyj:undefined,  
353 - sfyj:undefined,  
354 - qk:undefined,  
355 - ckfs:undefined,  
356 - ckmx:undefined,  
357 - fkfs:undefined,  
358 - fkyy:undefined,  
359 - fkpd:undefined,  
360 - khly:undefined,  
361 - tjr:undefined,  
362 - sfskdd:undefined,  
363 - jj:undefined,  
364 - scwj:[],  
365 - hyqz:[],  
366 - bz:undefined,  
367 - lqKdJksyjList:[],  
368 - lqKdKjbsyjList:[],  
369 - lqKdPxmxList:[],  
370 - jksyj:undefined,  
371 - kjblsyj:undefined,  
372 - pxxx:undefined,  
373 - },  
374 - rules: {  
375 - },  
376 - kdhyOptions : [],  
377 - djmdOptions : [],  
378 - jsjOptions : [],  
379 - gjlxOptions:[{"fullName":"会员","id":"会员"},{"fullName":"非会员","id":"非会员"}],  
380 - hgjgOptions : [],  
381 - ckfsOptions:[{"fullName":"储值卡","id":"储值卡"},{"fullName":"扣项","id":"扣项"},{"fullName":"套餐","id":"套餐"}],  
382 - fkfsOptions:[{"fullName":"现金","id":"现金"},{"fullName":"微信","id":"微信"},{"fullName":"支付宝","id":"支付宝"},{"fullName":"银行卡","id":"银行卡"},{"fullName":"医院","id":"医院"}],  
383 - fkyyOptions : [],  
384 - khlyOptions:[{"fullName":"自然到店","id":"自然到店"},{"fullName":"会员推广","id":"会员推广"},{"fullName":"网络推广","id":"网络推广"}],  
385 - sfskddOptions:[{"fullName":"是","id":"是"},{"fullName":"否","id":"否"}],  
386 - pxOptions : [], 335 +import request from '@/utils/request'
  336 +import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
  337 +import { previewDataInterface } from '@/api/systemData/dataInterface'
  338 +import { getInfo } from '@/api/user'
  339 +export default {
  340 + components: {},
  341 + props: [],
  342 + data() {
  343 + return {
  344 + loading: false,
  345 + visible: false,
  346 + isDetail: false,
  347 + dataForm: {
  348 + id: '',
  349 + id: undefined,
  350 + kdhy: undefined,
  351 + kdhyc: undefined,
  352 + kdhysjh: undefined,
  353 + djmd: undefined,
  354 + jsj: undefined,
  355 + kdrq: undefined,
  356 + gjlx: undefined,
  357 + hgjg: undefined,
  358 + zdyj: undefined,
  359 + sfyj: undefined,
  360 + qk: undefined,
  361 + ckfs: undefined,
  362 + ckmx: undefined,
  363 + fkfs: undefined,
  364 + fkyy: undefined,
  365 + fkpd: undefined,
  366 + khly: undefined,
  367 + tjr: undefined,
  368 + sfskdd: undefined,
  369 + sfck: undefined,
  370 + jj: undefined,
  371 + scwj: [],
  372 + hyqz: [],
  373 + bz: undefined,
  374 + lqKdJksyjList: [],
  375 + lqKdKjbsyjList: [],
  376 + lqKdPxmxList: [],
  377 + jksyj: undefined,
  378 + kjblsyj: undefined,
  379 + pxxx: undefined,
  380 + },
  381 + rules: {
  382 + kdhy: [
  383 + { required: true, message: '请选择开单会员', trigger: 'change' }
  384 + ],
  385 + djmd: [
  386 + { required: true, message: '请选择单据门店', trigger: 'change' }
  387 + ],
  388 + jsj: [
  389 + { required: true, message: '请选择金三角', trigger: 'change' }
  390 + ],
  391 + gjlx: [
  392 + { required: true, message: '请选择顾客类型', trigger: 'change' }
  393 + ],
  394 + zdyj: [
  395 + { required: true, message: '请输入整单业绩', trigger: 'blur' },
  396 + { pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的金额格式', trigger: 'blur' }
  397 + ],
  398 + sfyj: [
  399 + { required: true, message: '请输入实付业绩', trigger: 'blur' },
  400 + { pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的金额格式', trigger: 'blur' }
  401 + ],
  402 + fkfs: [
  403 + { required: true, message: '请选择付款方式', trigger: 'change' }
  404 + ]
  405 + },
  406 + kdhyOptions: [],
  407 + djmdOptions: [],
  408 + jsjOptions: [],
  409 + gjlxOptions: [{ "fullName": "会员", "id": "会员" }, { "fullName": "非会员", "id": "非会员" }],
  410 + hgjgOptions: [],
  411 + ckfsOptions: [{ "fullName": "储值卡", "id": "储值卡" }, { "fullName": "扣项", "id": "扣项" }, { "fullName": "套餐", "id": "套餐" }],
  412 + fkfsOptions: [{ "fullName": "现金", "id": "现金" }, { "fullName": "微信", "id": "微信" }, { "fullName": "支付宝", "id": "支付宝" }, { "fullName": "银行卡", "id": "银行卡" }, { "fullName": "医院", "id": "医院" }],
  413 + fkyyOptions: [],
  414 + khlyOptions: [{ "fullName": "自然到店", "id": "自然到店" }, { "fullName": "会员推广", "id": "会员推广" }, { "fullName": "网络推广", "id": "网络推广" }],
  415 + sfskddOptions: [{ "fullName": "是", "id": "是" }, { "fullName": "否", "id": "否" }],
  416 + sfckOptions: [{ "fullName": "是", "id": "是" }, { "fullName": "否", "id": "否" }],
  417 + pxOptions: [],
  418 + }
  419 + },
  420 + computed: {},
  421 + watch: {
  422 + 'dataForm.zdyj': {
  423 + handler(newVal) {
  424 + this.calculateQk();
387 } 425 }
388 }, 426 },
389 - computed: {},  
390 - watch: {},  
391 - created() {  
392 - this.getkdhyOptions();  
393 - this.getdjmdOptions();  
394 - this.getjsjOptions();  
395 - this.gethgjgOptions();  
396 - this.getfkyyOptions();  
397 - this.getpxOptions(); 427 + 'dataForm.sfyj': {
  428 + handler(newVal) {
  429 + this.calculateQk();
  430 + }
  431 + }
  432 + },
  433 + created() {
  434 + this.getkdhyOptions();
  435 + this.getdjmdOptions();
  436 + this.getjsjOptions();
  437 + this.gethgjgOptions();
  438 + this.getfkyyOptions();
  439 + this.getpxOptions();
  440 + },
  441 + mounted() {
  442 + },
  443 + methods: {
  444 + getkdhyOptions() {
  445 + previewDataInterface('730998109110273285').then(res => {
  446 + this.kdhyOptions = res.data
  447 + });
398 }, 448 },
399 - mounted() {  
400 - },  
401 - methods: {  
402 - getkdhyOptions(){  
403 - previewDataInterface('730998109110273285').then(res => {  
404 - this.kdhyOptions = res.data  
405 - });  
406 - },  
407 - getdjmdOptions(){  
408 - previewDataInterface('730960205902251269').then(res => {  
409 - this.djmdOptions = res.data  
410 - });  
411 - },  
412 - getjsjOptions(){  
413 - previewDataInterface('733894897408410885').then(res => {  
414 - this.jsjOptions = res.data  
415 - });  
416 - },  
417 - gethgjgOptions(){  
418 - previewDataInterface('733896629660157189').then(res => {  
419 - this.hgjgOptions = res.data  
420 - });  
421 - },  
422 - getfkyyOptions(){  
423 - previewDataInterface('733898797075137797').then(res => {  
424 - this.fkyyOptions = res.data  
425 - });  
426 - },  
427 - getpxOptions(){  
428 - previewDataInterface('730971133356016901').then(res => {  
429 - this.pxOptions = res.data 449 + getdjmdOptions() {
  450 + previewDataInterface('730960205902251269').then(res => {
  451 + this.djmdOptions = res.data
  452 + });
  453 + },
  454 + getjsjOptions() {
  455 + previewDataInterface('733894897408410885').then(res => {
  456 + this.jsjOptions = res.data
  457 + });
  458 + },
  459 + gethgjgOptions() {
  460 + previewDataInterface('733896629660157189').then(res => {
  461 + this.hgjgOptions = res.data
  462 + });
  463 + },
  464 + getfkyyOptions() {
  465 + previewDataInterface('733898797075137797').then(res => {
  466 + this.fkyyOptions = res.data
  467 + });
  468 + },
  469 + getpxOptions() {
  470 + previewDataInterface('730971133356016901').then(res => {
  471 + this.pxOptions = res.data
  472 + });
  473 + },
  474 + goBack() {
  475 + this.$emit('refresh')
  476 + },
  477 + init(id, isDetail) {
  478 + this.dataForm.id = id || 0;
  479 + this.visible = true;
  480 + this.isDetail = isDetail || false;
  481 + this.$nextTick(() => {
  482 + this.$refs['elForm'].resetFields();
  483 + if (this.dataForm.id) {
  484 + request({
  485 + url: '/api/Extend/LqKdKdjlb/' + this.dataForm.id,
  486 + method: 'get'
  487 + }).then(res => {
  488 + this.dataForm = res.data;
  489 + if (!this.dataForm.scwj) this.dataForm.scwj = [];
  490 + if (!this.dataForm.hyqz) this.dataForm.hyqz = [];
  491 + })
  492 + } else {
  493 + // 新增时先加载门店数据,再获取用户门店
  494 + this.loadStoreDataAndSetDefault();
  495 + }
  496 + })
  497 + },
  498 + loadStoreDataAndSetDefault() {
  499 + console.log('开始加载门店数据和用户信息...');
  500 + // 先加载门店数据
  501 + this.loadStoreDataPromise().then(() => {
  502 + // 门店数据加载完成后,获取用户信息
  503 + return this.getCurrentUserStorePromise();
  504 + }).then((userData) => {
  505 + if (userData && userData.mdid) {
  506 + const userStoreId = userData.mdid;
  507 + console.log('用户门店ID:', userStoreId);
  508 + console.log('门店选项列表:', this.djmdOptions);
  509 +
  510 + // 检查用户门店ID是否在门店列表中
  511 + const matchingStore = this.djmdOptions.find(store => store.id === userStoreId);
  512 + if (matchingStore) {
  513 + this.dataForm.djmd = userStoreId;
  514 + console.log('找到匹配的门店,设置默认门店ID:', userStoreId);
  515 + console.log('匹配的门店信息:', matchingStore);
  516 + } else {
  517 + console.warn('用户门店ID在门店列表中未找到匹配项');
  518 + console.log('用户门店ID:', userStoreId);
  519 + console.log('可用门店ID列表:', this.djmdOptions.map(s => s.id));
  520 + }
  521 + } else {
  522 + console.warn('用户数据中没有门店ID,无法设置默认值');
  523 + }
  524 + }).catch(err => {
  525 + console.error('加载数据失败:', err);
  526 + });
  527 + },
  528 + loadStoreDataPromise() {
  529 + // 使用原来的数据接口方式
  530 + return previewDataInterface('730960205902251269').then(res => {
  531 + console.log('门店API原始响应:', res);
  532 + if (res.data && res.data.length > 0) {
  533 + this.djmdOptions = res.data;
  534 + console.log('门店数据加载成功:', this.djmdOptions);
  535 + return res.data;
  536 + } else {
  537 + console.warn('门店数据为空');
  538 + return [];
  539 + }
  540 + }).catch(err => {
  541 + console.error('门店数据加载失败:', err);
  542 + return [];
  543 + });
  544 + },
  545 + getCurrentUserStorePromise() {
  546 + return new Promise((resolve, reject) => {
  547 + getInfo().then(res => {
  548 + resolve(res.data.userInfo);
  549 + }).catch(err => {
  550 + console.error('获取当前用户信息失败:', err);
  551 + reject(err);
430 }); 552 });
431 - },  
432 - goBack() {  
433 - this.$emit('refresh')  
434 - },  
435 - init(id, isDetail) {  
436 - this.dataForm.id = id || 0;  
437 - this.visible = true;  
438 - this.isDetail = isDetail || false;  
439 - this.$nextTick(() => {  
440 - this.$refs['elForm'].resetFields();  
441 - if (this.dataForm.id) { 553 + });
  554 + },
  555 + getCurrentUserStore() {
  556 + getInfo().then(res => {
  557 + if (res.data && res.data.mdid) {
  558 + // 使用mdid字段作为门店ID
  559 + this.dataForm.djmd = res.data.mdid;
  560 + console.log('当前用户门店ID:', res.data.mdid);
  561 + } else {
  562 + console.warn('当前用户没有门店ID信息');
  563 + }
  564 + }).catch(err => {
  565 + console.error('获取当前用户信息失败:', err);
  566 + });
  567 + },
  568 + calculateQk() {
  569 + const zdyj = parseFloat(this.dataForm.zdyj) || 0;
  570 + const sfyj = parseFloat(this.dataForm.sfyj) || 0;
  571 + this.dataForm.qk = (zdyj - sfyj).toFixed(2);
  572 + },
  573 + formatNumber(field) {
  574 + // 移除千分位分隔符,只保留数字和小数点
  575 + let value = this.dataForm[field].toString().replace(/,/g, '');
  576 + // 确保是有效的数字格式
  577 + if (!/^\d*\.?\d*$/.test(value)) {
  578 + value = value.replace(/[^\d.]/g, '');
  579 + }
  580 + // 更新原始值
  581 + this.dataForm[field] = value;
  582 + // 重新计算欠款
  583 + this.calculateQk();
  584 + },
  585 + formatTableNumber(index, field, listName) {
  586 + // 表格中数字格式化
  587 + let value = this.dataForm[listName][index][field].toString().replace(/,/g, '');
  588 + if (!/^\d*\.?\d*$/.test(value)) {
  589 + value = value.replace(/[^\d.]/g, '');
  590 + }
  591 + this.dataForm[listName][index][field] = value;
  592 + },
  593 + handleJksChange(index, row) {
  594 + // 当选择健康师时,自动填充姓名和账号
  595 + if (row.jks) {
  596 + // 这里可以根据用户ID获取用户信息
  597 + // 暂时手动输入
  598 + this.$message.info('请手动输入健康师姓名和账号');
  599 + }
  600 + },
  601 + handleKjblsChange(index, row) {
  602 + // 当选择科技部老师时,自动填充姓名和账号
  603 + if (row.kjbls) {
  604 + // 这里可以根据用户ID获取用户信息
  605 + // 暂时手动输入
  606 + this.$message.info('请手动输入科技部老师姓名和账号');
  607 + }
  608 + },
  609 + resetForm() {
  610 + this.$confirm('确定要重置表单吗?', '提示', {
  611 + confirmButtonText: '确定',
  612 + cancelButtonText: '取消',
  613 + type: 'warning'
  614 + }).then(() => {
  615 + this.$refs['elForm'].resetFields();
  616 + // 重置表格数据
  617 + this.dataForm.lqKdJksyjList = [];
  618 + this.dataForm.lqKdKjbsyjList = [];
  619 + this.dataForm.lqKdPxmxList = [];
  620 + // 重新获取当前用户门店
  621 + if (!this.dataForm.id) {
  622 + this.getCurrentUserStore();
  623 + }
  624 + this.$message.success('表单已重置');
  625 + }).catch(() => {
  626 + // 用户取消
  627 + });
  628 + },
  629 + dataFormSubmit() {
  630 + this.$refs['elForm'].validate((valid) => {
  631 + if (valid) {
  632 + if (!this.dataForm.id) {
  633 + request({
  634 + url: `/api/Extend/LqKdKdjlb`,
  635 + method: 'post',
  636 + data: this.dataForm,
  637 + }).then((res) => {
  638 + this.$message({
  639 + message: res.msg,
  640 + type: 'success',
  641 + duration: 1000,
  642 + onClose: () => {
  643 + this.visible = false,
  644 + this.$emit('refresh', true)
  645 + }
  646 + })
  647 + })
  648 + } else {
442 request({ 649 request({
443 url: '/api/Extend/LqKdKdjlb/' + this.dataForm.id, 650 url: '/api/Extend/LqKdKdjlb/' + this.dataForm.id,
444 - method: 'get'  
445 - }).then(res =>{  
446 - this.dataForm = res.data;  
447 - if(!this.dataForm.scwj)this.dataForm.scwj=[];  
448 - if(!this.dataForm.hyqz)this.dataForm.hyqz=[]; 651 + method: 'PUT',
  652 + data: this.dataForm
  653 + }).then((res) => {
  654 + this.$message({
  655 + message: res.msg,
  656 + type: 'success',
  657 + duration: 1000,
  658 + onClose: () => {
  659 + this.visible = false
  660 + this.$emit('refresh', true)
  661 + }
  662 + })
449 }) 663 })
450 } 664 }
451 - })  
452 - },  
453 - dataFormSubmit() {  
454 - this.$refs['elForm'].validate((valid) => {  
455 - if (valid) {  
456 - if (!this.dataForm.id) {  
457 - request({  
458 - url: `/api/Extend/LqKdKdjlb`,  
459 - method: 'post',  
460 - data: this.dataForm,  
461 - }).then((res) => {  
462 - this.$message({  
463 - message: res.msg,  
464 - type: 'success',  
465 - duration: 1000,  
466 - onClose: () => {  
467 - this.visible = false,  
468 - this.$emit('refresh', true)  
469 - }  
470 - })  
471 - })  
472 - } else {  
473 - request({  
474 - url: '/api/Extend/LqKdKdjlb/' + this.dataForm.id,  
475 - method: 'PUT',  
476 - data: this.dataForm  
477 - }).then((res) => {  
478 - this.$message({  
479 - message: res.msg,  
480 - type: 'success',  
481 - duration: 1000,  
482 - onClose: () => {  
483 - this.visible = false  
484 - this.$emit('refresh', true)  
485 - }  
486 - })  
487 - })  
488 - }  
489 - }  
490 - })  
491 - },  
492 - addHandleLqKdJksyjEntityList() {  
493 - let item = {  
494 - id:undefined,  
495 - glkdbh:undefined,  
496 - jks:undefined,  
497 - jksxm:undefined,  
498 - jkszh:undefined,  
499 - jksyj:undefined,  
500 - yjsj:undefined,  
501 } 665 }
502 - this.dataForm.lqKdJksyjList.push(item)  
503 - },  
504 - handleDelLqKdJksyjEntityList(index) {  
505 - this.dataForm.lqKdJksyjList.splice(index, 1);  
506 - },  
507 - addHandleLqKdKjbsyjEntityList() {  
508 - let item = {  
509 - id:undefined,  
510 - glkdbh:undefined,  
511 - kjbls:undefined,  
512 - kjblsxm:undefined,  
513 - kjblszh:undefined,  
514 - kjblsyj:undefined,  
515 - yjsj:undefined,  
516 - }  
517 - this.dataForm.lqKdKjbsyjList.push(item)  
518 - },  
519 - handleDelLqKdKjbsyjEntityList(index) {  
520 - this.dataForm.lqKdKjbsyjList.splice(index, 1);  
521 - },  
522 - addHandleLqKdPxmxEntityList() {  
523 - let item = {  
524 - id:undefined,  
525 - glkdbh:undefined,  
526 - px:undefined,  
527 - pxmc:undefined,  
528 - pxjg:undefined,  
529 - }  
530 - this.dataForm.lqKdPxmxList.push(item)  
531 - },  
532 - handleDelLqKdPxmxEntityList(index) {  
533 - this.dataForm.lqKdPxmxList.splice(index, 1);  
534 - },  
535 - } 666 + })
  667 + },
  668 + addHandleLqKdJksyjEntityList() {
  669 + let item = {
  670 + id: undefined,
  671 + glkdbh: undefined,
  672 + jks: undefined,
  673 + jksxm: undefined,
  674 + jkszh: undefined,
  675 + jksyj: undefined,
  676 + yjsj: undefined,
  677 + }
  678 + this.dataForm.lqKdJksyjList.push(item)
  679 + },
  680 + handleDelLqKdJksyjEntityList(index) {
  681 + this.dataForm.lqKdJksyjList.splice(index, 1);
  682 + },
  683 + addHandleLqKdKjbsyjEntityList() {
  684 + let item = {
  685 + id: undefined,
  686 + glkdbh: undefined,
  687 + kjbls: undefined,
  688 + kjblsxm: undefined,
  689 + kjblszh: undefined,
  690 + kjblsyj: undefined,
  691 + yjsj: undefined,
  692 + }
  693 + this.dataForm.lqKdKjbsyjList.push(item)
  694 + },
  695 + handleDelLqKdKjbsyjEntityList(index) {
  696 + this.dataForm.lqKdKjbsyjList.splice(index, 1);
  697 + },
  698 + addHandleLqKdPxmxEntityList() {
  699 + let item = {
  700 + id: undefined,
  701 + glkdbh: undefined,
  702 + px: undefined,
  703 + pxmc: undefined,
  704 + pxjg: undefined,
  705 + }
  706 + this.dataForm.lqKdPxmxList.push(item)
  707 + },
  708 + handleDelLqKdPxmxEntityList(index) {
  709 + this.dataForm.lqKdPxmxList.splice(index, 1);
  710 + },
536 } 711 }
  712 +}
537 </script> 713 </script>
  714 +
  715 +<style scoped>
  716 +.form-section-title {
  717 + display: flex;
  718 + align-items: center;
  719 + margin: 15px 0 10px 0;
  720 + padding: 8px 12px;
  721 + background: #409EFF;
  722 + color: white;
  723 + border-radius: 6px;
  724 + font-size: 14px;
  725 + font-weight: 600;
  726 + box-shadow: 0 2px 4px rgba(64, 158, 255, 0.2);
  727 +}
  728 +
  729 +.form-section-title i {
  730 + margin-right: 8px;
  731 + font-size: 18px;
  732 +}
  733 +
  734 +.table-header {
  735 + display: flex;
  736 + justify-content: space-between;
  737 + align-items: center;
  738 + margin-bottom: 8px;
  739 + padding: 8px 12px;
  740 + background: #f5f7fa;
  741 + border-radius: 4px;
  742 + border-left: 3px solid #409EFF;
  743 +}
  744 +
  745 +.table-title {
  746 + font-size: 14px;
  747 + font-weight: 600;
  748 + color: #303133;
  749 +}
  750 +
  751 +.table-actions {
  752 + margin-top: 10px;
  753 + text-align: right;
  754 +}
  755 +
  756 +.el-table {
  757 + border-radius: 6px;
  758 + overflow: hidden;
  759 +}
  760 +
  761 +.el-table th {
  762 + background: #f5f7fa;
  763 + color: #606266;
  764 + font-weight: 600;
  765 +}
  766 +
  767 +.el-form-item {
  768 + margin-bottom: 12px;
  769 +}
  770 +
  771 +.compact-form .el-form-item {
  772 + margin-bottom: 8px;
  773 +}
  774 +
  775 +.el-input-group__append {
  776 + background: #f5f7fa;
  777 + border-color: #dcdfe6;
  778 + color: #606266;
  779 +}
  780 +
  781 +.dialog-footer {
  782 + text-align: right;
  783 + padding: 20px 0;
  784 +}
  785 +
  786 +.dialog-footer .el-button {
  787 + margin-left: 10px;
  788 +}
  789 +
  790 +/* 必填字段标识 */
  791 +.el-form-item.is-required .el-form-item__label::before {
  792 + content: '*';
  793 + color: #f56c6c;
  794 + margin-right: 4px;
  795 +}
  796 +
  797 +/* 数字输入框样式 */
  798 +.el-input-number {
  799 + width: 100%;
  800 +}
  801 +
  802 +/* 表格操作按钮样式 */
  803 +.el-button--mini {
  804 + padding: 5px 10px;
  805 + font-size: 12px;
  806 +}
  807 +
  808 +/* 响应式布局 */
  809 +@media (max-width: 768px) {
  810 + .el-col {
  811 + margin-bottom: 10px;
  812 + }
  813 +
  814 + .form-section-title {
  815 + font-size: 14px;
  816 + padding: 8px 12px;
  817 + }
  818 +
  819 + .table-header {
  820 + flex-direction: column;
  821 + align-items: flex-start;
  822 + gap: 10px;
  823 + }
  824 +}
  825 +</style>
antis-ncc-admin/src/views/permission/user/Form.vue
@@ -40,9 +40,9 @@ @@ -40,9 +40,9 @@
40 </el-form-item> 40 </el-form-item>
41 </el-col> 41 </el-col>
42 <el-col :sm="12" :xs="24"> 42 <el-col :sm="12" :xs="24">
43 - <el-form-item label="组织" prop="organizeId">  
44 - <NCC-TreeSelect v-model="dataForm.organizeId" :options="departmentTreeData"  
45 - placeholder="选择组织" clearable /> 43 + <el-form-item label="门店" prop="mdid">
  44 + <NCC-TreeSelect v-model="dataForm.mdid" :options="storeTreeData"
  45 + placeholder="选择门店" clearable />
46 </el-form-item> 46 </el-form-item>
47 </el-col> 47 </el-col>
48 <el-col :sm="12" :xs="24"> 48 <el-col :sm="12" :xs="24">
@@ -51,10 +51,9 @@ @@ -51,10 +51,9 @@
51 </el-form-item> 51 </el-form-item>
52 </el-col> 52 </el-col>
53 <el-col :sm="12" :xs="24"> 53 <el-col :sm="12" :xs="24">
54 - <el-form-item label="岗位" prop="positionId">  
55 - <NCC-TreeSelect v-model="dataForm.positionId" :options="positionTreeData" multiple  
56 - lastLevel lastLevelKey='type' lastLevelValue='position' placeholder="选择岗位"  
57 - clearable /> 54 + <el-form-item label="组织" prop="organizeId">
  55 + <NCC-TreeSelect v-model="dataForm.organizeId" :options="departmentTreeData"
  56 + placeholder="选择组织" clearable />
58 </el-form-item> 57 </el-form-item>
59 </el-col> 58 </el-col>
60 <el-col :sm="12" :xs="24"> 59 <el-col :sm="12" :xs="24">
@@ -70,6 +69,40 @@ @@ -70,6 +69,40 @@
70 </el-select> 69 </el-select>
71 </el-form-item> 70 </el-form-item>
72 </el-col> 71 </el-col>
  72 + <el-col :sm="12" :xs="24">
  73 + <el-form-item label="费用分摊" prop="fyft">
  74 + <el-select v-model="dataForm.fyft" placeholder="选择费用分摊">
  75 + <el-option label="是" value="是" />
  76 + <el-option label="否" value="否" />
  77 + </el-select>
  78 + </el-form-item>
  79 + </el-col>
  80 + <el-col :sm="12" :xs="24">
  81 + <el-form-item label="职位" prop="gw">
  82 + <el-select v-model="dataForm.gw" placeholder="选择职位">
  83 + <el-option label="董事长" value="董事长" />
  84 + <el-option label="总裁" value="总裁" />
  85 + <el-option label="总经理" value="总经理" />
  86 + <el-option label="经理" value="经理" />
  87 + <el-option label="主管" value="主管" />
  88 + <el-option label="店长" value="店长" />
  89 + <el-option label="店助" value="店助" />
  90 + <el-option label="健康师" value="健康师" />
  91 + <el-option label="主任" value="主任" />
  92 + <el-option label="老师" value="老师" />
  93 + <el-option label="组长" value="组长" />
  94 + <el-option label="科技老师" value="科技老师" />
  95 + </el-select>
  96 + </el-form-item>
  97 + </el-col>
  98 + <el-col :sm="12" :xs="24">
  99 + <el-form-item label="岗位分类" prop="gwfl">
  100 + <el-select v-model="dataForm.gwfl" placeholder="选择岗位分类">
  101 + <el-option label="A" value="A" />
  102 + <el-option label="B" value="B" />
  103 + </el-select>
  104 + </el-form-item>
  105 + </el-col>
73 <el-col :span="12"> 106 <el-col :span="12">
74 <el-form-item label="排序" prop="sortCode"> 107 <el-form-item label="排序" prop="sortCode">
75 <el-input-number :min="0" :max="9999" v-model="dataForm.sortCode" 108 <el-input-number :min="0" :max="9999" v-model="dataForm.sortCode"
@@ -188,9 +221,9 @@ @@ -188,9 +221,9 @@
188 221
189 <script> 222 <script>
190 import { getDepartmentSelector } from '@/api/permission/department' 223 import { getDepartmentSelector } from '@/api/permission/department'
191 -import { getPositionSelector } from '@/api/permission/position'  
192 import { getRoleSelector } from '@/api/permission/role' 224 import { getRoleSelector } from '@/api/permission/role'
193 import { createUser, updateUser, getUserInfo } from '@/api/permission/user' 225 import { createUser, updateUser, getUserInfo } from '@/api/permission/user'
  226 +import { getStoreSelector } from '@/api/extend/store'
194 227
195 export default { 228 export default {
196 data() { 229 data() {
@@ -223,16 +256,20 @@ export default { @@ -223,16 +256,20 @@ export default {
223 email: '', 256 email: '',
224 urgentContacts: '', 257 urgentContacts: '',
225 urgentTelePhone: '', 258 urgentTelePhone: '',
226 - postalAddress: '' 259 + postalAddress: '',
  260 + mdid: '',
  261 + fyft: '否',
  262 + gwfl: '',
  263 + gw: ''
227 }, 264 },
228 roleId: [], 265 roleId: [],
229 departmentTreeData: [], 266 departmentTreeData: [],
230 - positionTreeData: [],  
231 roleTreeData: [], 267 roleTreeData: [],
232 genderTreeData: [], 268 genderTreeData: [],
233 nationTreeData: [], 269 nationTreeData: [],
234 educationTreeData: [], 270 educationTreeData: [],
235 certificatesTypeTreeData: [], 271 certificatesTypeTreeData: [],
  272 + storeTreeData: [],
236 formLoading: false, 273 formLoading: false,
237 genderProps: { 274 genderProps: {
238 value: 'enCode', 275 value: 'enCode',
@@ -271,10 +308,6 @@ export default { @@ -271,10 +308,6 @@ export default {
271 this.departmentTreeData = res.data.list 308 this.departmentTreeData = res.data.list
272 }) 309 })
273 310
274 - // 获取岗位  
275 - getPositionSelector().then(res => {  
276 - this.positionTreeData = res.data.list  
277 - })  
278 311
279 // 获取角色 312 // 获取角色
280 getRoleSelector().then(res => { 313 getRoleSelector().then(res => {
@@ -301,6 +334,13 @@ export default { @@ -301,6 +334,13 @@ export default {
301 this.genderTreeData = res 334 this.genderTreeData = res
302 }) 335 })
303 336
  337 + // 获取门店数据
  338 + getStoreSelector().then(res => {
  339 + this.storeTreeData = res.data.list
  340 + }).catch(() => {
  341 + this.storeTreeData = []
  342 + })
  343 +
304 if (this.dataForm.id) { 344 if (this.dataForm.id) {
305 this.formLoading = true 345 this.formLoading = true
306 getUserInfo(this.dataForm.id).then(res => { 346 getUserInfo(this.dataForm.id).then(res => {
antis-ncc-admin/src/views/permission/user/index.vue
@@ -61,6 +61,15 @@ @@ -61,6 +61,15 @@
61 </el-table-column> 61 </el-table-column>
62 <el-table-column prop="mobilePhone" label="手机" /> 62 <el-table-column prop="mobilePhone" label="手机" />
63 <el-table-column prop="department" label="组织" /> 63 <el-table-column prop="department" label="组织" />
  64 + <el-table-column prop="gwfl" label="岗位分类" width="100" />
  65 + <el-table-column prop="gw" label="职位" width="100" />
  66 + <el-table-column prop="fyft" label="费用分摊" width="100" align="center">
  67 + <template slot-scope="scope">
  68 + <el-tag :type="scope.row.fyft === '是' ? 'success' : 'info'" disable-transitions>
  69 + {{scope.row.fyft || '否'}}
  70 + </el-tag>
  71 + </template>
  72 + </el-table-column>
64 <el-table-column prop="creatorTime" label="创建时间" :formatter="ncc.tableDateFormat" 73 <el-table-column prop="creatorTime" label="创建时间" :formatter="ncc.tableDateFormat"
65 width="120" /> 74 width="120" />
66 <el-table-column prop="sortCode" label="排序" width="70" align="center" /> 75 <el-table-column prop="sortCode" label="排序" width="70" align="center" />
netcore/src/Application/.DS_Store
No preview for this file type
netcore/src/Application/NCC.API.Core/.DS_Store 0 → 100644
No preview for this file type
netcore/src/Modularity/Extend/NCC.Extend/LqBmzbService.cs
1 -using NCC.Common.Core.Manager;  
2 -using NCC.Common.Enum;  
3 -using NCC.Common.Extension;  
4 -using NCC.Common.Filter;  
5 -using NCC.Dependency;  
6 -using NCC.DynamicApiController;  
7 -using NCC.FriendlyException;  
8 -using NCC.Extend.Interfaces.LqBmzb;  
9 -using Mapster;  
10 -using Microsoft.AspNetCore.Mvc;  
11 -using SqlSugar;  
12 -using System;  
13 -using System.Collections.Generic;  
14 -using System.Linq;  
15 -using System.Threading.Tasks;  
16 -using NCC.Extend.Entitys;  
17 -using NCC.Extend.Entitys.Dto.LqBmzb;  
18 -using Yitter.IdGenerator;  
19 -using NCC.Common.Helper;  
20 -using NCC.JsonSerialization;  
21 -using NCC.Common.Model.NPOI;  
22 -using NCC.Common.Configuration;  
23 -using NCC.DataEncryption;  
24 -using NCC.ClayObject; 1 +// using NCC.Common.Core.Manager;
  2 +// using NCC.Common.Enum;
  3 +// using NCC.Common.Extension;
  4 +// using NCC.Common.Filter;
  5 +// using NCC.Dependency;
  6 +// using NCC.DynamicApiController;
  7 +// using NCC.FriendlyException;
  8 +// using NCC.Extend.Interfaces.LqBmzb;
  9 +// using Mapster;
  10 +// using Microsoft.AspNetCore.Mvc;
  11 +// using SqlSugar;
  12 +// using System;
  13 +// using System.Collections.Generic;
  14 +// using System.Linq;
  15 +// using System.Threading.Tasks;
  16 +// using NCC.Extend.Entitys;
  17 +// using NCC.Extend.Entitys.Dto.LqBmzb;
  18 +// using Yitter.IdGenerator;
  19 +// using NCC.Common.Helper;
  20 +// using NCC.JsonSerialization;
  21 +// using NCC.Common.Model.NPOI;
  22 +// using NCC.Common.Configuration;
  23 +// using NCC.DataEncryption;
  24 +// using NCC.ClayObject;
25 25
26 -namespace NCC.Extend.LqBmzb  
27 -{  
28 - /// <summary>  
29 - /// 部门管理服务  
30 - /// </summary>  
31 - [ApiDescriptionSettings(Tag = "Extend",Name = "LqBmzb", Order = 200)]  
32 - [Route("api/Extend/[controller]")]  
33 - public class LqBmzbService : ILqBmzbService, IDynamicApiController, ITransient  
34 - {  
35 - private readonly ISqlSugarRepository<LqBmzbEntity> _lqBmzbRepository;  
36 - private readonly SqlSugarScope _db;  
37 - private readonly IUserManager _userManager; 26 +// namespace NCC.Extend.LqBmzb
  27 +// {
  28 +// /// <summary>
  29 +// /// 部门管理服务
  30 +// /// </summary>
  31 +// [ApiDescriptionSettings(Tag = "Extend",Name = "LqBmzb", Order = 200)]
  32 +// [Route("api/Extend/[controller]")]
  33 +// public class LqBmzbService : ILqBmzbService, IDynamicApiController, ITransient
  34 +// {
  35 +// private readonly ISqlSugarRepository<LqBmzbEntity> _lqBmzbRepository;
  36 +// private readonly SqlSugarScope _db;
  37 +// private readonly IUserManager _userManager;
38 38
39 - /// <summary>  
40 - /// 初始化一个<see cref="LqBmzbService"/>类型的新实例  
41 - /// </summary>  
42 - public LqBmzbService(  
43 - ISqlSugarRepository<LqBmzbEntity> lqBmzbRepository,  
44 - IUserManager userManager)  
45 - {  
46 - _lqBmzbRepository = lqBmzbRepository;  
47 - _db = _lqBmzbRepository.Context;  
48 - _userManager = userManager;  
49 - } 39 +// /// <summary>
  40 +// /// 初始化一个<see cref="LqBmzbService"/>类型的新实例
  41 +// /// </summary>
  42 +// public LqBmzbService(
  43 +// ISqlSugarRepository<LqBmzbEntity> lqBmzbRepository,
  44 +// IUserManager userManager)
  45 +// {
  46 +// _lqBmzbRepository = lqBmzbRepository;
  47 +// _db = _lqBmzbRepository.Context;
  48 +// _userManager = userManager;
  49 +// }
50 50
51 - /// <summary>  
52 - /// 获取部门管理  
53 - /// </summary>  
54 - /// <param name="id">参数</param>  
55 - /// <returns></returns>  
56 - [HttpGet("{id}")]  
57 - public async Task<dynamic> GetInfo(string id)  
58 - {  
59 - var entity = await _db.Queryable<LqBmzbEntity>().FirstAsync(p => p.Id == id);  
60 - var output = entity.Adapt<LqBmzbInfoOutput>();  
61 - return output;  
62 - } 51 +// /// <summary>
  52 +// /// 获取部门管理
  53 +// /// </summary>
  54 +// /// <param name="id">参数</param>
  55 +// /// <returns></returns>
  56 +// [HttpGet("{id}")]
  57 +// public async Task<dynamic> GetInfo(string id)
  58 +// {
  59 +// var entity = await _db.Queryable<LqBmzbEntity>().FirstAsync(p => p.Id == id);
  60 +// var output = entity.Adapt<LqBmzbInfoOutput>();
  61 +// return output;
  62 +// }
63 63
64 - /// <summary>  
65 - /// 获取部门管理列表  
66 - /// </summary>  
67 - /// <param name="input">请求参数</param>  
68 - /// <returns></returns>  
69 - [HttpGet("")]  
70 - public async Task<dynamic> GetList([FromQuery] LqBmzbListQueryInput input)  
71 - {  
72 - var sidx = input.sidx == null ? "id" : input.sidx;  
73 - var data = await _db.Queryable<LqBmzbEntity>()  
74 - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))  
75 - .WhereIF(!string.IsNullOrEmpty(input.bmmc), p => p.Bmmc.Contains(input.bmmc))  
76 - .WhereIF(!string.IsNullOrEmpty(input.bmfl), p => p.Bmfl.Equals(input.bmfl))  
77 - .Select(it=> new LqBmzbListOutput  
78 - {  
79 - id = it.Id,  
80 - bmmc=it.Bmmc,  
81 - bmfl=it.Bmfl,  
82 - }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize);  
83 - return PageResult<LqBmzbListOutput>.SqlSugarPageResult(data);  
84 - } 64 +// /// <summary>
  65 +// /// 获取部门管理列表
  66 +// /// </summary>
  67 +// /// <param name="input">请求参数</param>
  68 +// /// <returns></returns>
  69 +// [HttpGet("")]
  70 +// public async Task<dynamic> GetList([FromQuery] LqBmzbListQueryInput input)
  71 +// {
  72 +// var sidx = input.sidx == null ? "id" : input.sidx;
  73 +// var data = await _db.Queryable<LqBmzbEntity>()
  74 +// .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
  75 +// .WhereIF(!string.IsNullOrEmpty(input.bmmc), p => p.Bmmc.Contains(input.bmmc))
  76 +// .WhereIF(!string.IsNullOrEmpty(input.bmfl), p => p.Bmfl.Equals(input.bmfl))
  77 +// .Select(it=> new LqBmzbListOutput
  78 +// {
  79 +// id = it.Id,
  80 +// bmmc=it.Bmmc,
  81 +// bmfl=it.Bmfl,
  82 +// }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
  83 +// return PageResult<LqBmzbListOutput>.SqlSugarPageResult(data);
  84 +// }
85 85
86 - /// <summary>  
87 - /// 新建部门管理  
88 - /// </summary>  
89 - /// <param name="input">参数</param>  
90 - /// <returns></returns>  
91 - [HttpPost("")]  
92 - public async Task Create([FromBody] LqBmzbCrInput input)  
93 - {  
94 - var userInfo = await _userManager.GetUserInfo();  
95 - var entity = input.Adapt<LqBmzbEntity>();  
96 - entity.Id = YitIdHelper.NextId().ToString();  
97 - var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();  
98 - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);  
99 - } 86 +// /// <summary>
  87 +// /// 新建部门管理
  88 +// /// </summary>
  89 +// /// <param name="input">参数</param>
  90 +// /// <returns></returns>
  91 +// [HttpPost("")]
  92 +// public async Task Create([FromBody] LqBmzbCrInput input)
  93 +// {
  94 +// var userInfo = await _userManager.GetUserInfo();
  95 +// var entity = input.Adapt<LqBmzbEntity>();
  96 +// entity.Id = YitIdHelper.NextId().ToString();
  97 +// var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
  98 +// if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
  99 +// }
100 100
101 - /// <summary>  
102 - /// 获取部门管理无分页列表  
103 - /// </summary>  
104 - /// <param name="input">请求参数</param>  
105 - /// <returns></returns>  
106 - [NonAction]  
107 - public async Task<dynamic> GetNoPagingList([FromQuery] LqBmzbListQueryInput input)  
108 - {  
109 - var sidx = input.sidx == null ? "id" : input.sidx;  
110 - var data = await _db.Queryable<LqBmzbEntity>()  
111 - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))  
112 - .WhereIF(!string.IsNullOrEmpty(input.bmmc), p => p.Bmmc.Contains(input.bmmc))  
113 - .WhereIF(!string.IsNullOrEmpty(input.bmfl), p => p.Bmfl.Equals(input.bmfl))  
114 - .Select(it=> new LqBmzbListOutput  
115 - {  
116 - id = it.Id,  
117 - bmmc=it.Bmmc,  
118 - bmfl=it.Bmfl,  
119 - }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync();  
120 - return data;  
121 - } 101 +// /// <summary>
  102 +// /// 获取部门管理无分页列表
  103 +// /// </summary>
  104 +// /// <param name="input">请求参数</param>
  105 +// /// <returns></returns>
  106 +// [NonAction]
  107 +// public async Task<dynamic> GetNoPagingList([FromQuery] LqBmzbListQueryInput input)
  108 +// {
  109 +// var sidx = input.sidx == null ? "id" : input.sidx;
  110 +// var data = await _db.Queryable<LqBmzbEntity>()
  111 +// .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
  112 +// .WhereIF(!string.IsNullOrEmpty(input.bmmc), p => p.Bmmc.Contains(input.bmmc))
  113 +// .WhereIF(!string.IsNullOrEmpty(input.bmfl), p => p.Bmfl.Equals(input.bmfl))
  114 +// .Select(it=> new LqBmzbListOutput
  115 +// {
  116 +// id = it.Id,
  117 +// bmmc=it.Bmmc,
  118 +// bmfl=it.Bmfl,
  119 +// }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync();
  120 +// return data;
  121 +// }
122 122
123 - /// <summary>  
124 - /// 导出部门管理  
125 - /// </summary>  
126 - /// <param name="input">请求参数</param>  
127 - /// <returns></returns>  
128 - [HttpGet("Actions/Export")]  
129 - public async Task<dynamic> Export([FromQuery] LqBmzbListQueryInput input)  
130 - {  
131 - var userInfo = await _userManager.GetUserInfo();  
132 - var exportData = new List<LqBmzbListOutput>();  
133 - if (input.dataType == 0)  
134 - {  
135 - var data = Clay.Object(await this.GetList(input));  
136 - exportData = data.Solidify<PageResult<LqBmzbListOutput>>().list;  
137 - }  
138 - else  
139 - {  
140 - exportData = await this.GetNoPagingList(input);  
141 - }  
142 - List<ParamsModel> paramList = "[{\"value\":\"部门编号\",\"field\":\"id\"},{\"value\":\"部门名称\",\"field\":\"bmmc\"},{\"value\":\"部门分类\",\"field\":\"bmfl\"},]".ToList<ParamsModel>();  
143 - ExcelConfig excelconfig = new ExcelConfig();  
144 - excelconfig.FileName = "部门管理.xls";  
145 - excelconfig.HeadFont = "微软雅黑";  
146 - excelconfig.HeadPoint = 10;  
147 - excelconfig.IsAllSizeColumn = true;  
148 - excelconfig.ColumnModel = new List<ExcelColumnModel>();  
149 - List<string> selectKeyList = input.selectKey.Split(',').ToList();  
150 - foreach (var item in selectKeyList)  
151 - {  
152 - var isExist = paramList.Find(p => p.field == item);  
153 - if (isExist != null)  
154 - {  
155 - excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value });  
156 - }  
157 - }  
158 - var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName;  
159 - ExcelExportHelper<LqBmzbListOutput>.Export(exportData, excelconfig, addPath);  
160 - var fileName = _userManager.UserId + "|" + addPath + "|xls";  
161 - var output = new  
162 - {  
163 - name = excelconfig.FileName,  
164 - url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC")  
165 - };  
166 - return output;  
167 - } 123 +// /// <summary>
  124 +// /// 导出部门管理
  125 +// /// </summary>
  126 +// /// <param name="input">请求参数</param>
  127 +// /// <returns></returns>
  128 +// [HttpGet("Actions/Export")]
  129 +// public async Task<dynamic> Export([FromQuery] LqBmzbListQueryInput input)
  130 +// {
  131 +// var userInfo = await _userManager.GetUserInfo();
  132 +// var exportData = new List<LqBmzbListOutput>();
  133 +// if (input.dataType == 0)
  134 +// {
  135 +// var data = Clay.Object(await this.GetList(input));
  136 +// exportData = data.Solidify<PageResult<LqBmzbListOutput>>().list;
  137 +// }
  138 +// else
  139 +// {
  140 +// exportData = await this.GetNoPagingList(input);
  141 +// }
  142 +// List<ParamsModel> paramList = "[{\"value\":\"部门编号\",\"field\":\"id\"},{\"value\":\"部门名称\",\"field\":\"bmmc\"},{\"value\":\"部门分类\",\"field\":\"bmfl\"},]".ToList<ParamsModel>();
  143 +// ExcelConfig excelconfig = new ExcelConfig();
  144 +// excelconfig.FileName = "部门管理.xls";
  145 +// excelconfig.HeadFont = "微软雅黑";
  146 +// excelconfig.HeadPoint = 10;
  147 +// excelconfig.IsAllSizeColumn = true;
  148 +// excelconfig.ColumnModel = new List<ExcelColumnModel>();
  149 +// List<string> selectKeyList = input.selectKey.Split(',').ToList();
  150 +// foreach (var item in selectKeyList)
  151 +// {
  152 +// var isExist = paramList.Find(p => p.field == item);
  153 +// if (isExist != null)
  154 +// {
  155 +// excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value });
  156 +// }
  157 +// }
  158 +// var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName;
  159 +// ExcelExportHelper<LqBmzbListOutput>.Export(exportData, excelconfig, addPath);
  160 +// var fileName = _userManager.UserId + "|" + addPath + "|xls";
  161 +// var output = new
  162 +// {
  163 +// name = excelconfig.FileName,
  164 +// url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC")
  165 +// };
  166 +// return output;
  167 +// }
168 168
169 - /// <summary>  
170 - /// 批量删除部门管理  
171 - /// </summary>  
172 - /// <param name="ids">主键数组</param>  
173 - /// <returns></returns>  
174 - [HttpPost("batchRemove")]  
175 - public async Task BatchRemove([FromBody] List<string> ids)  
176 - {  
177 - var entitys = await _db.Queryable<LqBmzbEntity>().In(it => it.Id, ids).ToListAsync();  
178 - if (entitys.Count > 0)  
179 - {  
180 - try  
181 - {  
182 - //开启事务  
183 - _db.BeginTran();  
184 - //批量删除部门管理  
185 - await _db.Deleteable<LqBmzbEntity>().In(d => d.Id,ids).ExecuteCommandAsync();  
186 - //关闭事务  
187 - _db.CommitTran();  
188 - }  
189 - catch (Exception)  
190 - {  
191 - //回滚事务  
192 - _db.RollbackTran();  
193 - throw NCCException.Oh(ErrorCode.COM1002);  
194 - }  
195 - }  
196 - } 169 +// /// <summary>
  170 +// /// 批量删除部门管理
  171 +// /// </summary>
  172 +// /// <param name="ids">主键数组</param>
  173 +// /// <returns></returns>
  174 +// [HttpPost("batchRemove")]
  175 +// public async Task BatchRemove([FromBody] List<string> ids)
  176 +// {
  177 +// var entitys = await _db.Queryable<LqBmzbEntity>().In(it => it.Id, ids).ToListAsync();
  178 +// if (entitys.Count > 0)
  179 +// {
  180 +// try
  181 +// {
  182 +// //开启事务
  183 +// _db.BeginTran();
  184 +// //批量删除部门管理
  185 +// await _db.Deleteable<LqBmzbEntity>().In(d => d.Id,ids).ExecuteCommandAsync();
  186 +// //关闭事务
  187 +// _db.CommitTran();
  188 +// }
  189 +// catch (Exception)
  190 +// {
  191 +// //回滚事务
  192 +// _db.RollbackTran();
  193 +// throw NCCException.Oh(ErrorCode.COM1002);
  194 +// }
  195 +// }
  196 +// }
197 197
198 - /// <summary>  
199 - /// 更新部门管理  
200 - /// </summary>  
201 - /// <param name="id">主键</param>  
202 - /// <param name="input">参数</param>  
203 - /// <returns></returns>  
204 - [HttpPut("{id}")]  
205 - public async Task Update(string id, [FromBody] LqBmzbUpInput input)  
206 - {  
207 - var entity = input.Adapt<LqBmzbEntity>();  
208 - var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();  
209 - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);  
210 - } 198 +// /// <summary>
  199 +// /// 更新部门管理
  200 +// /// </summary>
  201 +// /// <param name="id">主键</param>
  202 +// /// <param name="input">参数</param>
  203 +// /// <returns></returns>
  204 +// [HttpPut("{id}")]
  205 +// public async Task Update(string id, [FromBody] LqBmzbUpInput input)
  206 +// {
  207 +// var entity = input.Adapt<LqBmzbEntity>();
  208 +// var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
  209 +// if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
  210 +// }
211 211
212 - /// <summary>  
213 - /// 删除部门管理  
214 - /// </summary>  
215 - /// <returns></returns>  
216 - [HttpDelete("{id}")]  
217 - public async Task Delete(string id)  
218 - {  
219 - var entity = await _db.Queryable<LqBmzbEntity>().FirstAsync(p => p.Id == id);  
220 - _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);  
221 - var isOk = await _db.Deleteable<LqBmzbEntity>().Where(d => d.Id == id).ExecuteCommandAsync();  
222 - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002);  
223 - }  
224 - }  
225 -} 212 +// /// <summary>
  213 +// /// 删除部门管理
  214 +// /// </summary>
  215 +// /// <returns></returns>
  216 +// [HttpDelete("{id}")]
  217 +// public async Task Delete(string id)
  218 +// {
  219 +// var entity = await _db.Queryable<LqBmzbEntity>().FirstAsync(p => p.Id == id);
  220 +// _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
  221 +// var isOk = await _db.Deleteable<LqBmzbEntity>().Where(d => d.Id == id).ExecuteCommandAsync();
  222 +// if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002);
  223 +// }
  224 +// }
  225 +// }
netcore/src/Modularity/Extend/NCC.Extend/LqMdxxService.cs
@@ -277,5 +277,18 @@ namespace NCC.Extend.LqMdxx @@ -277,5 +277,18 @@ namespace NCC.Extend.LqMdxx
277 var isOk = await _db.Deleteable<LqMdxxEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); 277 var isOk = await _db.Deleteable<LqMdxxEntity>().Where(d => d.Id == id).ExecuteCommandAsync();
278 if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); 278 if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002);
279 } 279 }
  280 +
  281 + /// <summary>
  282 + /// 获取门店下拉选择数据
  283 + /// </summary>
  284 + /// <returns></returns>
  285 + [HttpGet("Selector")]
  286 + public async Task<dynamic> GetSelector()
  287 + {
  288 + var list = await _db.Queryable<LqMdxxEntity>()
  289 + .Select(it => new { id = it.Id, fullName = it.Dm, enCode = it.Mdbm })
  290 + .ToListAsync();
  291 + return new { list = list };
  292 + }
280 } 293 }
281 } 294 }
netcore/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserCrInput.cs
@@ -133,5 +133,30 @@ namespace NCC.System.Entitys.Dto.Permission.User @@ -133,5 +133,30 @@ namespace NCC.System.Entitys.Dto.Permission.User
133 /// 排序 133 /// 排序
134 /// </summary> 134 /// </summary>
135 public long? sortCode { get; set; } 135 public long? sortCode { get; set; }
  136 +
  137 + /// <summary>
  138 + /// 门店ID
  139 + /// </summary>
  140 + public string mdid { get; set; }
  141 +
  142 + /// <summary>
  143 + /// 职位
  144 + /// </summary>
  145 + public string zw { get; set; }
  146 +
  147 + /// <summary>
  148 + /// 费用分摊(是/否)
  149 + /// </summary>
  150 + public string fyft { get; set; }
  151 +
  152 + /// <summary>
  153 + /// 岗位分类
  154 + /// </summary>
  155 + public string gwfl { get; set; }
  156 +
  157 + /// <summary>
  158 + /// 岗位
  159 + /// </summary>
  160 + public string gw { get; set; }
136 } 161 }
137 } 162 }
netcore/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserInfoOutput.cs
@@ -136,5 +136,30 @@ namespace NCC.System.Entitys.Dto.Permission.User @@ -136,5 +136,30 @@ namespace NCC.System.Entitys.Dto.Permission.User
136 /// 排序 136 /// 排序
137 /// </summary> 137 /// </summary>
138 public long? sortCode { get; set; } 138 public long? sortCode { get; set; }
  139 +
  140 + /// <summary>
  141 + /// 门店ID
  142 + /// </summary>
  143 + public string mdid { get; set; }
  144 +
  145 + /// <summary>
  146 + /// 职位
  147 + /// </summary>
  148 + public string zw { get; set; }
  149 +
  150 + /// <summary>
  151 + /// 费用分摊(是/否)
  152 + /// </summary>
  153 + public string fyft { get; set; }
  154 +
  155 + /// <summary>
  156 + /// 岗位分类
  157 + /// </summary>
  158 + public string gwfl { get; set; }
  159 +
  160 + /// <summary>
  161 + /// 岗位
  162 + /// </summary>
  163 + public string gw { get; set; }
139 } 164 }
140 } 165 }
netcore/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserListAllOutput.cs
@@ -61,5 +61,30 @@ namespace NCC.System.Entitys.Dto.Permission.User @@ -61,5 +61,30 @@ namespace NCC.System.Entitys.Dto.Permission.User
61 [JsonIgnore] 61 [JsonIgnore]
62 public int? deleteMark { get; set; } 62 public int? deleteMark { get; set; }
63 63
  64 + /// <summary>
  65 + /// 门店ID
  66 + /// </summary>
  67 + public string mdid { get; set; }
  68 +
  69 + /// <summary>
  70 + /// 职位
  71 + /// </summary>
  72 + public string zw { get; set; }
  73 +
  74 + /// <summary>
  75 + /// 费用分摊(是/否)
  76 + /// </summary>
  77 + public string fyft { get; set; }
  78 +
  79 + /// <summary>
  80 + /// 岗位分类
  81 + /// </summary>
  82 + public string gwfl { get; set; }
  83 +
  84 + /// <summary>
  85 + /// 岗位
  86 + /// </summary>
  87 + public string gw { get; set; }
  88 +
64 } 89 }
65 } 90 }
netcore/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserListOutput.cs
@@ -93,5 +93,30 @@ namespace NCC.System.Entitys.Dto.Permission.User @@ -93,5 +93,30 @@ namespace NCC.System.Entitys.Dto.Permission.User
93 /// </summary> 93 /// </summary>
94 [JsonIgnore] 94 [JsonIgnore]
95 public int? deleteMark { get; set; } 95 public int? deleteMark { get; set; }
  96 +
  97 + /// <summary>
  98 + /// 门店ID
  99 + /// </summary>
  100 + public string mdid { get; set; }
  101 +
  102 + /// <summary>
  103 + /// 职位
  104 + /// </summary>
  105 + public string zw { get; set; }
  106 +
  107 + /// <summary>
  108 + /// 费用分摊(是/否)
  109 + /// </summary>
  110 + public string fyft { get; set; }
  111 +
  112 + /// <summary>
  113 + /// 岗位分类
  114 + /// </summary>
  115 + public string gwfl { get; set; }
  116 +
  117 + /// <summary>
  118 + /// 岗位
  119 + /// </summary>
  120 + public string gw { get; set; }
96 } 121 }
97 } 122 }
netcore/src/Modularity/System/NCC.System.Entitys/Entity/Permission/UserEntity.cs
@@ -328,5 +328,35 @@ namespace NCC.System.Entitys.Permission @@ -328,5 +328,35 @@ namespace NCC.System.Entitys.Permission
328 [SugarColumn(ColumnName = "F_OpenId")] 328 [SugarColumn(ColumnName = "F_OpenId")]
329 public string OpenId { get; set; } 329 public string OpenId { get; set; }
330 330
  331 + /// <summary>
  332 + /// 门店ID
  333 + /// </summary>
  334 + [SugarColumn(ColumnName = "F_MDID")]
  335 + public string Mdid { get; set; }
  336 +
  337 + /// <summary>
  338 + /// 职位
  339 + /// </summary>
  340 + [SugarColumn(ColumnName = "F_ZW")]
  341 + public string Zw { get; set; }
  342 +
  343 + /// <summary>
  344 + /// 费用分摊(是/否)
  345 + /// </summary>
  346 + [SugarColumn(ColumnName = "F_FYFT")]
  347 + public string Fyft { get; set; }
  348 +
  349 + /// <summary>
  350 + /// 岗位分类
  351 + /// </summary>
  352 + [SugarColumn(ColumnName = "F_GWFL")]
  353 + public string Gwfl { get; set; }
  354 +
  355 + /// <summary>
  356 + /// 岗位
  357 + /// </summary>
  358 + [SugarColumn(ColumnName = "F_GW")]
  359 + public string Gw { get; set; }
  360 +
331 } 361 }
332 } 362 }
netcore/src/Modularity/System/NCC.System.Entitys/Model/Permission/User/UserInfo.cs
@@ -59,6 +59,11 @@ namespace NCC.System.Entitys.Model.Permission.User @@ -59,6 +59,11 @@ namespace NCC.System.Entitys.Model.Permission.User
59 public string organizeName { get; set; } 59 public string organizeName { get; set; }
60 60
61 /// <summary> 61 /// <summary>
  62 + /// 门店ID
  63 + /// </summary>
  64 + public string mdid { get; set; }
  65 +
  66 + /// <summary>
62 /// 我的主管 67 /// 我的主管
63 /// </summary> 68 /// </summary>
64 public string managerId { get; set; } 69 public string managerId { get; set; }
netcore/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs
@@ -86,7 +86,7 @@ namespace NCC.System.Service.Permission @@ -86,7 +86,7 @@ namespace NCC.System.Service.Permission
86 if (!input.organizeId.IsNullOrEmpty()) 86 if (!input.organizeId.IsNullOrEmpty())
87 organizeIds = await GetSubOrganizeIds(input.organizeId); 87 organizeIds = await GetSubOrganizeIds(input.organizeId);
88 var data = await _userRepository.Context.Queryable<UserEntity, OrganizeEntity>((a, b) => new JoinQueryInfos(JoinType.Left, b.Id == SqlFunc.ToString(a.OrganizeId))) 88 var data = await _userRepository.Context.Queryable<UserEntity, OrganizeEntity>((a, b) => new JoinQueryInfos(JoinType.Left, b.Id == SqlFunc.ToString(a.OrganizeId)))
89 - .Select((a, b) => new UserListOutput { id = a.Id, account = a.Account, realName = a.RealName, creatorTime = a.CreatorTime, department = b.FullName, description = a.Description, enabledMark = a.EnabledMark, gender = a.Gender, mobilePhone = a.MobilePhone, positionId = a.PositionId, position = "", roleId = a.RoleId, roleName = "", sortCode = a.SortCode, deleteMark = a.DeleteMark, organizeId = a.OrganizeId }) 89 + .Select((a, b) => new UserListOutput { id = a.Id, account = a.Account, realName = a.RealName, creatorTime = a.CreatorTime, department = b.FullName, description = a.Description, enabledMark = a.EnabledMark, gender = a.Gender, mobilePhone = a.MobilePhone, positionId = a.PositionId, position = "", roleId = a.RoleId, roleName = "", sortCode = a.SortCode, deleteMark = a.DeleteMark, organizeId = a.OrganizeId, mdid = a.Mdid, zw = a.Zw, fyft = a.Fyft, gwfl = a.Gwfl, gw = a.Gw })
90 .MergeTable() 90 .MergeTable()
91 .Mapper((output) => 91 .Mapper((output) =>
92 { 92 {
@@ -161,7 +161,12 @@ namespace NCC.System.Service.Permission @@ -161,7 +161,12 @@ namespace NCC.System.Service.Permission
161 sortCode = a.SortCode, 161 sortCode = a.SortCode,
162 quickQuery = a.QuickQuery, 162 quickQuery = a.QuickQuery,
163 enabledMark = a.EnabledMark, 163 enabledMark = a.EnabledMark,
164 - deleteMark = a.DeleteMark 164 + deleteMark = a.DeleteMark,
  165 + mdid = a.Mdid,
  166 + zw = a.Zw,
  167 + fyft = a.Fyft,
  168 + gwfl = a.Gwfl,
  169 + gw = a.Gw
165 }) 170 })
166 .MergeTable().Where(p => p.enabledMark.Equals(1) && p.deleteMark == null).OrderBy(p => p.sortCode).ToListAsync(); 171 .MergeTable().Where(p => p.enabledMark.Equals(1) && p.deleteMark == null).OrderBy(p => p.sortCode).ToListAsync();
167 return list; 172 return list;
@@ -567,6 +572,10 @@ namespace NCC.System.Service.Permission @@ -567,6 +572,10 @@ namespace NCC.System.Service.Permission
567 it.Birthday, 572 it.Birthday,
568 it.TelePhone, 573 it.TelePhone,
569 it.Landline, 574 it.Landline,
  575 + it.Mdid,
  576 + it.Fyft,
  577 + it.Gwfl,
  578 + it.Gw,
570 it.LastModifyTime, 579 it.LastModifyTime,
571 it.LastModifyUserId 580 it.LastModifyUserId
572 }).ExecuteCommandAsync(); 581 }).ExecuteCommandAsync();
@@ -762,6 +771,7 @@ namespace NCC.System.Service.Permission @@ -762,6 +771,7 @@ namespace NCC.System.Service.Permission
762 gender = SqlFunc.ToInt32(a.Gender), 771 gender = SqlFunc.ToInt32(a.Gender),
763 organizeId = a.OrganizeId, 772 organizeId = a.OrganizeId,
764 organizeName = b.FullName, 773 organizeName = b.FullName,
  774 + mdid = a.Mdid,
765 managerId = a.ManagerId, 775 managerId = a.ManagerId,
766 isAdministrator = SqlFunc.IIF(a.IsAdministrator == 1, true, false), 776 isAdministrator = SqlFunc.IIF(a.IsAdministrator == 1, true, false),
767 portalId = SqlFunc.IIF(a.PortalId == null, defaultPortalId, a.PortalId), 777 portalId = SqlFunc.IIF(a.PortalId == null, defaultPortalId, a.PortalId),
参考资料/.DS_Store
No preview for this file type