Browse Source

系统设置-字典管理、营销人员设置

WIN-B904R0U0NNS\Administrator 2 years ago
parent
commit
a2a9e5dfd9

+ 12 - 4
src/api/api.js

@@ -97,8 +97,8 @@ const getRoomPlans = (code,params)=>postAction(`/rooms/roomPricePlan/getRoomPlan
 const getSelectList = (params)=>getAction(`/org.jeecg.modules.business/busMarketMember/getSelectList/`,params);
 /**
  * 获取会员等级接口
- * @param {Object} params 
- * @returns 
+ * @param {Object} params
+ * @returns
  */
 const getVipLevels = (params)=>getAction(`/org.jeecg.modules.business/busMarketMember/list/`,params);
 
@@ -108,6 +108,12 @@ const deleteMarketMemberGroup = (params)=>deleteAction("/business/busMarketMembe
 const deleteMarketMemberLable = (params)=>deleteAction("/business/busMarketMemberLable/delete",params);
 const getBusMarketCouponsList = (params)=>getAction(`/business/busMarketCoupons/list`,params);
 const getBusMarketCouponsCashList = (params)=>getAction(`/business/busMarketCouponsCash/list`,params);
+
+//业务字典管理
+const queryBusDictTreeList = (params)=>getAction("/business/busDict/queryTreeList",params);
+const addBusDictItem = (params)=>postAction("/business/busDictItem/add",params);
+const editBusDictItem = (params)=>putAction("/business/busDictItem/edit",params);
+
 // 中转HTTP请求
 export const transitRESTful = {
   get: (url, parameter) => getAction(getTransitURL(url), parameter),
@@ -180,8 +186,10 @@ export {
   deleteMarketMemberLable,
   getBusMarketCouponsList,
   getBusMarketCouponsCashList,
-  getVipLevels
+  getVipLevels,
+  queryBusDictTreeList,
+  addBusDictItem,
+  editBusDictItem
 }
 
 
-

+ 31 - 4
src/views/settings/components/dictionaryInfo.vue

@@ -1,13 +1,40 @@
 <template>
-    $END$
+    <a-row type="flex" :gutter="16" class="container">
+        <a-col :md="5" :sm="24">
+            <dictionary-info-left v-model="currentOrgCode"/>
+        </a-col>
+        <a-col :md="24-5" :sm="24">
+            <dictionary-info-right v-model="currentOrgCode"/>
+        </a-col>
+    </a-row>
 </template>
 
 <script>
+    import dictionaryInfoLeft from './modules/dictionaryInfoLeft'
+    import dictionaryInfoRight from './modules/dictionaryInfoRight'
+
     export default {
-        name: "dictionaryInfo"
+        name: 'dictionaryInfo',
+        components: { dictionaryInfoLeft, dictionaryInfoRight },
+        data() {
+            return {
+                description: '字典管理',
+                currentOrgCode: ''
+            }
+        },
+
+        methods: {
+        },
+        destroyed: function () {
+            // 离开页面生命周期函数
+            console.log('离开字典管理');
+            localStorage.removeItem("dictId")
+        },
     }
 </script>
-
 <style scoped>
-
+    @import '~@assets/less/common.less';
+    .container{
+        background-color: #f6f6f6;
+    }
 </style>

+ 5 - 3
src/views/settings/components/modules/dictItemForm.vue

@@ -55,7 +55,7 @@
   import { validateDuplicateValue } from '@/utils/util'
 
   export default {
-    name: 'BusDictItemForm',
+    name: 'dictItemForm',
     components: {
     },
     props: {
@@ -128,6 +128,8 @@
             if(!this.model.id){
               httpurl+=this.url.add;
               method = 'post';
+              var info = JSON.parse(localStorage.getItem("storeInfo"));
+              this.model.hotelId = info.id;
             }else{
               httpurl+=this.url.edit;
                method = 'put';
@@ -143,9 +145,9 @@
               that.confirmLoading = false;
             })
           }
-         
+
         })
       },
     }
   }
-</script>
+</script>

+ 5 - 5
src/views/settings/components/modules/dictItemModal.Style#Drawer.vue

@@ -7,7 +7,7 @@
     @close="close"
     destroyOnClose
     :visible="visible">
-    <bus-dict-item-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-dict-item-form>
+    <dict-item-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></dict-item-form>
     <div class="drawer-footer">
       <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
       <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
@@ -17,12 +17,12 @@
 
 <script>
 
-  import BusDictItemForm from './BusDictItemForm'
+  import dictItemForm from './dictItemForm'
 
   export default {
-    name: 'BusDictItemModal',
+    name: 'dictItemModal',
     components: {
-      BusDictItemForm
+      dictItemForm
     },
     data () {
       return {
@@ -81,4 +81,4 @@
     background: #fff;
     border-radius: 0 0 2px 2px;
   }
-</style>
+</style>

+ 232 - 40
src/views/settings/components/modules/dictItemModal.vue

@@ -1,60 +1,252 @@
+<!--<template>-->
+<!--  <j-modal-->
+<!--    :title="title"-->
+<!--    :width="width"-->
+<!--    :visible="visible"-->
+<!--    switchFullscreen-->
+<!--    @ok="handleOk"-->
+<!--    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"-->
+<!--    @cancel="handleCancel"-->
+<!--    cancelText="关闭">-->
+<!--    <dict-item-modal ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></dict-item-modal>-->
+<!--  </j-modal>-->
+<!--</template>-->
+
+<!--<script>-->
+
+<!--  import dictItemForm from './dictItemForm'-->
+<!--  export default {-->
+<!--    name: 'DictItemModal',-->
+<!--    components: {-->
+<!--      dictItemForm-->
+<!--    },-->
+<!--    data () {-->
+<!--      return {-->
+<!--        title:'',-->
+<!--        width:800,-->
+<!--        visible: false,-->
+<!--        disableSubmit: false-->
+<!--      }-->
+<!--    },-->
+<!--    methods: {-->
+<!--      add () {-->
+<!--        this.visible=true-->
+<!--        this.$nextTick(()=>{-->
+<!--          this.$refs.realForm.add();-->
+<!--        })-->
+<!--      },-->
+<!--      edit (record) {-->
+<!--        this.visible=true-->
+<!--        this.$nextTick(()=>{-->
+<!--          this.$refs.realForm.edit(record);-->
+<!--        })-->
+<!--      },-->
+<!--      close () {-->
+<!--        this.$emit('close');-->
+<!--        this.visible = false;-->
+<!--      },-->
+<!--      handleOk () {-->
+<!--        this.$refs.realForm.submitForm();-->
+<!--      },-->
+<!--      submitCallback(){-->
+<!--        this.$emit('ok');-->
+<!--        this.visible = false;-->
+<!--      },-->
+<!--      handleCancel () {-->
+<!--        this.close()-->
+<!--      }-->
+<!--    }-->
+<!--  }-->
+<!--</script>-->
+
 <template>
-  <j-modal
-    :title="title"
-    :width="width"
-    :visible="visible"
-    switchFullscreen
-    @ok="handleOk"
-    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
-    @cancel="handleCancel"
-    cancelText="关闭">
-    <bus-dict-item-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-dict-item-form>
-  </j-modal>
+  <a-modal
+          :title="title"
+          :width="800"
+          :visible="visible"
+          :confirmLoading="confirmLoading"
+          @ok="handleOk"
+          @cancel="handleCancel"
+          cancelText="关闭"
+  >
+    <a-spin :spinning="confirmLoading">
+      <a-form-model  ref="form" :model="model" :rules="validatorRules">
+
+        <a-form-model-item
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="itemText"
+                label="字典名称">
+          <a-input placeholder="请输入名称" v-model="model.itemText"/>
+        </a-form-model-item>
+
+        <a-form-model-item
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="itemValue"
+                label="数据值">
+          <a-input placeholder="请输入数据值" v-model="model.itemValue" />
+        </a-form-model-item>
+
+        <a-form-model-item
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                label="描述">
+          <a-input v-model="model.description" />
+        </a-form-model-item>
+
+        <a-form-model-item
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                label="排序值">
+          <a-input-number :min="1" v-model="model.sortOrder" />
+          值越小越靠前
+        </a-form-model-item>
+
+        <a-form-model-item
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                label="是否启用"
+                hasFeedback>
+          <a-switch checkedChildren="启用" unCheckedChildren="禁用" @change="onChose" v-model="visibleCheck"/>
+        </a-form-model-item>
+
+      </a-form-model>
+    </a-spin>
+  </a-modal>
 </template>
 
 <script>
+  import pick from 'lodash.pick'
+  import {addBusDictItem, editBusDictItem} from '@/api/api'
+  import { getAction } from '@api/manage'
 
-  import BusDictItemForm from './BusDictItemForm'
   export default {
-    name: 'BusDictItemModal',
-    components: {
-      BusDictItemForm
-    },
-    data () {
+    name: "DictItemModal",
+    data() {
       return {
-        title:'',
-        width:800,
+        title: "操作",
         visible: false,
-        disableSubmit: false
+        visibleCheck: true,
+        model: {},
+        dictId: "",
+        status: 1,
+        labelCol: {
+          xs: {span: 24},
+          sm: {span: 5},
+        },
+        wrapperCol: {
+          xs: {span: 24},
+          sm: {span: 16},
+        },
+        confirmLoading: false,
+        validatorRules: {
+          itemText:  [{required: true, message: '请输入名称!'}],
+          itemValue:  [{required: true, message: '请输入数据值!'},{validator: this.validateItemValue}],
+        },
       }
     },
+    created() {
+    },
     methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
+      add(dictId) {
+        this.dictId = dictId;
+        //初始化默认值
+        this.edit({sortOrder:1,status:1});
       },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        })
+      edit(record) {
+        if (record.id) {
+          this.dictId = record.dictId;
+        }
+        this.status = record.status;
+        this.visibleCheck = (record.status == 1) ? true : false;
+        this.model = Object.assign({}, record);
+        this.model.dictId = this.dictId;
+        this.model.status = this.status;
+        this.visible = true;
       },
-      close () {
-        this.$emit('close');
-        this.visible = false;
+      onChose(checked) {
+        if (checked) {
+          this.status = 1;
+          this.visibleCheck = true;
+        } else {
+          this.status = 0;
+          this.visibleCheck = false;
+        }
       },
-      handleOk () {
-        this.$refs.realForm.submitForm();
+      // 确定
+      handleOk() {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            this.model.itemText = (this.model.itemText || '').trim()
+            this.model.itemValue = (this.model.itemValue || '').trim()
+            this.model.description = (this.model.description || '').trim()
+            this.model.status = this.status;
+            let obj;
+            if (!this.model.id) {
+              var info = JSON.parse(localStorage.getItem("storeInfo"));
+              this.model.hotelId = info.id;
+              obj = addBusDictItem(this.model);
+            } else {
+              obj = editBusDictItem(this.model);
+            }
+            obj.then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit('ok');
+              } else {
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+          }else{
+            return false;
+          }
+        })
+      },
+      // 关闭
+      handleCancel() {
+        this.close();
       },
-      submitCallback(){
-        this.$emit('ok');
+      close() {
+        this.$emit('close');
         this.visible = false;
+        this.$refs.form.resetFields();
       },
-      handleCancel () {
-        this.close()
+      validateItemValue(rule, value, callback){
+        let param = {
+          itemValue:value,
+          dictId:this.dictId,
+        }
+        if(this.model.id){
+          param.id = this.model.id
+        }
+        if(value){
+          let reg=new RegExp("[`~!@#$^&*()=|{}'.<>《》/?!¥()—【】‘;:”“。,、?]")
+          if(reg.test(value)){
+            callback("数据值不能包含特殊字符!")
+          }else{
+            callback()
+            //update--begin--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复
+            // getAction("/sys/dictItem/dictItemCheck",param).then((res)=>{
+            //   if(res.success){
+            //     callback()
+            //   }else{
+            //     callback(res.message);
+            //   }
+            // });
+            //update--end--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复
+          }
+        }else{
+          callback()
+        }
       }
     }
   }
