ソースを参照

销售管理-客户管理

chenrui 4 年 前
コミット
e7af83d66e

+ 57 - 10
src/config/router.config.js

@@ -93,6 +93,53 @@ export const asyncRouterMap = [{
             }
           }
         ]
+      },
+      {
+        path: '/salesManagement/customerManagement',
+        redirect: '/salesManagement/customerManagement/list',
+        name: 'customerManagement',
+        component: RouteView,
+        meta: {
+          title: '客户管理',
+          icon: 'shopping'
+          // permission: 'M_goodsManage_list'
+        },
+        hideChildrenInMenu: true,
+        children: [
+          {
+            path: '/salesManagement/customerManagement/list',
+            name: 'customerManagementList',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/salesManagement/customerManagement/list.vue'),
+            meta: {
+              title: '客户列表',
+              icon: 'shopping',
+              hidden: true
+              // permission: 'M_goodsManage_list'
+            }
+          },
+          {
+            path: '/salesManagement/customerManagement/add',
+            name: 'customerManagementAdd',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/salesManagement/customerManagement/edit.vue'),
+            meta: {
+              title: '新增客户',
+              icon: 'shopping',
+              hidden: true
+              // permission: 'B_goodsManage_edit'
+            }
+          },
+          {
+            path: '/salesManagement/customerManagement/edit/:id',
+            name: 'customerManagementEdit',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/salesManagement/customerManagement/edit.vue'),
+            meta: {
+              title: '编辑客户',
+              icon: 'shopping',
+              hidden: true
+              // permission: 'B_goodsManage_edit'
+            }
+          }
+        ]
       }
     ]
   },
@@ -271,16 +318,16 @@ export const asyncRouterMap = [{
         permission: 'M_sys_dataDictionary'
       }
     },
-    {
-      path: '/setting/register',
-      name: 'powerRegister',
-      component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
-      meta: {
-        title: '参数管理',
-        icon: 'key',
-        permission: 'M_sys_register'
-      }
-    },
+    // {
+    //   path: '/setting/register',
+    //   name: 'powerRegister',
+    //   component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
+    //   meta: {
+    //     title: '参数管理',
+    //     icon: 'key',
+    //     permission: 'M_sys_register'
+    //   }
+    // },
     {
       path: '/setting/OperateJournal',
       name: 'powerOperateJournal',

+ 168 - 146
src/views/basicData/supplierManagement/edit.vue

@@ -1,16 +1,9 @@
 <template>
   <a-card :bordered="false" class="supplierManagementEdit-table-page-wrapper">
-    <!-- <a-form
-      id="supplierManagementEdit-form"
-      :form="form"
-      ref="form"
-      v-bind="formItemLayout"
-      @submit="handleSubmit"> -->
     <a-form-model
       id="supplierManagementEdit-form"
       ref="ruleForm"
       :model="form"
-      :layout="formItemLayout"
       :rules="rules"
       :label-col="formItemLayout.labelCol"
       :wrapper-col="formItemLayout.wrapperCol"
@@ -23,79 +16,77 @@
           placeholder="请输入供应商名称(最多30个字符)"
           allowClear />
       </a-form-model-item>
-      <!-- <a-form-model-item label="商品分类" prop="peopleLimitCount">
-        <a-select
-          id="supplierManagementEdit-goodsTypeNo"
-          allowClear
-          v-decorator="[
-            'form.goodsTypeNo',
-            { initialValue: form.goodsTypeNo,
-              rules: [{ required: true, message: '请选择商品分类' }] },
-          ]"
-          placeholder="请选择商品分类">
-          <a-select-option v-for="(item,index) in goodsTypeList" :key="index" :value="item.goodsTypeNo" :disabled="item.state==0">{{ item.name }}</a-select-option>
-        </a-select>
+      <a-form-model-item label="所在地区" required style="margin: 0;">
+        <a-row :gutter="20">
+          <!-- 所在地区 -->
+          <a-col span="8">
+            <a-form-model-item prop="provinceCode">
+              <a-select id="supplierManagementEdit-provinceCode" @change="getCityList" v-model="form.provinceCode" placeholder="请选择省">
+                <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col span="8">
+            <a-form-model-item prop="cityCode">
+              <a-select id="supplierManagementEdit-cityCode" @change="getAreaList" v-model="form.cityCode" placeholder="请选择市">
+                <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col span="8">
+            <a-form-model-item prop="districtCode">
+              <a-select id="supplierManagementEdit-districtCode" @change="areaCharged" v-model="form.districtCode" placeholder="请选择区/县">
+                <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + '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="peopleLimitCount">
-        <a-input-number
-          id="supplierManagementEdit-sellGold"
-          class="inpNumber-unit"
-          :min="0"
-          :max="999999"
-          :precision="0"
-          v-decorator="[ 'form.sellGold', { initialValue: form.sellGold, rules: [{ required: true, message: '请输入商品价格(0~999999)' }] } ]"
-          placeholder="请输入商品价格(0~999999)。10个乐豆等值于1元"
+      <a-form-model-item label="详细地址" prop="address">
+        <a-input
+          id="supplierManagementEdit-address"
+          :maxLength="60"
+          v-model="form.address"
+          placeholder="请输入详细地址(最多60个字符)"
           allowClear />
