瀏覽代碼

修改网点名称为下拉搜索框

zhangdan 4 年之前
父節點
當前提交
a3dabef174

+ 1 - 1
src/api/station.js

@@ -1,7 +1,7 @@
 import { axios } from '@/utils/request'
 
 // 网点列表
-export const stationList = (params) => {
+export const stationListData = (params) => {
   const url = `/station/query/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize

+ 29 - 6
src/views/equipmentManage/collector/collector.vue

@@ -16,12 +16,21 @@
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
             <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="collector-stationName" allowClear :maxLength="30" v-model="queryParam.stationName" placeholder="请输入网点名称" />
+              <a-select
+                id="cleanDetail-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                showSearch
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
             <a-form-item label="采集员" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="collector-nameOrPhone" allowClear :maxLength="30" v-model="queryParam.nameOrPhone" placeholder="请输入姓名/手机号码" />
+              <a-input id="collector-queryWord" allowClear :maxLength="30" v-model="queryParam.queryWord" placeholder="请输入姓名/手机号码" />
             </a-form-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
@@ -80,6 +89,7 @@
 import { STable, VSelect } from '@/components'
 import moment from 'moment'
 import addCollector from './addCollector.vue'
+import { stationList } from '@/api/releaseRecord.js'
 import { getCollectorList, resetPSD, updateEnableStatus, delectCollector } from '@/api/collector'
 export default {
   name: 'Collector',
@@ -94,9 +104,10 @@ export default {
       queryParam: {
         registerBeginDate: null, // 开始时间
         registerEndDate: null, // 结束时间
-        nameOrPhone: '', // 采集员姓名或手机号
-        stationName: '' //  网点名称
+        queryWord: '', // 采集员姓名或手机号
+        stationNo: undefined //  网点名称
       },
+      optionData: [], // 网点名称数据
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -128,6 +139,9 @@ export default {
       collectorId: null //  网点id
     }
   },
+  mounted () {
+    this.getStationList()
+  },
   methods: {
     moment,
     // 不可选日期
@@ -146,14 +160,23 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    // 获取合作商数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+          console.log(res)
+        }
+      })
+    },
     // 重置
     handleReset () {
       this.queryParam.registerBeginDate = undefined
       this.queryParam.registerEndDate = undefined
-      this.queryParam.nameOrPhone = ''
+      this.queryParam.queryWord = ''
       this.time = []
       this.$refs.table.refresh(true)
-      this.queryParam.stationName = ''
+      this.queryParam.stationNo = undefined
     },
     //  新增、编辑网点
     handleEdit (row) {

+ 29 - 7
src/views/equipmentManage/equipment/equipment.vue

@@ -10,7 +10,17 @@
           </a-col>
           <a-col :span="6">
             <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="equipment-stationName" allowClear :maxLength="30" v-model="queryParam.stationName" placeholder="请输入网点名称" />
+              <a-select
+                id="cleanDetail-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                showSearch
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+              </a-select>
+              <!-- <a-input id="equipment-stationNo" allowClear :maxLength="30" v-model="queryParam.stationNo" placeholder="请输入网点名称" /> -->
             </a-form-item>
           </a-col>
           <a-col :span="6">
@@ -135,6 +145,7 @@
 import { STable, VSelect } from '@/components'
 import equipmentLogModal from './logModal.vue'
 import { deviceList } from '@/api/device'
+import { stationList } from '@/api/releaseRecord.js'
 import { deviceTypeListQuery, exportDevice } from '@/api/boxSetting'
 import { lableSeleteList } from '@/api/labelSetting.js'
 import QRCode from 'qrcode'
@@ -154,7 +165,7 @@ export default {
       // 查询参数
       queryParam: {
         srcDeviceCode: '', // 设备编号
-        stationName: '', //  网点名称
+        stationNo: undefined, //  网点名称
         deviceTypeNo: undefined, //  箱体类型
         boxNum: undefined, //  内置箱体数
         onlineFlag: undefined, //  设备状态
@@ -162,14 +173,15 @@ export default {
         labelNoList: [] // 网点标签
       },
       lableData: [],
+      optionData: [],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center',customRender: text => { return text || '--' } },
+        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center', customRender: text => { return text || '--' } },
         { title: '网点标签', dataIndex: 'labelName', width: 200, align: 'center', customRender: text => { return text || '--' } },
-        { title: '地址', dataIndex: 'stationAddress', width: 200, align: 'center',customRender: text => { return text || '--' } },
+        { title: '地址', dataIndex: 'stationAddress', width: 200, align: 'center', customRender: text => { return text || '--' } },
         { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
-        { title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center',customRender: text => { return text || '--' } },
+        { title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center', customRender: text => { return text || '--' } },
         { title: '内置箱体数', dataIndex: 'boxNum', width: 200, align: 'center' },
         { title: '版本', dataIndex: 'boxVersion', width: 200, align: 'center' },
         { title: '设备状态', scopedSlots: { customRender: 'onlineFlag' }, width: 150, align: 'center' },
@@ -214,10 +226,19 @@ export default {
         }
       })
     },
+    // 获取合作商数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+          console.log(res)
+        }
+      })
+    },
     // 重置
     handleReset () {
       this.queryParam.srcDeviceCode = ''
-      this.queryParam.stationName = ''
+      this.queryParam.stationNo = undefined
       this.queryParam.deviceTypeNo = undefined
       this.queryParam.boxNum = undefined
       this.queryParam.onlineFlag = undefined
@@ -266,7 +287,7 @@ export default {
         }
       }
       const url = 'id=' + item.srcDeviceCode + '&type=dustbin'
-      _this.shName = (item.stationName?item.stationName:"")+item.srcDeviceCode.substring(item.srcDeviceCode.length-6)
+      _this.shName = (item.stationNo ? item.stationNo : '') + item.srcDeviceCode.substring(item.srcDeviceCode.length - 6)
       if (url) {
         QRCode.toDataURL(url, opts, function (err, url) {
           _this.qrCode = url
@@ -299,6 +320,7 @@ export default {
   mounted () {
     this.getDeviceType()
     this.getlableSeleteList()
+    this.getStationList()
   }
 }
 </script>

+ 27 - 5
src/views/equipmentManage/network/network.vue

@@ -56,7 +56,17 @@
         <a-row :gutter="20">
           <a-col :span="6">
             <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="network-queryWord" allowClear :maxLength="30" v-model="queryParam.queryWord" placeholder="请输入网点名称" />
+              <a-select
+                id="cleanDetail-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                showSearch
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+              </a-select>
+              <!-- <a-input id="network-stationNo" allowClear :maxLength="30" v-model="queryParam.stationNo" placeholder="请输入网点名称" /> -->
             </a-form-item>
           </a-col>
           <a-col :span="6">
@@ -121,7 +131,8 @@ import moment from 'moment'
 import editNetworkModal from './editModal.vue'
 import detailsNetworkModal from './detailsModal.vue'
 import equipmentModal from './equipmentModal.vue'
-import { stationList, getProvince, getCityByPro, getDistrictByCity } from '@/api/station'
+import { stationList } from '@/api/releaseRecord.js'
+import { stationListData, getProvince, getCityByPro, getDistrictByCity } from '@/api/station'
 import { lableSeleteList } from '@/api/labelSetting.js'
 export default {
   name: 'Network',
@@ -136,13 +147,14 @@ export default {
       queryParam: {
         beginDate: null, // 开始时间
         endDate: null, // 结束时间
-        queryWord: '', //  网点名称
+        stationNo: undefined, //  网点名称
         provinceCode: undefined, //  省
         cityCode: undefined, // 市
         districtCode: undefined, // 区
         labelNoList: []
       },
       lableData: [],
+      optionData: [],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
@@ -159,7 +171,7 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return stationList(Object.assign(parameter, this.queryParam)).then(res => {
+        return stationListData(Object.assign(parameter, this.queryParam)).then(res => {
           if (res.status == 200) {
             const no = (res.data.pageNo - 1) * res.data.pageSize
             this.orderTotal = res.data.count
@@ -203,6 +215,15 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    // 获取合作商数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+          console.log(res)
+        }
+      })
+    },
     // 获取标签数据
     getlableSeleteList () {
       lableSeleteList().then(res => {
@@ -215,7 +236,7 @@ export default {
     handleReset () {
       this.queryParam.beginDate = undefined
       this.queryParam.endDate = undefined
-      this.queryParam.queryWord = ''
+      this.queryParam.stationNo = undefined
       this.queryParam.provinceCode = undefined
       this.queryParam.cityCode = undefined
       this.queryParam.districtCode = undefined
@@ -301,6 +322,7 @@ export default {
   mounted () {
     this.getProvinceList()
     this.getlableSeleteList()
+    this.getStationList()
   }
 }
 </script>

+ 3 - 3
src/views/reportForm/unRecyclableRubbishDetails.vue

@@ -23,7 +23,7 @@
           </a-col>
           <a-col :xs="24" :sm="12" :md="6" :lg="5">
             <a-form-model-item label="采集员" :label-col="{ span:8}" :wrapper-col="{ span:16}">
-              <a-input id="network-gatherNameOrPhone" allowClear :maxLength="30" v-model="queryParam.gatherNameOrPhone" placeholder="请输入姓名/手机号码" />
+              <a-input id="network-queryWord" allowClear :maxLength="30" v-model="queryParam.queryWord" placeholder="请输入姓名/手机号码" />
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="6" :lg="5">
@@ -91,7 +91,7 @@ export default {
         stationNo: undefined, // 网点名称
         beginDate: null, // 开始时间
         endDate: null, // 结束时间
-        gatherNameOrPhone: ''
+        queryWord: ''
       },
       optionData: [], // 网点列表数据
       // 将默认当天时间日期回显在时间选择框中
@@ -198,7 +198,7 @@ export default {
       this.queryParam.stationNo = undefined
       this.queryParam.beginDate = null
       this.queryParam.endDate = null
-      this.queryParam.gatherNameOrPhone = ''
+      this.queryParam.queryWord = ''
       this.time = [
         moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
         moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')

+ 8 - 8
src/views/userInfo/userManageList.vue

@@ -228,15 +228,15 @@ export default {
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
         if (this.registerTime && this.registerTime.length) {
-          searchData.beginRegisterTime = moment(this.registerTime[0])
-          searchData.endRegisterTime = moment(this.registerTime[1])
+          searchData.beginRegisterTime = moment(this.registerTime[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.endRegisterTime = moment(this.registerTime[1]).format('YYYY-MM-DD 23:59:59')
         } else {
           searchData.beginRegisterTime = null
           searchData.endRegisterTime = null
         }
         if (this.lastDeliverTime && this.lastDeliverTime.length) {
-          searchData.beginDate = moment(this.lastDeliverTime[0])
-          searchData.endDate = moment(this.lastDeliverTime[1])
+          searchData.beginDate = moment(this.lastDeliverTime[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.endDate = moment(this.lastDeliverTime[1]).format('YYYY-MM-DD 23:59:59')
         } else {
           searchData.beginDate = null
           searchData.endDate = null
@@ -382,15 +382,15 @@ export default {
     handleExport () {
       const params = this.queryParam
       if (this.registerTime && this.registerTime.length) {
-        params.beginRegisterTime = moment(this.registerTime[0])
-        params.endRegisterTime = moment(this.registerTime[1])
+        params.beginRegisterTime = moment(this.registerTime[0]).format('YYYY-MM-DD 00:00:00')
+        params.endRegisterTime = moment(this.registerTime[1]).format('YYYY-MM-DD 23:59:59')
       } else {
         params.beginRegisterTime = null
         params.endRegisterTime = null
       }
       if (this.lastDeliverTime && this.lastDeliverTime.length) {
-        params.beginDate = moment(this.lastDeliverTime[0])
-        params.endDate = moment(this.lastDeliverTime[1])
+        params.beginDate = moment(this.lastDeliverTime[0]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.lastDeliverTime[1]).format('YYYY-MM-DD 23:59:59')
       } else {
         params.beginDate = null
         params.endDate = null