-</script>
+</script>
+

+ 102 - 2
src/views/settings/components/modules/dictionaryInfoLeft.vue

@@ -1,10 +1,110 @@
 <template>
-    $END$
+    <a-card :loading="cardLoading" :bordered="false" style="height: 100%;">
+        <a-spin :spinning="loading">
+<!--            <a-input-search @search="handleSearch" style="width:100%;margin-top: 10px" placeholder="输入字典名称查询..." enterButton />-->
+
+            <a-tree
+                    showLine
+                    checkStrictly
+                    :expandedKeys.sync="expandedKeys"
+                    :selectedKeys="selectedKeys"
+                    :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
+                    :treeData="treeDataSource"
+                    @select="handleTreeSelect"
+            />
+        </a-spin>
+    </a-card>
 </template>
 
 <script>
+    import { queryBusDictTreeList } from '@/api/api'
+
     export default {
-        name: "dictionaryInfoLeft"
+        name: 'dictionaryInfoLeft',
+        props: ['value'],
+        data() {
+            return {
+                cardLoading: true,
+                loading: false,
+                treeDataSource: [],
+                selectedKeys: [],
+                expandedKeys: [],
+                dictId:''
+            }
+        },
+        created() {
+            this.queryTreeData()
+        },
+        methods: {
+
+            queryTreeData(keyword) {
+                console.log('获取数据')
+                this.commonRequestThen(queryBusDictTreeList({
+                    departName: keyword ? keyword : undefined,
+                    ids: this.dictId ? this.dictId : undefined
+                }))
+            },
+
+            // handleSearch(value) {
+            //     if (value) {
+            //         this.commonRequestThen(searchByKeywords({ keyWord: value }))
+            //     } else {
+            //         this.queryTreeData()
+            //     }
+            // },
+
+            handleTreeSelect(selectedKeys, event) {
+                console.log(event.node.dataRef)
+                //update-begin---author:wangshuai ---date:20220107  for:[JTC-378]通讯录 选中某个部门查询部门人员,想再取消选中查全部,无法取消,只能重新刷新界面------------
+                if (selectedKeys.length > 0 && event.node.dataRef.parentId != '') {
+                    if(this.selectedKeys[0] !== selectedKeys[0]){
+                        this.selectedKeys = [selectedKeys[0]]
+                        let dictId = event.node.dataRef.id
+                        localStorage.setItem("dictId", dictId)
+                        this.dictId = dictId
+                        this.emitInput(dictId)
+                    }
+                }else{
+                    this.selectedKeys = []
+                    this.emitInput("")
+                    localStorage.removeItem("dictId")
+                }
+                //update-end---author:wangshuai ---date:20220107  for:[JTC-378]通讯录 选中某个部门查询部门人员,想再取消选中查全部,无法取消,只能重新刷新界面------------
+            },
+
+            emitInput(id) {
+                this.$emit('input', id)
+            },
+
+            commonRequestThen(promise) {
+                this.loading = true
+                promise.then(res => {
+                    if (res.success) {
+                        this.treeDataSource = res.result
+                        // update-begin- --- author:wangshuai ------ date:20200102 ---- for:去除默认选中第一条数据、默认展开所有第一级
+                        // 默认选中第一条数据、默认展开所有第一级
+                        if (res.result.length > 0) {
+                          this.expandedKeys = []
+                          res.result.forEach((item, index) => {
+                            if (index === 0) {
+                              this.selectedKeys = [item.id]
+                              this.emitInput(item.orgCode)
+                            }
+                            this.expandedKeys.push(item.id)
+                          })
+                        }
+                        // update-end- --- author:wangshuai ------ date:20200102 ---- for:去除默认选中第一条数据、默认展开所有第一级
+                    } else {
+                        this.$message.warn(res.message)
+                        console.error('查询失败:', res)
+                    }
+                }).finally(() => {
+                    this.loading = false
+                    this.cardLoading = false
+                })
+            },
+
+        }
     }
 </script>
 