-        <span class="inp-unit">乐豆</span>
       </a-form-model-item>
-      <a-form-model-item label="商品状态" prop="peopleLimitCount" v-if="!isEdit">
-        <v-select
-          ref="state"
-          code="GOODS_STATE"
-          allowClear
-          id="supplierManagementEdit-state"
-          placeholder="请选择商品状态"
-          v-decorator="['form.state', { initialValue: form.state, rules: [
-            { required: true, message: '请选择商品状态' },
-            { validator: stateValidator }
-          ] }]"
-        ></v-select>
+      <a-form-model-item label="联系人" prop="contactName">
+        <a-input
+          id="supplierManagementEdit-contactName"
+          :maxLength="30"
+          v-model="form.contactName"
+          placeholder="请输入联系人(最多30个字符)"
+          allowClear />
       </a-form-model-item>
-      <a-form-model-item label="库存数量" prop="peopleLimitCount">
-        <a-input-number
-          id="supplierManagementEdit-inventoryQty"
-          class="inpNumber"
-          :min="0"
-          :max="999999"
-          :precision="0"
-          v-decorator="['form.inventoryQty', { initialValue: form.inventoryQty, rules: [
-            { required: true, message: '请输入库存数量' },
-            { validator: inventoryQtyValidator }
-          ] }]"
-          placeholder="请输入库存数量(0~999999)。当库存数量为0时显示为已售罄且无法下单"
+      <a-form-model-item label="联系电话" prop="contactPhone">
+        <a-input
+          id="supplierManagementEdit-contactPhone"
+          :maxLength="20"
+          v-model="form.contactPhone"
+          placeholder="请输入联系电话(最多20个字符)"
           allowClear />
       </a-form-model-item>
-      <a-form-model-item label="供货商" prop="peopleLimitCount">
-        <a-select
-          id="supplierManagementEdit-officialPartnerNo"
-          allowClear
-          :disabled="isEdit"
-          v-decorator="[
-            'form.officialPartnerNo',
-            { initialValue: form.officialPartnerNo,
-              rules: [{ required: true, message: '请选择供货商' }] },
-          ]"
-          placeholder="请选择供货商">
-          <a-select-option v-for="(item,index) in partnerList" :key="index" :value="item.officialPartnerNo" :disabled="item.state==0">{{ item.name }}</a-select-option>
-        </a-select>
+      <a-form-model-item label="主营内容" prop="remarks">
+        <a-textarea
+          id="supplierManagementEdit-remarks"
+          :maxLength="500"
+          v-model="form.remarks"
+          placeholder="请输入主营内容(最多500个字符)"
+          allowClear />
       </a-form-model-item>
-      <a-form-model-item label="商品详情" prop="peopleLimitCount">
-        <editor id="supplierManagementEdit-editor" ref="editor" class="supplierManagementEdit-editor" @on-change="editorChange" :cache="false"></editor>
+      <a-form-model-item label="状态" prop="state">
+        <a-radio-group
+          name="radioGroup"
+          v-model="form.state"
+          id="supplierManagementEdit-state" >
+          <a-radio :value="1">启用</a-radio>
+          <a-radio :value="0">禁用</a-radio>
+        </a-radio-group>
       </a-form-model-item>
       <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-        <a-button type="primary" html-type="submit" id="supplierManagementEdit-btn-submit" style="margin-right: 15px">保存</a-button>
-        <a-button @click="close" style="margin-left: 15px" id="supplierManagementEdit-btn-close">取消</a-button>
-      </a-form-model-item> -->
+        <a-button type="primary" @click="handleSubmit" id="supplierManagementEdit-btn-submit">保存</a-button>
+        <a-button @click="goBack" style="margin-left: 15px" id="supplierManagementEdit-btn-back">返回列表</a-button>
+      </a-form-model-item>
     </a-form-model>
   </a-card>
 </template>
@@ -113,23 +104,48 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        homeImage: '', //  首页图
-        images: '', //  商品图
-        name: '', // 商品名称
-        goodsTypeNo: undefined, // 商品分类
-        sellGold: '', //  商品价格
-        state: '', //  商品状态
-        inventoryQty: '', // 库存数量
-        officialPartnerNo: undefined, //  供货商
-        desc: null //  商品详情
+        name: '', // 供应商名称
+        provinceCode: undefined, //  省
+        provinceName: '',
+        cityCode: undefined, // 市
+        cityName: '',
+        districtCode: undefined, // 区
+        districtName: '',
+        address: '', //  详细地址
+        contactName: '',  //  联系人
+        contactPhone: '',  //  联系电话
+        remarks: '',  //  主营内容
+        state: 0  //  启禁用
       },
       rules: {
         name: [
           { required: true, message: '请输入供应商名称', trigger: 'blur' }
+        ],
+        provinceCode: [
+          { required: true, message: '请选择省', trigger: 'change' }
+        ],
+        cityCode: [
+          { required: true, message: '请选择市', trigger: 'change' }
+        ],
+        districtCode: [
+          { required: true, message: '请选择区/县', trigger: 'change' }
+        ],
+        address: [
+          { required: true, message: '请输入详细地址', trigger: 'blur' }
+        ],
+        contactName: [
+          { required: true, message: '请输入联系人', trigger: 'blur' }
+        ],
+        contactPhone: [
+          { required: true, message: '请输入联系人电话', trigger: 'blur' }
+        ],
+        state: [
+          { required: true, message: '请选择状态', trigger: 'change' }
         ]
       },
