Browse Source

Merge branch 'deploy_0804' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into deploy_0804

lilei 3 years ago
parent
commit
5a2f40c8a3

+ 40 - 0
src/api/salesman.js

@@ -0,0 +1,40 @@
+import { axios } from '@/utils/request'
+
+//  业务员列表  分页
+export const employeeList = (params) => {
+  const url = `/employee/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 新增/编辑业务员
+export const employeeSave = params => {
+  return axios({
+    url: '/employee/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 审核
+export const employeeAudit = params => {
+  return axios({
+    url: `/employee/audit/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 业务员详情
+export const employeeDetail = params => {
+  return axios({
+    url: `/employee/queryById/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 25 - 25
src/config/router.config.js

@@ -329,32 +329,32 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/salesManagement/salesman',
+            redirect: '/salesManagement/salesman/list',
+            name: 'salesman',
+            component: RouteView,
+            meta: {
+              title: '业务员管理',
+              icon: 'file-search'
+              // permission: 'M_giftRecordList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'salesmanList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesman/list.vue'),
+                meta: {
+                  title: '业务员列表',
+                  icon: 'file-search',
+                  hidden: true
+                  // permission: 'M_giftRecordList'
+                }
+              }
+            ]
           }
-          // {
-          //   path: '/salesManagement/salesman',
-          //   redirect: '/salesManagement/salesman/list',
-          //   name: 'salesman',
-          //   component: RouteView,
-          //   meta: {
-          //     title: '业务员管理',
-          //     icon: 'file-search'
-          //     // permission: 'M_giftRecordList'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'salesmanList',
-          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesman/list.vue'),
-          //       meta: {
-          //         title: '业务员列表',
-          //         icon: 'file-search',
-          //         hidden: true
-          //         // permission: 'M_giftRecordList'
-          //       }
-          //     }
-          //   ]
-          // }
         ]
       },
       // 采购管理

+ 1 - 1
src/views/salesManagement/salesQuery/list.vue

@@ -219,7 +219,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '来源', dataIndex: 'salesBillSourceDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 120, align: 'center' },
+        { title: '店内单号', scopedSlots: { customRender: 'salesBillNo' }, width: 120, align: 'center' },
         { title: '采购单号', dataIndex: 'purchaseBillNo', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'totalCategory', width: 60, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 112 - 168
src/views/salesManagement/salesman/editModal.vue

@@ -4,13 +4,13 @@
     class="supplierInfoEdit-modal"
     :footer="null"
     :maskClosable="false"
-    :title="modalTit"
+    :title="modalTitle"
     v-model="isShow"
     @cancle="isShow=false"
     :width="800">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 表单 -->
-      <div>
+      <div v-if="isEdit">
         <a-form-model
           id="supplierInfoEdit-form"
           ref="ruleForm"
@@ -19,78 +19,54 @@
           :label-col="formItemLayout.labelCol"
           :wrapper-col="formItemLayout.wrapperCol"
         >
-          <a-form-model-item label="供应商名称" prop="supplierName">
+          <a-form-model-item label="姓名" prop="name">
             <a-input
-              id="supplierInfoEdit-supplierName"
+              id="supplierInfoEdit-name"
               :maxLength="30"
-              v-model.trim="form.supplierName"
+              v-model.trim="form.name"
               @change="filterEmpty"
-              placeholder="请输入供应商名称(最多30个字符)"
+              placeholder="请输入姓名(最多30个字符)"
               allowClear />
           </a-form-model-item>
-          <a-form-model-item label="所在地区" required style="margin: 0;">
-            <a-row :gutter="20">
-              <!-- 所在地区 -->
-              <a-col span="8">
-                <a-form-model-item prop="provinceSn">
-                  <a-select id="supplierInfoEdit-provinceSn" allowClear @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
-                    <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col span="8">
-                <a-form-model-item prop="citySn">
-                  <a-select id="supplierInfoEdit-citySn" allowClear @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
-                    <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col span="8">
-                <a-form-model-item prop="countySn">
-                  <a-select id="supplierInfoEdit-countySn" allowClear @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
-                    <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-            </a-row>
-          </a-form-model-item>
-          <a-form-model-item label="详细地址" prop="supplierAddress">
+          <a-form-model-item label="身份证号">
             <a-input
-              id="supplierInfoEdit-supplierAddress"
+              id="supplierInfoEdit-idCard"
               :maxLength="60"
-              v-model="form.supplierAddress"
-              placeholder="请输入详细地址(最多60个字符)"
+              v-model="form.idCard"
+              placeholder="请输入身份证号(最多30个字符)"
               allowClear />
           </a-form-model-item>
-          <a-form-model-item label="联系人" prop="contactPerson">
+          <a-form-model-item label="手机号码" prop="mobile">
             <a-input
-              id="supplierInfoEdit-contactPerson"
+              id="supplierInfoEdit-mobile"
               :maxLength="30"
-              v-model="form.contactPerson"
-              placeholder="请输入联系人(最多30个字符)"
+              v-model="form.mobile"
+              placeholder="请输入手机号码(最多11个字符)"
               allowClear />
           </a-form-model-item>
-          <a-form-model-item label="联系电话" prop="contactTel">
-            <a-input
-              id="supplierInfoEdit-contactTel"
-              :maxLength="20"
-              v-model="form.contactTel"
-              placeholder="请输入联系电话(最多20个字符)"
-              allowClear />
-          </a-form-model-item>
-          <a-form-model-item label="主营内容" prop="businessScope">
-            <a-textarea
-              id="supplierInfoEdit-businessScope"
-              :maxLength="200"
-              v-model="form.businessScope"
-              placeholder="请输入主营内容(最多200个字符)"
-              allowClear />
+          <a-form-model-item label="入职时间" prop="entryDate">
+            <a-date-picker
+              v-model="form.entryDate"
+              type="date"
+              :disabled-date="disabledDate"
+              placeholder="请选择入职时间"
+              style="width: 100%;"
+            />
           </a-form-model-item>
-          <a-form-model-item label="状态" prop="enabledFlag" v-if="isState">
+          <a-form-model-item label="性别" prop="sex">
             <a-radio-group
               name="radioGroup"
-              v-model="form.enabledFlag"
+              v-model="form.sex"
               id="supplierInfoEdit-enabledFlag" >
+              <a-radio :value="0">女</a-radio>
+              <a-radio :value="1">男</a-radio>
+            </a-radio-group>
+          </a-form-model-item>
+          <a-form-model-item label="状态" prop="enableFlag">
+            <a-radio-group
+              name="radioGroup"
+              v-model="form.enableFlag"
+              id="enableFlag" >
               <a-radio :value="1">启用</a-radio>
               <a-radio :value="0">禁用</a-radio>
             </a-radio-group>
@@ -101,13 +77,34 @@
           <a-button id="supplierInfoEdit-btn-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
         </div>
       </div>
+      <!-- 详情 -->
+      <a-descriptions size="small" :column="2" v-if="!isEdit">
+        <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="客户地址">
+          <div v-if="detailData&&(detailData.shippingAddressProvinceName || detailData.shippingAddressCityName || detailData.shippingAddressCountyName || detailData.shippingAddress)">
+            {{ detailData&&detailData.shippingAddressProvinceName || '' }}
+            {{ detailData&&detailData.shippingAddressCityName || '' }}
+            {{ detailData&&detailData.shippingAddressCountyName || '' }}
+            {{ detailData&&detailData.shippingAddress || '' }}
+          </div>
+          <span v-else>--</span>
+        </a-descriptions-item>
+        <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleEntity&&detailData.settleStyleEntity.name || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="联系电话">{{ detailData&&detailData.consigneeTel || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="制单人">{{ detailData&&detailData.operatorName || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="业务员">{{ detailData&&detailData.salesManName || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
+      </a-descriptions>
     </a-spin>
   </a-modal>
 </template>
 
 <script>
-import { getArea } from '@/api/data'
-import { supplierDetail, supplierSave } from '@/api/supplier'
+import { employeeSave, employeeDetail } from '@/api/salesman'
+import moment from 'moment'
 export default {
   name: 'SupplierInfoEditModal',
   props: {
@@ -119,16 +116,20 @@ export default {
       type: [Number, String],
       default: ''
     },
+    modalTitle: {
+      type: String,
+      default: ''
+    },
     isState: { //  是否显示状态
       type: Boolean,
       default: true
     }
   },
-  computed: {
-    modalTit () {
-      return this.itemId ? '编辑' : '新增'
-    }
-  },
+  // computed: {
+  //   modalTit () {
+  //     return this.itemId ? '编辑' : '新增'
+  //   }
+  // },
   data () {
     return {
       spinning: false,
@@ -137,53 +138,48 @@ export default {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
       },
+      isEdit: false, // 是否为编辑
       form: {
-        supplierName: '', // 供应商名称
-        provinceSn: undefined, //  省
-        provinceName: '',
-        citySn: undefined, // 市
-        cityName: '',
-        countySn: undefined, // 区
-        countyName: '',
-        supplierAddress: '', //  详细地址
-        contactPerson: '', //  联系人
-        contactTel: '', //  联系电话
-        businessScope: '', //  主营内容
-        enabledFlag: 1 //  启禁用
+        name: '', // 姓名
+        mobile: '', //  联系电话
+        enableFlag: 1, //  启禁用
+        sex: 1, // 性别
+        idCard: '', // 身份证号
+        entryDate: undefined // 入职时间
       },
       rules: {
-        supplierName: [
-          { required: true, message: '请输入供应商名称', trigger: 'blur' }
-        ],
-        provinceSn: [
-          { required: true, message: '请选择省', trigger: 'change' }
-        ],
-        citySn: [
-          { required: true, message: '请选择市', trigger: 'change' }
+        name: [
+          { required: true, message: '请输入姓名', trigger: 'blur' }, { pattern: '^[^<|>]{1,30}$', message: '请输入不含<或>的字符,最多30个字符' }
         ],
-        countySn: [
-          { required: true, message: '请选择区/县', trigger: 'change' }
+        // supplierAddress: [
+        //   { required: true, message: '请输入身份证号码', trigger: 'blur' }
+        // ],
+        mobile: [
+          { required: true, message: '请输入手机号码', trigger: 'blur' }, { pattern: /^[1][0-9]{10}$/, message: '请输入正确的手机号码!' }
         ],
-        supplierAddress: [
-          { required: true, message: '请输入详细地址', trigger: 'blur' }
-        ],
-        contactPerson: [
-          { required: true, message: '请输入联系人', trigger: 'blur' }
-        ],
-        contactTel: [
-          { required: true, message: '请输入联系人电话', trigger: 'blur' }
+        entryDate: [
+          { required: true, message: '请选择入职时间', trigger: 'change' }
 
         ],
-        enabledFlag: [
+        sex: [
+          { required: true, message: '请选择性别', trigger: 'change' }
+        ],
+        enableFlag: [
           { required: true, message: '请选择状态', trigger: 'change' }
         ]
-      },
-      addrProvinceList: [], //  省下拉
-      addrCityList: [], //  市下拉
-      addrDistrictList: [] //  区下拉
+      }
     }
   },
   methods: {
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 不可选日期
+    disabledDate (current) {
+      return current && current > moment().endOf('day')
+    },
     filterEmpty () {
       let str = this.form.supplierName
       str = str.replace(/\ +/g, '')
@@ -193,10 +189,8 @@ export default {
     },
     //  获取供应商信息
     getDetail () {
-      supplierDetail({ id: this.itemId }).then(res => {
+      employeeDetail({ id: this.itemId }).then(res => {
         if (res.status == 200) {
-          if (res.data.provinceSn) { this.getArea('city', res.data.provinceSn) }
-          if (res.data.citySn) { this.getArea('district', res.data.citySn) }
           this.form = Object.assign(this.form, res.data)
           this.form.enabledFlag = Number(this.form.enabledFlag)
         }
@@ -209,9 +203,10 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = _this.form
+          form.entryDate = moment(form.entryDate).format('YYYY-MM-DD 00:00:00')
           form.id = this.itemId ? this.itemId : null
           _this.spinning = true
-          supplierSave(form).then(res => {
+          employeeSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok')
@@ -226,66 +221,6 @@ export default {
           return false
         }
       })
-    },
-    // 获取城市列表
-    getCityList (val) {
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.form.citySn = undefined
-      this.form.countySn = undefined
-      if (val) {
-        this.getArea('city', val)
-        this.form.provinceName = this.addrProvinceList.find(item => item.areaSn == val).name
-      } else {
-        this.form.provinceName = ''
-      }
-    },
-    // 获取区县列表
-    getAreaList (val) {
-      this.addrDistrictList = []
-      this.form.countySn = undefined
-      if (val) {
-        this.getArea('district', val)
-        this.form.cityName = this.addrCityList.find(item => item.areaSn == val).name
-      } else {
-        this.form.cityName = ''
-      }
-    },
-    // 区县变更
-    areaCharged (val) {
-      if (val) {
-        this.form.countyName = this.addrDistrictList.find(item => item.areaSn == val).name
-      } else {
-        this.form.countyName = ''
-      }
-    },
-    //  省/市/区
-    getArea (leve, sn) {
-      let params
-      if (leve == 'province') {
-        params = { type: '2' }
-      } else {
-        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
-      }
-      getArea(params).then(res => {
-        if (res.status == 200) {
-          if (leve == 'province') {
-            this.addrProvinceList = res.data || []
-          } else if (leve == 'city') {
-            this.addrCityList = res.data || []
-          } else if (leve == 'district') {
-            this.addrDistrictList = res.data || []
-          }
-        } else {
-          if (leve == 'province') {
-            this.addrProvinceList = []
-          } else if (leve == 'city') {
-            this.addrCityList = []
-          } else if (leve == 'district') {
-            this.addrDistrictList = []
-          }
-        }
-      })
     }
   },
   watch: {
@@ -297,18 +232,27 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.isEdit = true
         this.$refs.ruleForm.resetFields()
-        this.addrCityList = []
-        this.addrDistrictList = []
-      } else {
-        this.getArea('province')
       }
     },
     itemId (newValue, oldValue) {
-      if (this.isShow && newValue) { //  编辑
+      console.log(newValue, 'newValuenewValue')
+      if (this.isShow && newValue) {
+        console.log(this.isShow)
         this.getDetail()
       }
+    },
+    modalTitle (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        if (newValue == '编辑' || newValue == '新增') {
+          this.isEdit = true
+        } else {
+          this.isEdit = false
+        }
+      }
     }
+
   }
 }
 </script>

+ 96 - 22
src/views/salesManagement/salesman/list.vue

@@ -5,18 +5,34 @@
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-item label="供应商名称">
-              <a-input id="salesmanList-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
+            <a-form-item label="姓名">
+              <a-input id="salesmanList-supplierName" v-model.trim="queryParam.name" allowClear placeholder="请输入供应商名称"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="状态">
-              <v-select code="ENABLE_FLAG" id="salesmanList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+              <v-select code="FLAG" id="salesmanList-enableFlag" v-model="queryParam.enableFlag" allowClear placeholder="请选择状态"></v-select>
             </a-form-item>
           </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="创建时间">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-item>
+          </a-col>
+          <!-- <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="审核">
+                <v-select code="ENABLE_FLAG" id="salesmanList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+              </a-form-item>
+            </a-col>
+          </template> -->
           <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesmanList-refresh">查询</a-button>
             <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesmanList-reset">重置</a-button>
+            <!-- <a @click="advanced=!advanced" style="margin-left: 5px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a> -->
           </a-col>
         </a-row>
       </a-form>
@@ -27,6 +43,7 @@
         id="salesmanList-add"
         type="primary"
         class="button-error"
+        style="margin-top: 10px;"
         @click="handleEdit()">新增</a-button>
     </div>
     <!-- 列表 -->
@@ -42,41 +59,57 @@
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
+        <!-- <a-button
+          size="small"
+          type="link"
+          class="button-warning"
+          @click="handleSend(record)"
+          id="salesmanList-edit-btn">通过</a-button> -->
         <a-button
           size="small"
           type="link"
           class="button-info"
-          @click="handleEdit(record)"
+          @click="handleEdit(record,1)"
           id="salesmanList-edit-btn">编辑</a-button>
+        <a-button
+          size="small"
+          type="link"
+          class="button-success"
+          @click="handleEdit(record,2)"
+          id="salesmanList-edit-btn">详情</a-button>
         <!-- <span v-else>--</span> -->
       </template>
     </s-table>
     <!-- 供应商 -->
-    <salesman-edit-modal :itemId="itemId" :openModal="openModal" @close="closeModal" />
+    <salesman-edit-modal :itemId="itemId" :modalTitle="modalTitle" :openModal="openModal" @close="closeModal" />
   </a-card>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-import { supplierList } from '@/api/supplier'
+import { employeeList, employeeAudit } from '@/api/salesman'
 import salesmanEditModal from './editModal.vue'
+import rangeDate from '@/views/common/rangeDate.vue'
 export default {
-  components: { STable, VSelect, salesmanEditModal },
+  components: { STable, VSelect, salesmanEditModal, rangeDate },
   data () {
     return {
+      advanced: true, // 高级搜索 展开/关闭
+      modalTitle: '', // 弹窗title
       queryParam: { //  查询条件
-        supplierName: '', //  供应商名称
-        enabledFlag: undefined //  状态
+        beginDate: '',
+        endDate: '',
+        name: '', //  姓名
+        enableFlag: undefined //  状态
       },
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '供应商名称', dataIndex: 'supplierName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '地址', dataIndex: 'address', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '联系人', dataIndex: 'contactPerson', width: 150, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '联系电话', dataIndex: 'contactTel', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '主营内容', dataIndex: 'businessScope', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '姓名', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '性别', dataIndex: 'sex', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '联系电话', dataIndex: 'mobile', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入职日期', dataIndex: 'entryDate', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'enabledFlagDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
@@ -85,16 +118,11 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return supplierList(Object.assign(parameter, this.queryParam)).then(res => {
+        return employeeList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
-            const provinceName = data.list[i].provinceName ? data.list[i].provinceName : ''
-            const cityName = data.list[i].cityName ? data.list[i].cityName : ''
-            const countyName = data.list[i].countyName ? data.list[i].countyName : ''
-            const supplierAddress = data.list[i].supplierAddress ? data.list[i].supplierAddress : ''
-            data.list[i].address = provinceName + cityName + countyName + supplierAddress
           }
           this.disabled = false
           this.spinning = false
@@ -106,6 +134,11 @@ export default {
     }
   },
   methods: {
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.supplierName = ''
@@ -113,10 +146,43 @@ export default {
       this.$refs.table.refresh(true)
     },
     //  新增/编辑
-    handleEdit (row) {
-      this.itemId = row && row.id ? row.id : null
+    handleEdit (row, type) {
+      if (row) {
+        this.itemId = row && row.id ? row.id : null
+        if (type == 1) {
+          this.modalTitle = '编辑'
+        } else {
+          this.modalTitle = '详情'
+        }
+      } else {
+        this.modalTitle = '新增'
+      }
       this.openModal = true
     },
+    //  通过
+    handleSend (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '审核通过后该类型名称不能更改,确定审核通过该类型名称?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          employeeAudit({
+            salesBillSn: row.id
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
     // 关闭弹框
     closeModal () {
       this.itemId = ''
@@ -128,6 +194,14 @@ export default {
       this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    }
+  },
   mounted () {
     const _this = this
     this.$nextTick(() => { // 页面渲染完成后的回调