+ 213 - 4
src/views/settings/components/modules/dictionaryInfoRight.vue

@@ -1,13 +1,222 @@
 <template>
-    $END$
+    <a-card class="j-address-list-right-card-box" :loading="cardLoading" :bordered="false">
+        <div class="table-page-search-wrapper">
+            <a-form-model layout="inline" :model="queryParam">
+                <a-row :gutter="10">
+
+                    <a-col :md="6" :sm="12">
+                        <a-form-model-item label="名称" prop="itemText" style="margin-left:8px">
+                            <j-input placeholder="请输入名称查询" v-model="queryParam.itemText"></j-input>
+                        </a-form-model-item>
+                    </a-col>
+
+                    <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                        <a-col :md="6" :sm="24">
+                         <a-button type="primary" @click="searchQuery" icon="search" class="margin-left-8">查询</a-button>
+                          <a-button type="primary" @click="searchReset" icon="reload" class="margin-left-8">重置</a-button>
+                            <a-button @click="handleAdd" type="primary" icon="plus" class="margin-left-8">新增</a-button>
+                        </a-col>
+                      </span>
+                </a-row>
+            </a-form-model>
+        </div>
+
+        <a-table
+                ref="table"
+                size="middle"
+                bordered
+                rowKey="userId"
+                :pagination="ipagination"
+                :columns="columns"
+                :dataSource="dataSource"
+                :loading="loading"
+                @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+        </a-table>
+        <dict-item-modal ref="modalForm" @ok="modalFormOk"></dict-item-modal>
+    </a-card>
 </template>
 
 <script>