-      goodsTypeList: [], //  商品分类下拉数据
-      partnerList: [] //  供应商下拉数据
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [] //  区下拉
     }
   },
   computed: {
@@ -138,94 +154,100 @@ export default {
     }
   },
   methods: {
-    //  商品状态自定义校验
-    stateValidator (rule, value, callback) {
-      if (value == 1 && String(this.form.getFieldValue('form.inventoryQty')) && this.form.getFieldValue('form.inventoryQty') == 0) {
-        callback(new Error('库存为0的商品不能上架'))
-      } else {
-        callback()
-      }
+    //  获取供应商信息
+    getGoodsDetail () {
+      // goodsFind({ id: this.$route.params.id }).then(res => {
+      //   if (res.status == 200) {
+      //     this.form = Object.assign(this.form, res.data)
+      //   }
+      // })
     },
-    //  输入库存数量调起商品状态校验
-    inventoryQtyValidator (rule, value, callback) {
-      this.form.validateFields(['form.state'], (errors, values) => {
-        if (!errors) {
-          callback()
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = values.form
+          form.desc = _this.form.desc
+          form.id = this.isEdit ? this.$route.params.id : null
+          console.log(form,'-----提交信息')
+          // goodsSave(form).then(res => {
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     setTimeout(() => {
+          //       _this.$router.push({ path: '/shop/goods/list' })
+          //     }, 1000)
+          //   }
+          // })
+        } else {
+          console.log('error submit!!')
+          return false
         }
       })
     },
-    //  获取商品详情
-    getGoodsDetail () {
-      goodsFind({ id: this.$route.params.id }).then(res => {
-        if (res.status == 200) {
-          this.form = Object.assign(this.form, res.data)
-          this.$refs.homeImage.setFileList(res.data.homeImage)
-          this.$refs.goodsImage.setFileList(res.data.images)
-          this.$refs.editor.setHtml(this.form.desc)
-        }
-      })
+    //  返回
+    goBack () {
+      this.$router.push({ path: '/basicData/supplierManagement/list' })
     },
-    //  商品分类下拉数据
-    getGoodsType () {
-      goodsTypeQueryList({}).then(res => {
+    // 获取省列表'
+    getProvinceList () {
+      getProvince().then(res => {
         if (res.status == 200) {
-          this.goodsTypeList = res.data
+          this.addrProvinceList = res.data || []
         } else {
-          this.goodsTypeList = []
+          this.addrProvinceList = []
         }
       })
     },
-    //  供应商下拉数据
-    getPartnerQueryList () {
-      supplierQueryList({}).then(res => {
+    // 获取城市列表
+    getCityList (val) {
+      this.addrCityList = []
+      this.addrDistrictList = []
+      this.form.cityCode = undefined
+      this.form.districtCode = undefined
+      this.form.address = ''
+      this.getCityListRequest(val)
+    },
+    getCityListRequest (val) {
+      getCityByPro({
+        id: val
+      }).then(res => {
         if (res.status == 200) {
-          this.partnerList = res.data
+          this.addrCityList = res.data || []
         } else {
-          this.partnerList = []
+          this.addrCityList = []
         }
       })
     },
-    //  保存
-    handleSubmit (e) {
-      e.preventDefault()
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          const form = values.form
-          form.desc = _this.form.desc
-          form.id = this.isEdit ? this.$route.params.id : null
-          goodsSave(form).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              setTimeout(() => {
-                _this.$router.push({ path: '/shop/goods/list' })
-              }, 1000)
-            }
-          })
+    // 获取区县列表
+    getAreaList (val) {
+      this.addrDistrictList = []
+      this.form.districtCode = undefined
+      this.form.address = ''
+      this.getAreaListRequest(val)
+    },
+    getAreaListRequest (val) {
+      getDistrictByCity({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrDistrictList = res.data || []
+        } else {
+          this.addrDistrictList = []
         }
       })
     },
-    //  取消
-    close () {
-      this.$router.push({ path: '/shop/goods/list' })
-    },
-    //  商品图上传
-    changeImage (file) {
-      this.form.images = file
-    },
-    //  首页图上传
-    changeHomeImage (file) {
-      this.form.homeImage = file
-    },
-    //  商品详情  文本编辑器
-    editorChange (html, text) {
-      this.form.desc = html
+    // 区县变更
+    areaCharged (val) {
+      this.form.address = ''
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
       // vm.getGoodsType()
       // vm.getPartnerQueryList()
+      vm.$refs.ruleForm.resetFields()
       if (vm.isEdit) { //  编辑页
         vm.getGoodsDetail()
       }

+ 9 - 67
src/views/basicData/supplierManagement/list.vue

@@ -3,20 +3,18 @@
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :lg="6" :sm="12">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
             <a-form-item label="供应商名称">
               <a-input id="supplierManagementList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入供应商名称"/>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="状态">
-              <a-select id="supplierManagementList-bundleNames" placeholder="请选择" allowClear v-model="queryParam.brand">
-                <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
-              </a-select>
+              <v-select code="CHECK_ENABLE_STATE" id="supplierManagementList-state" v-model="queryParam.state" allowClear placeholder="请选择状态"></v-select>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="supplierManagementList-refresh">查询</a-button>
             <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="supplierManagementList-reset">重置</a-button>
           </a-col>
@@ -51,23 +49,18 @@
 <script>
 import moment from 'moment'
 // import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
-import { STable } from '@/components'
+import { STable, VSelect } from '@/components'
 export default {
-  components: { STable },
+  components: { STable, VSelect },
   data () {
     return {
       labelCol: { span: 10 },
       wrapperCol: { span: 14 },
       queryParam: { //  查询条件
-        orderBundleNo: '', //  订单编号
-        bundleName: '', //  套餐名称
-        itemName: '', //  服务名称
-        brand: undefined,  //  产品品牌
+        bundleName: '', //  供应商名称
+        state: undefined,  //  状态
       },
-      exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
-      brandData: [],  //  产品品牌下拉数据
-      typeData: [],  //  产品类别下拉数据
       columns: [
         { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
         { title: '供应商名称', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true },
@@ -108,8 +101,6 @@ export default {
           resolve(data)
         })
       },
-      openModal: false,  //  查看库存详情  弹框
-      itemId: ''  //  当前库存记录id
     }
   },
   methods: {
@@ -130,55 +121,6 @@ export default {
     //  编辑
     handleEdit(row){
       this.$router.push({ path: `/basicData/supplierManagement/edit/${row.id}` })
-    },
-    //  库存详情
-    goDetail(row){
-      this.itemId = row.id
-      this.openModal = true
-    },
-    //  关闭弹框
-    closeModal(){
-      this.itemId = ''
-      this.openModal = false
-    },
-    //  出入库明细
-    goWarehouseDetail(row){
-      this.$router.push({ path: '/inventoryManagement/inventoryQuery/warehouseDetail' })
-    },
-    //  导出
-    handleExport () {
-      const params = this.queryParam
-      if (this.oldTime && this.oldTime.length > 0) {
-        params.beginOldExpiryDate = moment(this.oldTime[0]).format('YYYY-MM-DD')
-        params.endOldExpirydDate = moment(this.oldTime[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginOldExpiryDate = ''
-        params.endOldExpirydDate = ''
-      }
-      if (this.newTime && this.newTime.length > 0) {
-        params.beginDate = moment(this.newTime[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.newTime[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginDate = ''
-        params.endDate = ''
-      }
-      this.exportLoading = true
-      customerBundleExportDelay(params).then(res => {
-        this.exportLoading = false
-        this.download(res)
-      })
-    },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '库存查询' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
     }
   }
 }

+ 5 - 0
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -17,6 +17,7 @@
       :columns="columns"
       :data="loadData"
       bordered></s-table>
+    <div class="btn-cont"><a-button id="inventoryQueryDetail-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
   </a-modal>
 </template>
 
@@ -120,5 +121,9 @@ export default {
         width: auto;
       }
     }
+    .btn-cont {
+    	text-align: center;
+    	margin: 35px 0 10px;
+    }
   }
 </style>

+ 8 - 8
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -3,40 +3,40 @@
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :lg="6" :sm="12">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
             <a-form-item label="产品编码">
               <a-input id="inventoryQueryList-orderBundleNo" v-model.trim="queryParam.orderBundleNo" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="原厂编码">
               <a-input id="inventoryQueryList-custMobile" v-model.trim="queryParam.orderBundle.custMobile" allowClear placeholder="请输入原厂编码"/>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="产品名称">
               <a-input id="inventoryQueryList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品名称"/>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="产品品牌">
               <a-select id="inventoryQueryList-bundleNames" placeholder="请选择产品品牌" allowClear v-model="queryParam.brand">
                 <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="产品类别">
               <a-cascader :options="typeData" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="库存数量是否为0">
               <a-switch checkedChildren="是" unCheckedChildren="否" id="inventoryQueryList-bundleNamess" v-model="queryParam.inventoryNum" />
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryList-refresh">查询</a-button>
             <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryList-reset">重置</a-button>
             <a-button style="margin-left: 8px" type="danger" @click="handleExport" :disabled="disabled" :loading="exportLoading" id="inventoryQueryList-export">导出</a-button>

+ 7 - 7
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -3,29 +3,29 @@
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :lg="6" :sm="12">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
             <a-form-item label="变动类型">
               <a-select id="inventoryQueryWarehouseDetail-bundleNames" placeholder="请选择产品品牌" allowClear v-model="queryParam.brand">
                 <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="单据类型">
               <a-select id="inventoryQueryWarehouseDetail-bundleNames" placeholder="请选择产品品牌" allowClear v-model="queryParam.brand">
                 <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="仓库">
               <a-select id="inventoryQueryWarehouseDetail-bundleNames" placeholder="请选择产品品牌" allowClear v-model="queryParam.brand">
                 <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="单据审核时间">
               <a-range-picker
                   style="width:100%"
@@ -37,12 +37,12 @@
               </a-form-item>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="单位名称">
               <a-input id="inventoryQueryWarehouseDetail-orderBundleNo" v-model.trim="queryParam.orderBundleNo" allowClear placeholder="请输入单位名称"/>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
             <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-reset">重置</a-button>
           </a-col>

+ 8 - 8
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -3,42 +3,42 @@
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :lg="6" :sm="12">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
             <a-form-item label="产品编码">
               <a-input id="inventoryWarningList-orderBundleNo" v-model.trim="queryParam.orderBundleNo" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="原厂编码">
               <a-input id="inventoryWarningList-custMobile" v-model.trim="queryParam.orderBundle.custMobile" allowClear placeholder="请输入原厂编码"/>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="产品名称">
               <a-input id="inventoryWarningList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品名称"/>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="产品品牌">
               <a-select id="inventoryWarningList-bundleNames" placeholder="请选择产品品牌" allowClear v-model="queryParam.brand">
                 <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="产品类别">
               <a-cascader :options="typeData" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-form-item label="预警提示">
               <a-select id="inventoryWarningList-bundleNames" placeholder="请选择预警提示" allowClear v-model="queryParam.brand">
                 <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :lg="6" :sm="12">
+          <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryWarningList-refresh">查询</a-button>
             <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryWarningList-reset">重置</a-button>
             <a-button style="margin-left: 8px" type="danger" @click="handleExport" :disabled="disabled" :loading="exportLoading" id="inventoryWarningList-export">导出</a-button>

+ 191 - 0
src/views/salesManagement/customerManagement/detailModal.vue

@@ -0,0 +1,191 @@
+<template>
+  <a-modal
+    centered
+    class="customerManagementDetail-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="modalTit"
+    v-model="isShow"
+    @cancle="isShow=false"
+    width="80%">
+    <!-- 库存详情 -->
+    <div>
+    <!-- <div v-if="detailsData"> -->
+      <a-row :gutter="35">
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">客户名称:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">联系手机:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">联系人:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+      </a-row>
+      <a-row :gutter="35">
+        <a-col :span="24" class="item-cont">
+          <p class="item-label">客户地址:</p>
+          <p class="item-main">陕西省西安市未央区凤城八路</p>
+          <!-- <p class="item-main">{{ detailsData.provinceName }}{{ detailsData.cityName }}{{ detailsData.districtName }}{{ detailsData.address }}</p> -->
+        </a-col>
+      </a-row>
+      <a-row :gutter="35">
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">客户传真:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">配送方式:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">是否卫星仓客户:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+      </a-row>
+      <a-row :gutter="35">
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">价格类型:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">支付方式:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">收款方式:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+      </a-row>
+      <a-row :gutter="35">
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">联系电话:</p>
+          <p class="item-main">名称思密达</p>
+          <!-- <p class="item-main">{{ detailsData.name }}</p> -->
+        </a-col>
+      </a-row>
+      <div class="btn-cont"><a-button id="customer-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+export default {
+  name: 'CustomerManagementDetailModal',
+  components: { STable },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  computed: {
+    modalTit () {
+      return '客户详情'
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      detailsData: null, //  网点数据
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail(){
+      
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    },
+    itemId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetail()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .customerManagementDetail-modal{
+    .ant-modal-body {
+    	padding: 40px 40px 24px;
+    }
+    .item-cont {
+    	margin-bottom: 15px;
+    	display: flex;
+    	.item-label {
+    		width: 115px;
+    		font-size: 14px;
+    		color: rgba(0, 0, 0, 0.85);
+    		flex-shrink: 0;
+    	}
+    	.item-main {
+    		flex-grow: 1;
+        word-break: break-all;
+    		.wd-icon {
+    			display: block;
+    		}
+    	}
+    	.guidance-con {
+    		border: 1px dashed #e8e8e8;
+    		border-radius: 6px;
+    		padding: 20px;
+    		img {
+    			max-width: 100%;
+    		}
+    	}
+    	.period-price-con {
+    		border-bottom: 1px solid #e8e8e8;
+    	}
+    	.item-period {
+    		display: flex;
+    		align-items: center;
+    		justify-content: space-evenly;
+    		flex-grow: 1;
+    		border: 1px solid #e8e8e8;
+    		border-width: 1px 1px 0;
+    		text-align: center;
+    		.period,
+    		.period-price {
+    			padding: 5px 0;
+    			border-right: 1px solid #e8e8e8;
+    		}
+    		.period-price:last-child {
+    			border-right: none;
+    		}
+    	}
+    }
+    .btn-cont {
+    	text-align: center;
+    	margin: 35px 0 10px;
+    }
+  }
+</style>

+ 321 - 0
src/views/salesManagement/customerManagement/edit.vue

@@ -0,0 +1,321 @@
+<template>
+  <a-card :bordered="false" class="customerManagementEdit-table-page-wrapper">
+    <a-form-model
+      id="customerManagementEdit-form"
+      ref="ruleForm"
+      :model="form"
+      :rules="rules"
+      :label-col="formItemLayout.labelCol"
+      :wrapper-col="formItemLayout.wrapperCol"
+    >
+      <a-row :gutter="15">
+        <a-col :span="8">
+          <a-form-model-item label="客户名称" prop="name">
+            <a-input
+              id="customerManagementEdit-name"
+              :maxLength="30"
+              v-model="form.name"
+              placeholder="请输入客户名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="联系手机" prop="address">
+            <a-input
+              id="customerManagementEdit-address"
+              :maxLength="11"
+              v-model="form.address"
+              placeholder="请输入联系手机(最多11个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="联系人" prop="address">
+            <a-input
+              id="customerManagementEdit-address"
+              :maxLength="30"
+              v-model="form.address"
+              placeholder="请输入联系人(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="15">
+        <a-col :span="16">
+          <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
+            <a-row :gutter="15">
+              <!-- 客户地址 -->
+              <a-col span="8">
+                <a-form-model-item prop="provinceCode">
+                  <a-select id="customerManagementEdit-provinceCode" @change="getCityList" v-model="form.provinceCode" placeholder="请选择省">
+                    <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="8">
+                <a-form-model-item prop="cityCode">
+                  <a-select id="customerManagementEdit-cityCode" @change="getAreaList" v-model="form.cityCode" placeholder="请选择市">
+                    <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="8">
+                <a-form-model-item prop="districtCode">
+                  <a-select id="customerManagementEdit-districtCode" @change="areaCharged" v-model="form.districtCode" placeholder="请选择区/县">
+                    <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+            </a-row>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="详细地址" prop="address">
+            <a-input
+              id="customerManagementEdit-address"
+              :maxLength="60"
+              v-model="form.address"
+              placeholder="请输入详细地址(最多60个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="15">
+        <a-col :span="8">
+          <a-form-model-item label="客户传真" prop="contactName">
+            <a-input
+              id="customerManagementEdit-contactName"
+              :maxLength="30"
+              v-model="form.contactName"
+              placeholder="请输入客户传真(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="配送方式" prop="contactPhone">
+            <a-select id="customerManagementEdit-districtCode" v-model="form.districtCode" placeholder="请选择配送方式">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="是否卫星仓客户" prop="contactPhone">
+            <a-select id="customerManagementEdit-districtCode" v-model="form.districtCode" placeholder="请选择">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="15">
+        <a-col :span="8">
+          <a-form-model-item label="价格类型" prop="contactPhone">
+            <a-select id="customerManagementEdit-districtCode" v-model="form.districtCode" placeholder="请选择价格类型">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="支付方式" prop="contactPhone">
+            <a-select id="customerManagementEdit-districtCode" v-model="form.districtCode" placeholder="请选择支付方式">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="收款方式" prop="contactPhone">
+            <a-select id="customerManagementEdit-districtCode" v-model="form.districtCode" placeholder="请选择收款方式">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="15">
+        <a-col :span="8">
+          <a-form-model-item label="联系电话" prop="address">
+            <a-input
+              id="customerManagementEdit-address"
+              :maxLength="20"
+              v-model="form.address"
+              placeholder="请输入联系电话(最多20个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+        <a-button type="primary" @click="handleSubmit" id="customerManagementEdit-btn-submit">保存</a-button>
+        <a-button @click="goBack" style="margin-left: 15px" id="customerManagementEdit-btn-back">返回列表</a-button>
+      </a-form-model-item>
+    </a-form-model>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+// import { goodsSave, goodsFind } from '@/api/goods'
+export default {
+  name: 'customerManagementEdit',
+  components: { STable, VSelect },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 8 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        name: '', // 供应商名称
+        provinceCode: undefined, //  省
+        provinceName: '',
+        cityCode: undefined, // 市
+        cityName: '',
+        districtCode: undefined, // 区
+        districtName: '',
+        address: '', //  详细地址
+        contactName: '',  //  联系人
+        contactPhone: '',  //  联系电话
+        remarks: '',  //  主营内容
+        state: 0  //  启禁用
+      },
+      rules: {
+        name: [
+          { required: true, message: '请输入供应商名称', trigger: 'blur' }
+        ],
+        provinceCode: [
+          { required: true, message: '请选择省', trigger: 'change' }
+        ],
+        cityCode: [
+          { required: true, message: '请选择市', trigger: 'change' }
+        ],
+        districtCode: [
+          { required: true, message: '请选择区/县', trigger: 'change' }
+        ],
+        address: [
+          { required: true, message: '请输入详细地址', trigger: 'blur' }
+        ],
+        contactName: [
+          { required: true, message: '请输入联系人', trigger: 'blur' }
+        ],
+        contactPhone: [
+          { required: true, message: '请输入联系人电话', trigger: 'blur' }
+        ],
+        state: [
+          { required: true, message: '请选择状态', trigger: 'change' }
+        ]
+      },
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [] //  区下拉
+    }
+  },
+  computed: {
+    isEdit () {
+      return this.$route.name === 'customerManagementEdit'
+    }
+  },
+  methods: {
+    //  获取客户信息
+    getDetail () {
+      // goodsFind({ id: this.$route.params.id }).then(res => {
+      //   if (res.status == 200) {
+      //     this.form = Object.assign(this.form, res.data)
+      //   }
+      // })
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = values.form
+          form.desc = _this.form.desc
+          form.id = this.isEdit ? this.$route.params.id : null
+          console.log(form,'-----提交信息')
+          // goodsSave(form).then(res => {
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     setTimeout(() => {
+          //       _this.$router.push({ path: '/shop/goods/list' })
+          //     }, 1000)
+          //   }
+          // })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  返回
+    goBack () {
+      this.$router.push({ path: '/salesManagement/customerManagement/list' })
+    },
+    // 获取省列表'
+    getProvinceList () {
+      getProvince().then(res => {
+        if (res.status == 200) {
+          this.addrProvinceList = res.data || []
+        } else {
+          this.addrProvinceList = []
+        }
+      })
+    },
+    // 获取城市列表
+    getCityList (val) {
+      this.addrCityList = []
+      this.addrDistrictList = []
+      this.form.cityCode = undefined
+      this.form.districtCode = undefined
+      this.form.address = ''
+      this.getCityListRequest(val)
+    },
+    getCityListRequest (val) {
+      getCityByPro({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrCityList = res.data || []
+        } else {
+          this.addrCityList = []
+        }
+      })
+    },
+    // 获取区县列表
+    getAreaList (val) {
+      this.addrDistrictList = []
+      this.form.districtCode = undefined
+      this.form.address = ''
+      this.getAreaListRequest(val)
+    },
+    getAreaListRequest (val) {
+      getDistrictByCity({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrDistrictList = res.data || []
+        } else {
+          this.addrDistrictList = []
+        }
+      })
+    },
+    // 区县变更
+    areaCharged (val) {
+      this.form.address = ''
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      // vm.getGoodsType()
+      // vm.getPartnerQueryList()
+      vm.$refs.ruleForm.resetFields()
+      if (vm.isEdit) { //  编辑页
+        vm.getDetail()
+      }
+    })
+  }
+}
+</script>
+
+<style lang="less">
+  .customerManagementEdit-table-page-wrapper{
+    
+  }
+</style>

+ 302 - 0
src/views/salesManagement/customerManagement/list.vue

@@ -0,0 +1,302 @@
+<template>
+  <a-card :bordered="false" class="customerManagementList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <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-range-picker
+                  style="width:100%"
+                  id="customerManagementList-creatTime"
+                  :disabledDate="disabledDate"
+                  v-model="creatTime"
+                  :format="dateFormat"
+                  :placeholder="['开始时间', '结束时间']" />
+              </a-form-item>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+            	<a-select placeholder="请选择" allowClear v-model="queryParam.dataSourceNo" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
+            		<a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
+            	</a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="联系人">
+              <a-input id="customerManagementList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入联系人"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="最后销售时间">
+              <a-range-picker
+                  style="width:100%"
+                  id="customerManagementList-creatTime"
+                  :disabledDate="disabledDate"
+                  v-model="creatTime"
+                  :format="dateFormat"
+                  :placeholder="['开始时间', '结束时间']" />
+              </a-form-item>
+            </a-form-item>
+          </a-col>
+          <a-col :md="12" :sm="24">
+            <a-row>
+              <!-- 客户地址 -->
+              <a-form-item prop="provinceCode" label="客户地址">
+                <a-col span="7">
+                  <a-form-item prop="provinceCode" style="margin: 0;">
+                    <a-select v-model="queryParam.provinceCode" @change="getCityList" placeholder="请选择省">
+                      <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+                <a-col span="7" offset="1">
+                  <a-form-item prop="cityCode" style="margin: 0;">
+                    <a-select v-model="queryParam.cityCode" @change="getAreaList" placeholder="请选择市">
+                      <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+                <a-col span="7" offset="1">
+                  <a-form-item prop="districtCode" style="margin: 0;">
+                    <a-select v-model="queryParam.districtCode" placeholder="请选择区/县">
+                      <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+              </a-form-item>
+            </a-row>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="是否卫星仓客户">
+              <v-select code="CHECK_ENABLE_STATE" id="customerManagementList-state" v-model="queryParam.state" allowClear placeholder="请选择"></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="customerManagementList-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="customerManagementList-reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 操作按钮 -->
+    <div class="table-operator">
+      <a-button id="customerManagementList-add" type="primary" @click="handleAdd" style="margin-top: 18px;">新增客户</a-button>
+      <a-button id="customerManagementList-merge" @click="handleMerge" style="margin: 18px 0 0 15px;">客户合并</a-button>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 状态 -->
+      <template slot="state" slot-scope="text, record">
+        <span>{{record.state == 1 ? '已启用' : '已禁用'}}</span>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button type="primary" @click="handleEdit(record)" id="customerManagementList-edit-btn">编辑</a-button>
+        <a-button @click="handleDetail(record)" id="customerManagementList-detail-btn" style="margin: 0 15px;">详情</a-button>
+        <a-button type="danger" @click="handleDel(record)" id="customerManagementList-del-btn">删除</a-button>
+      </template>
+    </s-table>
+    <!-- 客户详情 -->
+    <customer-management-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+  </a-card>
+</template>
+
+<script>
+import moment from 'moment'
+// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import { STable, VSelect } from '@/components'
+import customerManagementDetailModal from './detailModal.vue'
+export default {
+  components: { STable, VSelect, customerManagementDetailModal },
+  data () {
+    return {
+      labelCol: { span: 10 },
+      wrapperCol: { span: 14 },
+      queryParam: { //  查询条件
+        orderBundleNo: '', //  订单编号
+        bundleName: '', //  套餐名称
+        itemName: '', //  服务名称
+        brand: undefined,  //  产品品牌
+      },
+      exportLoading: false, // 导出loading
+      disabled: false, //  查询、重置按钮是否可操作
+      brandData: [],  //  产品品牌下拉数据
+      typeData: [],  //  产品类别下拉数据
+      dateFormat: 'YYYY-MM-DD',
+      creatTime: [],  //  创建时间
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'inventoryMoney', width: 180, align: 'center' },
+        { title: '客户名称', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true },
+        { title: '联系人', dataIndex: 'productBrand', width: 200, align: 'center' },
+        { title: '联系手机', dataIndex: 'productOldNum', width: 160, align: 'center' },
+        { title: '联系电话', dataIndex: 'productType', width: 200, align: 'center' },
+        { title: '最后销售时间', dataIndex: 'inventoryNumss', width: 180, align: 'center' },
+        { title: '是否卫星仓', dataIndex: 'inventoryNum', width: 120, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 270, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( 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
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function(resolve, reject){
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+            ]
+          }
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          _this.disabled = false
+          resolve(data)
+        })
+      },
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [], //  区下拉
+      openModal: false,  //  查看客户详情  弹框
+      itemId: ''  //  当前客户id
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  新增
+    handleAdd(){
+      this.$router.push({ path: '/salesManagement/customerManagement/add' })
+    },
+    //  编辑
+    handleEdit(row){
+      this.$router.push({ path: `/salesManagement/customerManagement/edit/${row.id}` })
+    },
+    //  删除
+    handleDel(row){
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '删除后不可恢复,确定要进行删除吗?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  客户合并
+    handleMerge(){},
+    //  客户信息详情
+    handleDetail(row){
+      this.itemId = row.id
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal(){
+      this.itemId = ''
+      this.openModal = false
+    },
+    filterOption(input, option) {
+    	return (
+    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    	)
+    },
+    // 获取省列表
+    getProvinceList () {
+      getProvince().then(res => {
+        if (res.status == 200) {
+          this.addrProvinceList = res.data || []
+        } else {
+          this.addrProvinceList = []
+        }
+      })
+    },
+    // 获取城市列表
+    getCityList (val) {
+      this.addrCityList = []
+      this.addrDistrictList = []
+      this.queryParam.cityCode = undefined
+      this.queryParam.districtCode = undefined
+      this.getCityListRequest(val)
+    },
+    getCityListRequest (val) {
+      getCityByPro({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrCityList = res.data || []
+        } else {
+          this.addrCityList = []
+        }
+      })
+    },
+    // 获取区县列表
+    getAreaList (val) {
+      this.addrDistrictList = []
+      this.queryParam.districtCode = undefined
+      this.getAreaListRequest(val)
+    },
+    getAreaListRequest (val) {
+      getDistrictByCity({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrDistrictList = res.data || []
+        } else {
+          this.addrDistrictList = []
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .customerManagementList-wrap{
+    .sTable{
+      table{
+        width: auto;
+      }
+    }
+  }
+</style>

+ 2 - 2
vue.config.js

@@ -108,8 +108,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.102:9110/zyit',
-        target: 'http://it.test.zyucgj.com/zyit',
+        target: 'http://192.168.0.12:8503/qpls-md',
+        // target: 'http://it.test.zyucgj.com/zyit',
         // target: 'https://it.test.qiubcar.com/zyit',
         ws: false,
         changeOrigin: true,