+    import { getAction } from '@/api/manage'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    // import DictItemModal from "../../../system/modules/DictItemModal";
+    import DictItemModal from "./dictItemModal";
+
     export default {
-        name: "dictionaryInfoRight"
+        name: 'dictionaryInfoRight',
+        mixins: [JeecgListMixin],
+        components: {DictItemModal},
+        props: ['value'],
+        data() {
+            return {
+                description: '用户信息',
+                cardLoading: true,
+                positionInfo: {},
+                columns: [
+                    {
+                        title:'显示',
+                        align:"center",
+                        dataIndex: 'itemText'
+                    },
+                    {
+                        title:'编码',
+                        align:"center",
+                        dataIndex: 'itemValue'
+                    },
+                    {
+                        title:'排序',
+                        align:"center",
+                        dataIndex: 'sortOrder'
+                    },
+                    {
+                        title:'备注',
+                        align:"center",
+                        dataIndex: 'description'
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align:"center",
+                        fixed:"right",
+                        width:147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: '/business/busDictItem/list',
+                    delete: "/business/busDictItem/delete",
+                    deleteBatch: "/business/busDictItem/deleteBatch",
+                    exportXlsUrl: "/business/busDictItem/exportXls",
+                    importExcelUrl: "business/busDictItem/importExcel",
+                    // listByPosition: '/sys/position/list'
+                },
+                parentId:'',
+            }
+        },
+        watch: {
+            value: {
+                immediate: true,
+                handler(id) {
+                    this.dataSource = []
+                    this.loadData(1, id)
+                }
+            },
+        },
+        created() {
+            // this.queryPositionInfo()
+        },
+        methods: {
+
+            loadData(pageNum, dictId) {
+                this.loading = true
+                if (pageNum === 1) {
+                    this.ipagination.current = 1
+                }
+                // console.log(dictId);
+                // console.log(this.getQueryParams());
+                var _dictId = localStorage.getItem("dictId")
+                if (_dictId != undefined && _dictId != '' && (dictId == undefined || dictId == '')){
+                    dictId = _dictId;
+                }
+                // update-begin- --- author:wangshuai ------ date:20200102 ---- for:传过来的部门编码为空全查
+                if (!dictId) {
+                    getAction(this.url.list, {
+                        ...this.getQueryParams()
+                    }).then((res) => {
+                        if (res.success) {
+                            this.dataSource = res.result.records
+                            this.ipagination.total = res.result.total
+                        }
+                    }).finally(() => {
+                        this.loading = false
+                        this.cardLoading = false
+                    })
+                    // update-end- --- author:wangshuai ------ date:20200102 ---- for:传过来的部门编码为空全查
+                }else{
+                    //加载数据 若传入参数1则加载第一页的内容
+                    getAction(this.url.list, {
+                        dictId,
+                        ...this.getQueryParams()
+                    }).then((res) => {
+                        if (res.success) {
+                            this.dataSource = res.result.records
+                            this.ipagination.total = res.result.total
+                        }
+                    }).finally(() => {
+                        this.loading = false
+                        this.cardLoading = false
+                    })
+                }
+            },
+
+            searchQuery() {
+                this.loadData(1, this.value)
+            },
+            searchReset() {
+                this.queryParam = {}
+                this.loadData(1, this.value)
+            },
+
+            handleTableChange(pagination, filters, sorter) {
+                if (Object.keys(sorter).length > 0) {
+                    this.isorter.column = sorter.field
+                    this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'
+                }
+                this.ipagination = pagination
+                this.loadData(null, this.value)
+            },
+
+            // 查询职务信息
+            queryPositionInfo() {
+                getAction(this.url.listByPosition, { pageSize: 99999 }).then(res => {
+                    if (res.success) {
+                        let positionInfo = {}
+                        res.result.records.forEach(record => {
+                            positionInfo[record['code']] = record['name']
+                        })
+                        this.positionInfo = positionInfo
+                    }
+                })
+            },
+            // 添加字典数据
+            handleAdd() {
+                var dictId = localStorage.getItem("dictId")
+                this.$refs.modalForm.add(dictId);
+                this.$refs.modalForm.title = "新增";
+            },
+        }
     }
 </script>
-
+<style>
+    .j-address-list-right-card-box .ant-table-placeholder {
+        min-height: 46px;
+    }
+</style>
 <style scoped>
-
+    .j-address-list-right-card-box {
+        height: 100%;
+        min-height: 300px;
+    }
+    .margin-left-8{
+        margin-left: 8px
+    }
 </style>

+ 61 - 29
src/views/settings/components/modules/salesPersonForm.vue

@@ -4,28 +4,37 @@
       <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
         <a-row>
           <a-col :span="24">
-            <a-form-model-item label="关联租户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenantId">
-              <a-input v-model="model.tenantId" placeholder="请输入关联租户"  ></a-input>
+            <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNo">
+              <a-input v-model="model.workNo" placeholder="请输入编号"  ></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="关联酒店" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hotelId">
-              <a-input v-model="model.hotelId" placeholder="请输入关联酒店"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="工号,唯一键" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNo">
-              <a-input v-model="model.workNo" placeholder="请输入工号,唯一键"  ></a-input>
+            <a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+              <a-input v-model="model.name" placeholder="请输入姓名"  ></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
-              <a-input v-model="model.name" placeholder="请输入姓名"  ></a-input>
+            <a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="postId">
+<!--              <a-input v-model="model.operatorId" placeholder="请选择职务"  ></a-input>-->
+              <a-select
+                      v-model="model.postId"
+                      placeholder="请选择职务"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in postList" :key="index">{{ item.name }}</a-select-option>
+              </a-select>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
             <a-form-model-item label="关联操作用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operatorId">
-              <a-input v-model="model.operatorId" placeholder="请输入关联操作用户"  ></a-input>
+<!--              <a-input v-model="model.operatorId" placeholder="请选择关联操作用户"  ></a-input>-->
+              <a-select
+                      v-model="model.operatorId"
+                      placeholder="请选择关联操作用户"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in userList" :key="index">{{ item.name }}</a-select-option>
+              </a-select>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
@@ -44,18 +53,17 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="状态(0-禁用;1-启用)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
-              <a-input-number v-model="model.status" placeholder="请输入状态(0-禁用;1-启用)" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
             <a-form-model-item label="备注信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remarks">
               <a-input v-model="model.remarks" placeholder="请输入备注信息"  ></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="删除状态(0-正常,1-已删除)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
-              <a-input-number v-model="model.delFlag" placeholder="请输入删除状态(0-正常,1-已删除)" style="width: 100%" />
+            <a-form-model-item
+                    :labelCol="labelCol"
+                    :wrapperCol="wrapperCol"
+                    label="是否有效"
+                    prop="status">
+              <a-switch checkedChildren="有效" unCheckedChildren="无效" v-model="model.status"/>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -95,18 +103,26 @@
         },
         confirmLoading: false,
         validatorRules: {
-           tenantId: [
-              { required: true, message: '请输入关联租户!'},
-           ],
-           hotelId: [
-              { required: true, message: '请输入关联酒店!'},
-           ],
+          workNo: [
+            { required: true, message: '请输入编号!'},
+          ],
+          name: [
+            { required: true, message: '请输入姓名!'},
+          ],
+          phone: [
+            { required: true, message: '请输入手机号!'},
+          ],
+          status: [
+            { required: true, message: '请选择服务员是否有效!'},
+          ],
         },
         url: {
           add: "/business/busSalesPerson/add",
           edit: "/business/busSalesPerson/edit",
           queryById: "/business/busSalesPerson/queryById"
-        }
+        },
+        userList:[],
+        postList:[]
       }
     },
     computed: {
@@ -121,10 +137,17 @@
     methods: {
       add () {
         this.edit(this.modelDefault);
+        this.edit({status:true });
       },
       edit (record) {
+        if (record.status == 1){
+          record.status = true;
+        }else {
+          record.status = false;
+        }
         this.model = Object.assign({}, record);
         this.visible = true;
+
       },
       submitForm () {
         const that = this;
@@ -136,12 +159,21 @@
             let method = '';
             if(!this.model.id){
               httpurl+=this.url.add;
+              var info = JSON.parse(localStorage.getItem("storeInfo"));
+              this.model.hotelId = info.id;
               method = 'post';
             }else{
               httpurl+=this.url.edit;
                method = 'put';
             }
-            httpAction(httpurl,this.model,method).then((res)=>{
+            var _model = this.model;
+            if (_model.status){
+              _model.status = 1;
+            }else {
+              _model.status = 0;
+            }
+            console.log(this.model)
+            httpAction(httpurl,_model,method).then((res)=>{
               if(res.success){
                 that.$message.success(res.message);
                 that.$emit('ok');
@@ -152,9 +184,9 @@
               that.confirmLoading = false;
             })
           }
-         
+
         })
       },
     }
   }
-</script>
+</script>

+ 5 - 5
src/views/settings/components/modules/salesPersonModal.Style#Drawer.vue

@@ -7,7 +7,7 @@
     @close="close"
     destroyOnClose
     :visible="visible">
-    <bus-sales-person-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-sales-person-form>
+    <sales-person-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></sales-person-form>
     <div class="drawer-footer">
       <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
       <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
@@ -17,12 +17,12 @@
 
 <script>
 
-  import BusSalesPersonForm from './BusSalesPersonForm'
+  import salesPersonForm from './salesPersonForm'
 
   export default {
-    name: 'BusSalesPersonModal',
+    name: 'salesPersonModal',
     components: {
-      BusSalesPersonForm
+      salesPersonForm
     },
     data () {
       return {
@@ -81,4 +81,4 @@
     background: #fff;
     border-radius: 0 0 2px 2px;
   }
-</style>
+</style>

+ 5 - 5
src/views/settings/components/modules/salesPersonModal.vue

@@ -8,17 +8,17 @@
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
     cancelText="关闭">
-    <bus-sales-person-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-sales-person-form>
+    <sales-person-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></sales-person-form>
   </j-modal>
 </template>
 
 <script>
 
-  import BusSalesPersonForm from './BusSalesPersonForm'
+  import salesPersonForm from './salesPersonForm'
   export default {
-    name: 'BusSalesPersonModal',
+    name: 'salesPersonModal',
     components: {
-      BusSalesPersonForm
+      salesPersonForm
     },
     data () {
       return {
@@ -57,4 +57,4 @@
       }
     }
   }
-</script>
+</script>

+ 236 - 4
src/views/settings/components/salesPersonInfo.vue

@@ -1,13 +1,245 @@
 <template>
-    <div>营销人员管理</div>
+    <a-card :bordered="false">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline" @keyup.enter.native="searchQuery">
+                <a-row :gutter="24">
+                    <a-col :md="6" :sm="8">
+                        <a-form-item>
+                            <!--                            <j-dict-select-tag v-model="queryParam.hotelId" placeholder="请选择关联酒店" @change="e=>handleChangeHotel(e)"-->
+                            <!--                                               dictCode="bus_hotel_info,name,id,`status`=1 and check_status=1 and del_flag=0 "  />-->
+                            <a-select
+                                    :maxTagCount="1"
+                                    mode="multiple"
+                                    v-model="queryParam.hotelId"
+                                    placeholder="请选择"
+                                    :allowClear="true"
+                            >
+                                <a-select-option :value="item.id" v-for="(item,index) in hotelList" :key="index">{{ item.name }}</a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="6">
+                        <a-form-item>
+                            <a-input placeholder="关键字查询" v-model="queryParam.keyWord"></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="6">
+                        <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                          <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                        </span>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+        <!-- 查询区域-END -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+<!--            <a-button type="primary" icon="download" @click="handleExportXls('营销人员管理')">导出</a-button>-->
+<!--            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--                <a-button type="primary" icon="import">导入</a-button>-->
+<!--            </a-upload>-->
+            <!-- 高级查询区域 -->
+<!--            <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+            <a-dropdown v-if="selectedRowKeys.length > 0">
+<!--                <a-menu slot="overlay">-->
+<!--                    <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
+<!--                </a-menu>-->
+<!--                <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
+                <a-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
+            </a-dropdown>
+        </div>
+
+        <!-- table区域-begin -->
+        <div>
+            <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+                <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+                <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+            </div>
+
+            <a-table
+                    ref="table"
+                    size="middle"
+                    :scroll="{x:true}"
+                    bordered
+                    rowKey="id"
+                    :columns="columns"
+                    :dataSource="dataSource"
+                    :pagination="ipagination"
+                    :loading="loading"
+                    :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+                    class="j-table-force-nowrap"
+                    @change="handleTableChange">
+
+                <template slot="htmlSlot" slot-scope="text">
+                    <div v-html="text"></div>
+                </template>
+                <template slot="imgSlot" slot-scope="text,record">
+                    <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+                    <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+                </template>
+                <span slot="status" slot-scope="text,record">
+                    <a-tag v-if="text == 1" color="green">有效</a-tag>
+                    <a-tag v-else color="grey">无效</a-tag>
+                </span>
+                <template slot="fileSlot" slot-scope="text">
+                    <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+                    <a-button
+                            v-else
+                            :ghost="true"
+                            type="primary"
+                            icon="download"
+                            size="small"
+                            @click="downloadFile(text)">
+                        下载
+                    </a-button>
+                </template>
+
+                <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+            </a-table>
+        </div>
+
+        <sales-person-modal ref="modalForm" @ok="modalFormOk"></sales-person-modal>
+    </a-card>
 </template>
 
 <script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import salesPersonModal from './modules/salesPersonModal'
+    import { hotelQueryList } from '../../../api/hotel'
+
     export default {
-        name: "salesPersonInfo"
+        name: 'BusSalesPersonList',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            salesPersonModal
+        },
+        data () {
+            return {
+                description: '营销人员管理管理页面',
+                // 表头
+                columns: [
+                    {
+                        title:'编号',
+                        align:"center",
+                        dataIndex: 'workNo'
+                    },
+                    {
+                        title:'姓名',
+                        align:"center",
+                        dataIndex: 'name'
+                    },
+                    {
+                        title:'关联操作用户',
+                        align:"center",
+                        dataIndex: 'operatorId'
+                    },
+                    {
+                        title:'联系电话',
+                        align:"center",
+                        dataIndex: 'mobile'
+                    },
+                    {
+                        title:'手机号',
+                        align:"center",
+                        dataIndex: 'phone'
+                    },
+                    {
+                        title:'地址',
+                        align:"center",
+                        dataIndex: 'address'
+                    },
+                    {
+                        title:'状态',
+                        align:"center",
+                        dataIndex: 'status',
+                        scopedSlots: { customRender: 'status' },
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align:"center",
+                        fixed:"right",
+                        width:147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: "/business/busSalesPerson/list",
+                    delete: "/business/busSalesPerson/delete",
+                    deleteBatch: "/business/busSalesPerson/deleteBatch",
+                    exportXlsUrl: "/business/busSalesPerson/exportXls",
+                    importExcelUrl: "business/busSalesPerson/importExcel",
+
+                },
+                dictOptions:{},
+                superFieldList:[],
+                hotelList:[],
+            }
+        },
+        created() {
+            this.getSuperFieldList();
+            this.initData();
+        },
+        computed: {
+            importExcelUrl: function(){
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            },
+        },
+        methods: {
+            initDictConfig(){
+            },
+            initData(){
+                hotelQueryList({
+                    key: ''
+                }).then(res => {
+                    console.log(res)
+                    if (res.code == 200 && res.result) {
+                        this.hotelList = res.result;
+                    }
+                })
+            },
+            getSuperFieldList(){
+                let fieldList=[];
+                fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
+                fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
+                fieldList.push({type:'string',value:'workNo',text:'工号,唯一键'})
+                fieldList.push({type:'string',value:'name',text:'姓名'})
+                fieldList.push({type:'string',value:'operatorId',text:'关联操作用户'})
+                fieldList.push({type:'string',value:'mobile',text:'联系电话'})
+                fieldList.push({type:'string',value:'phone',text:'手机号'})
+                fieldList.push({type:'string',value:'address',text:'地址'})
+                fieldList.push({type:'int',value:'status',text:'状态(0-禁用;1-启用)'})
+                fieldList.push({type:'string',value:'remarks',text:'备注信息'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
+                this.superFieldList = fieldList
+            }
+        }
     }
 </script>
-
 <style scoped>
-
+    @import '~@assets/less/common.less';
 </style>

+ 1 - 1
src/views/settings/components/waiterSettings.vue

@@ -9,7 +9,7 @@
 <!--                            <j-dict-select-tag v-model="queryParam.hotelId" placeholder="请选择关联酒店" @change="e=>handleChangeHotel(e)"-->
 <!--                                               dictCode="bus_hotel_info,name,id,`status`=1 and check_status=1 and del_flag=0 "  />-->
                             <a-select
-                                    maxTagCount="1"
+                                    :maxTagCount="1"
                                     mode="multiple"
                                     v-model="queryParam.hotelId"
                                     placeholder="请选择"

+ 14 - 5
src/views/settings/systemInfo.vue

@@ -4,39 +4,46 @@
             <a-tab-pane key="1">
                 <span slot="tab">
                     <a-icon type="template" />
+                    字典管理
+                </span>
+                <dictionary-info></dictionary-info>
+            </a-tab-pane>
+            <a-tab-pane key="2">
+                <span slot="tab">
+                    <a-icon type="template" />
                     打印模板设置
                 </span>
                 <print-template></print-template>
             </a-tab-pane>
-            <a-tab-pane key="2">
+            <a-tab-pane key="3">
                 <span slot="tab">
                     <a-icon type="pay" />
                     支付配置
                 </span>
                 <pay-settings></pay-settings>
             </a-tab-pane>
-            <a-tab-pane key="3">
+            <a-tab-pane key="4">
                 <span slot="tab">
                     <a-icon type="payinterface" />
                     支付接口配置
                 </span>
                 <pay-api-settings></pay-api-settings>
             </a-tab-pane>
-            <a-tab-pane key="4">
+            <a-tab-pane key="5">
                 <span slot="tab">
                     <a-icon type="parameter" />
                     参数配置
                 </span>
                 <param-settings></param-settings>
             </a-tab-pane>
-            <a-tab-pane key="5">
+            <a-tab-pane key="6">
                 <span slot="tab">
                     <a-icon type="waiter" />
                     服务员配置
                 </span>
                 <waiter-settings></waiter-settings>
             </a-tab-pane>
-            <a-tab-pane key="6">
+            <a-tab-pane key="7">
                 <span slot="tab">
                     <a-icon type="salesperson" />
                     营销人员管理
@@ -54,8 +61,10 @@
     import ParamSettings from "./components/paramSettings";
     import WaiterSettings from "./components/waiterSettings";
     import SalesPersonInfo from "./components/salesPersonInfo";
+    import DictionaryInfo from "./components/dictionaryInfo";
     export default {
         components:{
+            DictionaryInfo,
             SalesPersonInfo,
             WaiterSettings,
             ParamSettings,

+ 2 - 2
vue.config.js

@@ -108,7 +108,7 @@ module.exports = {
       /* 注意:jeecgboot前端做了改造,此处不需要配置跨域和后台接口(只需要改.env相关配置文件即可)
           issues/3462 很多人此处做了配置,导致刷新前端404问题,请一定注意*/
       '/jeecg-boot': {
-        target: 'http://localhost:8070',
+        target: 'http://localhost:8080',
         ws: false,
         changeOrigin: true
       },
@@ -116,4 +116,4 @@ module.exports = {
   },
 
   lintOnSave: undefined
-}
+}