Explorar el Código

Merge branch 'deploy_giftCard' of http://git.chelingzhu.com/chelingzhu-web/zxyj-admin-html into deploy_0106

冲突代码合并
lilei hace 4 años
padre
commit
5055b0646f

BIN
public/mark.png


+ 45 - 0
src/api/giftCard.js

@@ -0,0 +1,45 @@
+import { axios } from '@/utils/request'
+
+// 获取列表数据
+export const giftCardQuery = params => {
+  const url = `giftCard/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 新增礼品卡
+export const giftCardAdd = params => {
+  return axios({
+    url: `giftCard/batchAdd`,
+    data: params,
+    method: 'post'
+  })
+}
+// 编辑礼品卡
+export const giftCardEdit = params => {
+  return axios({
+    url: `giftCard/editGiftCardItem`,
+    data: params,
+    method: 'post'
+  })
+}
+// 礼品卡详情
+export const giftCardDetail = params => {
+  return axios({
+    url: `giftCard/detail/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+// 删除礼品卡
+export const giftCardDel = (params) => {
+  return axios({
+    url: `giftCard/delGiftCardItemById/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 1 - 1
src/components/GlobalHeader/GlobalHeader.vue

@@ -2,7 +2,7 @@
   <transition name="showHeader">
     <div v-if="visible" class="header-animat">
       <a-layout-header
-        v-if="visible"
+        v-if="visible && $store.state.user.nowRouteName!='NodeMap'"
         :class="[fixedHeader && 'ant-header-fixedHeader', sidebarOpened ? 'ant-header-side-opened' : 'ant-header-side-closed', ]"
         :style="{ padding: '0' }">
         <div v-if="mode === 'sidemenu'" class="header">

+ 1 - 1
src/components/PageHeader/PageHeader.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="page-header">
     <div class="page-header-index-wide">
-      <s-breadcrumb />
+      <s-breadcrumb v-if="$store.state.user.nowRouteName!='NodeMap'" />
       <div class="detail">
         <div class="main" v-if="!$route.meta.hiddenHeaderContent">
           <!-- <div class="row">

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

@@ -411,6 +411,16 @@ export const asyncRouterMap = [{
         icon: 'profile'
         // permission: 'M_lottery_list'
       }
+    },
+    {
+      path: '/market/giftCard',
+      name: 'giftCardManage',
+      component: () => import(/* webpackChunkName: "market" */ '@/views/market/giftCard/giftCard.vue'),
+      meta: {
+        title: '礼品卡管理',
+        icon: 'credit-card',
+        permission: 'M_giftCard_list'
+      }
     }
     ]
   },

+ 58 - 32
src/layouts/BasicLayout.vue

@@ -7,16 +7,14 @@
       :wrapClassName="`drawer-sider ${navTheme}`"
       :closable="false"
       :visible="collapsed"
-      @close="drawerClose"
-    >
+      @close="drawerClose">
       <side-menu
         mode="inline"
         :menus="menus"
         :theme="navTheme"
         :collapsed="false"
         :collapsible="true"
-        @menuSelect="menuSelect"
-      ></side-menu>
+        @menuSelect="menuSelect"></side-menu>
     </a-drawer>
 
     <side-menu
@@ -25,8 +23,7 @@
       :menus="menus"
       :theme="navTheme"
       :collapsed="collapsed"
-      :collapsible="true"
-    ></side-menu>
+      :collapsible="true"></side-menu>
 
     <a-layout :class="[layoutMode, `content-width-${contentWidth}`]" :style="{ paddingLeft: contentPaddingLeft, minHeight: '100vh' }">
       <!-- layout header -->
@@ -36,8 +33,7 @@
         :theme="navTheme"
         :collapsed="collapsed"
         :device="device"
-        @toggle="toggle"
-      />
+        @toggle="toggle" />
 
       <!-- layout content -->
       <a-layout-content :style="{ height: '100%', margin: '24px 24px 0', paddingTop: fixedHeader ? '64px' : '0' }">
@@ -60,9 +56,17 @@
 </template>
 
 <script>
-import { triggerWindowResizeEvent } from '@/utils/util'
-import { mapState, mapActions } from 'vuex'
-import { mixin, mixinDevice } from '@/utils/mixin'
+import {
+  triggerWindowResizeEvent
+} from '@/utils/util'
+import {
+  mapState,
+  mapActions
+} from 'vuex'
+import {
+  mixin,
+  mixinDevice
+} from '@/utils/mixin'
 import config from '@/config/defaultSettings'
 
 import RouteView from './RouteView'
@@ -70,7 +74,9 @@ import SideMenu from '@/components/Menu/SideMenu'
 import GlobalHeader from '@/components/GlobalHeader'
 import GlobalFooter from '@/components/GlobalFooter'
 import SettingDrawer from '@/components/SettingDrawer'
-import { asyncRouterMap } from '@/config/router.config'
+import {
+  asyncRouterMap
+} from '@/config/router.config'
 
 export default {
   name: 'BasicLayout',
@@ -92,7 +98,8 @@ export default {
   computed: {
     ...mapState({
       // 动态主路由
-      mainMenu: state => state.permission.routers
+      mainMenu: state => state.permission.routers,
+      nowRouteName: state => state.user.nowRouteName
     }),
     contentPaddingLeft () {
       if (!this.fixSidebar || this.isMobile()) {
@@ -103,16 +110,30 @@ export default {
       }
       return '80px'
     }
+
   },
   watch: {
     sidebarOpened (val) {
-      this.collapsed = !val
+      // console.log(this.$store.state.user.nowRouteName, 'vvvvvvvvvvv')
+      if (this.$store.state.user.nowRouteName != 'NodeMap') {
+        this.collapsed = !val
+      } else {
+        this.collapsed = true
+	  }
+    },
+    nowRouteName (val) {
+      // console.log(val, 'vvvvvvvvvvv')
+      if (val == 'NodeMap') {
+        this.collapsed = true
+      } else {
+        this.collapsed = false
+      }
     }
   },
   created () {
-    if(this.mainMenu){
+    if (this.mainMenu) {
       this.menus = this.mainMenu.find((item) => item.path === '/').children
-    }else{
+    } else {
       // 没有权限时只显示首页
       const noqx = asyncRouterMap.find((item) => item.path === '/').children
       this.menus = [noqx.find(item => item.path === '/home')]
@@ -121,7 +142,8 @@ export default {
   },
   mounted () {
     const userAgent = navigator.userAgent
-    if (userAgent.indexOf('Edge') > -1) {
+    console.log(userAgent, this.collapsed, this.nowRouteName, 'this.collapsedthis.collapsedthis.collapsed')
+    if (userAgent.indexOf('Edge') > -1 && this.nowRouteName != 'NodeMap') {
       this.$nextTick(() => {
         this.collapsed = !this.collapsed
         setTimeout(() => {
@@ -129,6 +151,11 @@ export default {
         }, 16)
       })
     }
+    if (this.nowRouteName == 'NodeMap') {
+      this.$nextTick(() => {
+		  this.collapsed = true
+      })
+    }
   },
   methods: {
     ...mapActions(['setSidebar']),
@@ -146,8 +173,7 @@ export default {
       }
       return left
     },
-    menuSelect () {
-    },
+    menuSelect () {},
     drawerClose () {
       this.collapsed = false
     }
@@ -156,9 +182,9 @@ export default {
 </script>
 
 <style lang="less">
-@import url('../components/global.less');
+	@import url('../components/global.less');
 
-/*
+	/*
  * The following styles are auto-applied to elements with
  * transition="page-transition" when their visibility is toggled
  * by Vue.js.
@@ -167,17 +193,17 @@ export default {
  * these styles.
  */
 
-.page-transition-enter {
-  opacity: 0;
-}
+	.page-transition-enter {
+		opacity: 0;
+	}
 
-.page-transition-leave-active {
-  opacity: 0;
-}
+	.page-transition-leave-active {
+		opacity: 0;
+	}
 
-.page-transition-enter .page-transition-container,
-.page-transition-leave-active .page-transition-container {
-  -webkit-transform: scale(1.1);
-  transform: scale(1.1);
-}
+	.page-transition-enter .page-transition-container,
+	.page-transition-leave-active .page-transition-container {
+		-webkit-transform: scale(1.1);
+		transform: scale(1.1);
+	}
 </style>

+ 2 - 0
src/permission.js

@@ -14,6 +14,8 @@ const whiteList = ['login', 'register', 'registerResult'] // no redirect whiteli
 const defaultRoutePath = '/home'
 
 router.beforeEach((to, from, next) => {
+	store.state.user.nowRouteName = to.name
+	console.log(to.name,store.state.user.nowRouteName,'router.beforeEach')
   NProgress.start() // start progress bar
   to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))
   let token = store.state.user.token || sessionStorage.getItem(ACCESS_TOKEN)

+ 7 - 1
src/store/modules/user.js

@@ -11,7 +11,8 @@ const user = {
     welcome: '',
     avatar: '',
     roles: { permissionList: [] },
-    info: {}
+    info: {},
+    nowRouteName: '' // 当前路由名称
   },
 
   mutations: {
@@ -35,6 +36,9 @@ const user = {
     },
     SET_MUSTCHANGEPWD: (state, status) => {
       state.mustChangePwd = status
+    },
+    SET_NOWROUTENAME: (state, name) => {
+	  state.nowRouteName = name
     }
   },
 
@@ -51,6 +55,7 @@ const user = {
               const users = res.auth_user
               Vue.ls.set('hasError', 0)
               commit('SET_TOKEN', res.access_token)
+              commit('SET_INFO', users)
               commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
               commit('SET_MUSTCHANGEPWD', users.mustChangePwd)
               Vue.ls.set('rolesAccess', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
@@ -92,6 +97,7 @@ const user = {
         }).catch((error) => {
           resolve(error)
         }).finally(() => {
+          commit('SET_INFO', {})
           commit('SET_NAME', { name: '', welcome: '' })
           commit('SET_MUSTCHANGEPWD', '')
           commit('SET_AVATAR', '')

+ 1 - 0
src/views/businessManage/leduQuery/leduQuery.vue

@@ -137,6 +137,7 @@ export default {
       // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
       if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
         this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
+		return
       }
       this.loading = true
       exportOffPartnerGoldLog(params).then(res => {

+ 10 - 10
src/views/map/NodeMap.vue

@@ -47,7 +47,7 @@
           :sm="24"
           :md="24"
           :lg="24"
-          :xl="24"
+          :xl="16"
           :xxl="16">
           <div class="switper-cont">
             <div class="data-title">实时投递数据</div>
@@ -89,7 +89,7 @@
           :sm="24"
           :md="24"
           :lg="24"
-          :xl="24"
+          :xl="8"
           :xxl="8">
           <div class="switper-cont">
             <div class="data-title">实时新增用户</div>
@@ -169,8 +169,8 @@
               全市共有党政机关、企事业单位827个,职工人数16655人。其中,市级单位334个,秦都区297个,渭城区196个;居民小区1010个(两区居民小区994个,保障房小区16个),
               物业管理小区770个(两区754个,保障房小区16个)。其中,市本级保障房小区12个,物业管理小区12个。秦都区654个(含保障房小区3个),物业管理小区584个。渭城区
               344个(含保障房小区1个),物业管理174个(含保障房小区1个);学校(中小学、幼儿园)200所,其中,秦都区139所(中小学53所、幼儿园86所)。渭城区61所(中小
-              学27所、幼儿园34所)。截止目前,城区已建成试点单位67个, 设置智能分类
-              <span class="blue">{{ deviceTotal }}</span>组, 积分兑换亭<span class="blue">{{ sellerTotal }}</span>个, 无人兑换机<span
+              学27所、幼儿园34所)。截止目前,城区已建成试点单位67个, 设置智能收集
+              <span class="blue">{{ deviceTotal }}</span>组, 智能兑换亭<span class="blue">{{ sellerTotal }}</span>个, 智能兑换机<span
                 class="blue">{{ machineTotal }}</span>个, 覆盖28处办公场所的177个机关事业单位,居民小区29个,企业2个,学校8个。 软件注册人数<span class="blue">{{ userTotal }}</span>人,
               周回收有害垃圾5.646公斤、 可回收物9.26吨, 日处理厨余垃圾106吨。
             </div>
@@ -241,15 +241,15 @@ export default {
       equipmentPieColor: ['#ffaa00', '#00ff00', '#00aaff', '#ff55ff', '#1dc5d4', '#8465c7', '#00ffff'],
       // 设备数量统计对比图数据
       equipmentBarData: [{
-        name: '智能分类箱',
+        name: '智能收集箱',
         value: 0
       },
       {
-        name: '积分兑换亭',
+        name: '智能兑换亭',
         value: 0
       },
       {
-        name: '无人兑换机',
+        name: '智能兑换机',
         value: 0
       }
       ],
@@ -266,7 +266,7 @@ export default {
       }
     },
     mapHeight () {
-      return this.isMapFull ? '80vh' : '30vh'
+      return this.isMapFull ? '80vh' : '45vh'
     },
     classOption () {
       return {
@@ -315,8 +315,8 @@ export default {
         styles: {
           // 创建一个styleId为"myStyle"的样式(styles的子属性名即为styleId)
           'myStyle': new TMap.MarkerStyle({
-            'width': 25, // 点标记样式宽度(像素)
-            'height': 25, // 点标记样式高度(像素)
+            'width': 30, // 点标记样式宽度(像素)
+            'height': 30, // 点标记样式高度(像素)
             'src': '../mark.png', // 图片路径
             // 焦点在图片中的像素位置,一般大头针类似形式的图片以针尖位置做为焦点,圆形点以圆心位置为焦点
             'anchor': {

+ 137 - 0
src/views/market/giftCard/addCardModal.vue

@@ -0,0 +1,137 @@
+<template>
+  <a-modal
+    centered
+    class="add-card-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="新增礼品卡"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="600">
+    <a-form-model
+      id="add-card-form"
+      :model="formData"
+      :rules="rules"
+      ref="ruleForm"
+      :label-col="formItemLayout.labelCol"
+      :wrapper-col="formItemLayout.wrapperCol"
+      @submit="handleSubmit">
+      <a-form-model-item label="创建人">
+        <p class="creater">{{ userInfo.userNameCN }}</p><p class="telephone">{{ userInfo.mobile }}</p>
+      </a-form-model-item>
+      <a-form-model-item label="礼品卡内容" prop="goldNum">
+        <a-input-number
+          id="add-card-goldNum"
+          v-model="formData.goldNum"
+          :min="1"
+          :max="999999"
+          :precision="0"
+          style="width: 90%;margin-right: 5px;"
+          placeholder="请输入礼品卡内容(1~999999)"
+          allowClear /><span>乐豆</span>
+      </a-form-model-item>
+      <a-form-model-item label="礼品卡数量" prop="createNum">
+        <a-input-number
+          id="add-card-createNum"
+          v-model="formData.createNum"
+          :min="1"
+          :max="1000"
+          :precision="0"
+          style="width: 90%;margin-right: 5px;"
+          placeholder="请输入礼品卡数量(1~1000)"
+          allowClear /><span>张</span>
+      </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="add-card-submit" style="margin-right: 15px">保存</a-button>
+        <a-button @click="isShow=false" style="margin-left: 15px" id="add-card-close">取消</a-button>
+      </a-form-model-item>
+    </a-form-model>
+  </a-modal>
+</template>
+
+<script>
+import { giftCardAdd } from '@/api/giftCard'
+import { mapGetters } from 'vuex'
+export default {
+  name: 'AddCardModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    ...mapGetters(['userInfo'])
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      formData: {
+        goldNum: null, //  礼品卡内容
+        createNum: 1 //  礼品卡数量
+      },
+      rules: {
+        goldNum: [
+          { required: true, message: '请输入礼品卡内容', trigger: 'blur' }
+        ],
+        createNum: [
+          { required: true, message: '请输入礼品卡数量', trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          giftCardAdd(_this.formData).then(res => {
+            if (res.status == 200) {
+              _this.isShow = false
+              this.$emit('refresh', true)
+            }
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        const _this = this
+        setTimeout(() => {
+          _this.$refs.ruleForm.resetFields()
+        }, 100)
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .add-card-modal{
+    .creater{
+      display: inline-block;
+      margin-right: 15px;
+    }
+    .telephone{
+      display: inline-block;
+    }
+  }
+</style>

+ 143 - 0
src/views/market/giftCard/editCardModal.vue

@@ -0,0 +1,143 @@
+<template>
+  <a-modal
+    centered
+    class="edit-card-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="编辑礼品卡"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="600">
+    <a-form-model
+      id="edit-card-form"
+      :model="formData"
+      :rules="rules"
+      ref="ruleForm"
+      :label-col="formItemLayout.labelCol"
+      :wrapper-col="formItemLayout.wrapperCol"
+      @submit="handleSubmit"
+      v-if="detailsData">
+      <a-form-model-item label="创建时间"> {{ detailsData.createDate }} </a-form-model-item>
+      <a-form-model-item label="创建人">
+        <p class="creater">{{ userInfo.userNameCN }}</p><p class="telephone">{{ userInfo.mobile }}</p>
+      </a-form-model-item>
+      <a-form-model-item label="礼品卡内容"> {{ detailsData.content }} </a-form-model-item>
+      <a-form-model-item label="实体卡编号" prop="optionalSequence">
+        <a-input id="edit-card-optionalSequence" :maxLength="30" v-model="formData.optionalSequence" placeholder="请输入实体卡编号(最多30个字符)" allowClear />
+      </a-form-model-item>
+      <a-form-model-item label="备注" prop="remarks">
+        <a-textarea id="edit-card-remarks" :maxLength="500" v-model="formData.remarks" placeholder="请输入备注(最多500个字符)" allowClear />
+      </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="edit-card-submit" style="margin-right: 15px">保存</a-button>
+        <a-button @click="isShow=false" style="margin-left: 15px" id="edit-card-close">取消</a-button>
+      </a-form-model-item>
+    </a-form-model>
+  </a-modal>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import { giftCardDetail, giftCardEdit } from '@/api/giftCard'
+export default {
+  name: 'EditCardModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    cardId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  computed: {
+    ...mapGetters(['userInfo'])
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      formData: {
+        id: this.cardId,
+        optionalSequence: '', //  实体卡编号
+        remarks: '' //  备注
+      },
+      rules: {},
+      detailsData: null //  详情
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetails () {
+      giftCardDetail({ id: this.cardId }).then(res => {
+        if (res.status == 200) {
+          this.formData.id = res.data.id
+          this.formData.optionalSequence = res.data.optionalSequence || ''
+          this.formData.remarks = res.data.remarks || ''
+          this.detailsData = res.data
+        } else {
+          this.detailsData = null
+        }
+      })
+    },
+    //  物流信息  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          giftCardEdit(_this.formData).then(res => {
+            if (res.status == 200) {
+              _this.isShow = false
+              this.$emit('refresh')
+            }
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        const _this = this
+        setTimeout(() => {
+          _this.$refs.ruleForm.resetFields()
+        }, 100)
+      }
+    },
+    cardId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetails()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .edit-card-modal{
+    .creater{
+      display: inline-block;
+      margin: 0;
+      margin-right: 15px;
+    }
+    .telephone{
+      display: inline-block;
+      margin: 0;
+    }
+  }
+</style>

+ 121 - 0
src/views/market/giftCard/getCodeModal.vue

@@ -0,0 +1,121 @@
+<template>
+  <a-modal
+    centered
+    class="getcode-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="获取充值码"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="600">
+    <div v-if="detailsData">
+      <a-row :gutter="35">
+        <a-col :span="24" class="item-cont">
+          <p class="item-label">创建时间:</p>
+          <p class="item-main">{{ detailsData.createDate }}</p>
+        </a-col>
+        <a-col :span="24" class="item-cont">
+          <p class="item-label">创建人:</p>
+          <p class="item-main">{{ detailsData.name }}  {{ detailsData.phone }}</p>
+        </a-col>
+        <a-col :span="24" class="item-cont">
+          <p class="item-label">礼品卡内容:</p>
+          <p class="item-main">{{ detailsData.content }}</p>
+        </a-col>
+        <a-col :span="24" class="item-cont">
+          <p class="item-label">充值码:</p>
+          <div class="item-main">
+            <span style="margin-right: 15px;">{{ detailsData.sequence }}</span>
+            <a-button id="gift-card-copy" size="small" v-clipboard:copy="detailsData.sequence" v-clipboard:success="onCopy">复制</a-button>
+          </div>
+        </a-col>
+      </a-row>
+    </div>
+    <div class="btn-cont"><a-button id="network-detail-modal-back" @click="isShow=false">返回列表</a-button></div>
+  </a-modal>
+</template>
+
+<script>
+import { giftCardDetail } from '@/api/giftCard'
+export default {
+  name: 'GetCodeModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    cardId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      detailsData: null //  详情
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetails () {
+      giftCardDetail({ id: this.cardId }).then(res => {
+        if (res.status == 200) {
+          this.detailsData = res.data
+        } else {
+          this.detailsData = null
+        }
+      })
+    },
+    //  复制
+    onCopy () {
+      this.$message.success('复制成功')
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    },
+    cardId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetails()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .getcode-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;
+        }
+      }
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 295 - 0
src/views/market/giftCard/giftCard.vue

@@ -0,0 +1,295 @@
+<template>
+  <a-card :bordered="false" class="gift-card-wrap">
+    <!-- 搜索框 -->
+    <div class="gift-card-search">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="20">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="创建时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="gift-card-time"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="礼品卡内容" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input-number
+                id="gift-card-goldNum"
+                v-model="searchData.goldNum"
+                :min="1"
+                :max="999999"
+                :precision="0"
+                style="width: 70%;margin-right: 5px;"
+                placeholder="请输入礼品卡内容(1~999999)"
+                allowClear /><span>乐豆</span>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="实体卡编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear v-model="searchData.optionalSequence" :maxLength="30" placeholder="请输入实体卡编号" id="gift-card-optionalSequence" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="是否已充值" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                ref="booleanState"
+                code="BOOLEAN_STATE"
+                v-model="searchData.state"
+                allowClear
+                placeholder="请选择"
+                id="gift-card-enable-state"></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="充值时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="gift-card-rechargeTime"
+                v-model="rechargeTime"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onRechargeChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="充值用户" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear v-model="searchData.customPhone" :maxLength="30" placeholder="请输入充值用户" id="gift-card-customPhone" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="充值码" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear v-model="searchData.sequence" :maxLength="30" placeholder="请输入充值码" id="gift-card-sequence" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button class="handle-btn serach-btn" type="primary" @click="$refs.table.refresh(true)" id="gift-card-refresh" :disabled="disabled">查询</a-button>
+            <a-button class="handle-btn" @click="resetForm" id="gift-card-resetForm" :disabled="disabled">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="add">
+      <a-button
+        type="primary"
+        icon="plus"
+        class="addBtn"
+        @click="handleAdd"
+        id="gift-card-add"
+        :disabled="disabled"
+        v-if="$hasPermissions('B_giftCard_add')">新增礼品卡</a-button>
+    </div>
+    <!-- table列表 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 创建人 -->
+      <span slot="creater" slot-scope="text, record">{{ record.name + record.phone }}</span>
+      <!-- 操作按钮 -->
+      <span slot="action" slot-scope="text, record">
+        <a-button id="gift-card-getCode" class="blue" type="link" v-if="$hasPermissions('B_giftCard_getCode')" @click="getCode(record)">获取充值码</a-button>
+        <a-button id="gift-card-handleEdit" class="green" type="link" v-if="$hasPermissions('B_giftCard_edit')" @click="handleEdit(record)">编辑</a-button>
+        <a-button
+          v-if="record.state==0&&$hasPermissions('B_giftCard_del')"
+          id="gift-card-handleDel"
+          class="red"
+          type="link"
+          @click="handleDel(record)">删除</a-button>
+      </span>
+    </s-table>
+    <!-- 新增礼品卡 -->
+    <add-card-modal :openModal="openAddCardModal" @close="closeModal" @refresh="refreshFun" />
+    <!-- 编辑礼品卡 -->
+    <edit-card-modal :openModal="openEditCardModal" :cardId="cardId" @refresh="refreshFun" @close="closeModal" />
+    <!-- 获取充值码 -->
+    <get-code-modal :openModal="openGetCodeModal" :cardId="cardId" @close="closeModal" />
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import AddCardModal from './addCardModal.vue'
+import EditCardModal from './editCardModal.vue'
+import GetCodeModal from './getCodeModal.vue'
+import { giftCardQuery, giftCardDel } from '@/api/giftCard.js'
+
+export default {
+  components: { STable, VSelect, GetCodeModal, AddCardModal, EditCardModal },
+  data () {
+    return {
+      disabled: true, //  页面初始化之前是否可操作
+      formItemLayout: {
+        labelCol: { span: 9 },
+        wrapperCol: { span: 15 }
+      },
+      searchData: {
+        startTime: null, //  创建时间  开始
+        endTime: null, //  创建时间  结束
+        goldNum: null, //  礼品卡内容
+        optionalSequence: null, //  实体卡编号
+        state: undefined, //  是否已充值
+        useTimeStart: null, //  充值时间  开始
+        useTimeEnd: null, //  充值时间  结束
+        customPhone: null, //  充值用户
+        sequence: null //  充值码
+      },
+      showEditModal: false, // 默认关闭弹窗
+      itemId: null, // 编辑行id
+      time: [], //  创建时间
+      rechargeTime: [], //  充值时间
+      dateFormat: 'YYYY-MM-DD',
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 100, align: 'center' },
+        { title: '创建人', scopedSlots: { customRender: 'creater' }, width: 100, align: 'center' },
+        { title: '礼品卡内容', dataIndex: 'content', width: 100, align: 'center' },
+        { title: '实体卡编号', dataIndex: 'optionalSequence', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '是否已充值', dataIndex: 'stateDictValue', width: 100, align: 'center' },
+        { title: '充值时间', dataIndex: 'useTime', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '充值用户', dataIndex: 'customPhone', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '备注', dataIndex: 'remarks', width: 100, align: 'center', ellipsis: true, customRender: (text) => { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, align: 'center', width: 100 }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return giftCardQuery(Object.assign(parameter, this.searchData)).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+          if (res.status == 200) {
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            this.disabled = false
+            return res.data
+          }
+        })
+      },
+      cardId: null, //  卡id
+      openGetCodeModal: false, //  获取充值码  弹框状态
+      openAddCardModal: false, //  新增礼品卡  弹框状态
+      openEditCardModal: false //  编辑礼品卡  弹框状态
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.searchData.startTime = dateStrings[0] || null
+        this.searchData.endTime = dateStrings[1] || null
+      }
+    },
+    // 充值时间change
+    onRechargeChange (dates, dateStrings) {
+      if (dates, dateStrings) {
+        this.searchData.useTimeStart = dateStrings[0] || null
+        this.searchData.useTimeEnd = dateStrings[1] || null
+      }
+    },
+    //  获取充值码
+    getCode (record) {
+      this.cardId = record.id
+      this.openGetCodeModal = true
+    },
+    // 新增
+    handleAdd () {
+      this.cardId = null
+      this.openAddCardModal = true
+    },
+    // 编辑
+    handleEdit (record) {
+      this.cardId = record.id
+      this.openEditCardModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.cardId = null
+      this.openAddCardModal = false
+      this.openEditCardModal = false
+      this.openGetCodeModal = false
+    },
+    //  刷新数据
+    refreshFun (state) {
+      //  新增需刷新第一页数据。编辑为当前页数据
+      this.$refs.table.refresh(state)
+    },
+    // 删除
+    handleDel (record) {
+      this.$confirm({
+        title: '警告',
+        centered: true,
+        content: '删除后无法恢复,确认删除?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk: () => {
+          giftCardDel({ id: record.id }).then(res => {
+            if (res.status == 200) {
+              this.$message.success(res.message)
+              this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    // 重置
+    resetForm () {
+      this.time = []
+      this.rechargeTime = []
+      this.searchData.startTime = null
+      this.searchData.endTime = null
+      this.searchData.goldNum = null
+      this.searchData.optionalSequence = null
+      this.searchData.state = null
+      this.searchData.useTimeStart = null
+      this.searchData.useTimeEnd = null
+      this.searchData.customPhone = null
+      this.searchData.sequence = null
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+	.gift-card-wrap{
+		.gift-card-search{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+        margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+		}
+		.addBtn {
+			margin-bottom: 20px;
+		}
+    .blue {
+    	color: #1890fe;
+    }
+    .green {
+    	color: #16b50e;
+    }
+    .red {
+    	color: red;
+    }
+	}
+
+</style>

+ 1 - 0
src/views/releaseRecord/releaseRecordList.vue

@@ -271,6 +271,7 @@ export default {
       // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
       if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
         this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
+        return
       }
       this.loading = true
       exportDeliveryLog(params).then(res => {

+ 13 - 7
src/views/reportForm/rubbishDeliverySearchTime.vue

@@ -96,7 +96,7 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
-        { title: '投递时间', dataIndex: 'putInDate', width: 100, align: 'center' },
+        { title: '投递时间', dataIndex: 'putInDate', width: 100, align: 'center', customRender: (text) => { return text + '时' } },
         { title: '可回收垃圾投递量(kg)',
           children: [
             { title: '废旧衣物', width: 100, align: 'center', dataIndex: 'clothesWeight', customRender: (text) => { return text || 0 } },
@@ -114,9 +114,12 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
+        if (searchData.stationNo) {
+          searchData.name = this.optionData.find(item => item.stationNo == searchData.stationNo).name || ''
+        }
         if (this.time && this.time.length) {
-          searchData.beginDate = moment(this.time[0])
-          searchData.endDate = moment(this.time[1])
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD HH:00:00')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:00:00')
         } else {
           searchData.beginDate = ''
           searchData.endDate = ''
@@ -169,12 +172,15 @@ export default {
     handleExport () {
       const params = this.queryParam
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0])
-        params.endDate = moment(this.time[1])
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD HH:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:00:00')
       } else {
         params.beginDate = ''
         params.endDate = ''
       }
+	  if (params.stationNo) {
+	    params.name = this.optionData.find(item => item.stationNo == params.stationNo).name || ''
+	  }
       if (!params.beginDate && !params.endDate) {
         this.$message.error('请先选择需要导出的投放时间区间再进行导出!')
         return
@@ -233,8 +239,8 @@ export default {
         stationNo: this.queryParam.stationNo // 网点名称
       }
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0])
-        params.endDate = moment(this.time[1])
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD HH:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:00:00')
       } else {
         params.beginDate = ''
         params.endDate = ''

+ 27 - 9
src/views/reportForm/rubbishDeliveryTotal.vue

@@ -31,7 +31,7 @@
           </a-col>
           <a-col :span="5">
             <a-form-model-item prop="districtCode" label=" " :colon="false" :label-col="{ span:0 }" :wrapper-col="{ span:20}">
-              <a-select allowClear id="rubbishTotal-districtCode" v-model="queryParam.districtCode" placeholder="请选择区/县">
+              <a-select allowClear id="rubbishTotal-districtCode" v-model="queryParam.districtCode" @change="getDistrictCode" 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>
@@ -47,6 +47,7 @@
                 v-model="queryParam.stationNo"
                 :showSearch="true"
                 option-filter-prop="children"
+                @change="stationNoChange"
                 :filter-option="filterOption">
                 <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
               </a-select>
@@ -123,10 +124,14 @@ export default {
       queryParam: {
         beginDate: null, // 开始时间
         endDate: null, // 结束时间
-        stationNo: undefined, // 网点名称
+        stationNo: undefined, // 网点no
+        name: '', // 网点名称
         provinceCode: undefined, //  省
+        provinceName: '',
         cityCode: undefined, // 市
-        districtCode: undefined // 区
+        cityName: '', // 市名称
+        districtCode: undefined, // 区
+        districtName: '' // 区名称
       },
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
@@ -232,8 +237,8 @@ export default {
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
         if (this.time && this.time.length) {
-          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 00:00:00')
         } else {
           searchData.beginDate = ''
           searchData.endDate = ''
@@ -297,8 +302,11 @@ export default {
     getCityList (val) {
       this.addrCityList = []
       this.addrDistrictList = []
+	  this.queryParam.provinceName = val ? this.addrProvinceList.find(item => item.code == this.queryParam.provinceCode).name : ''
       this.queryParam.cityCode = undefined
+      this.queryParam.cityName = ''
       this.queryParam.districtCode = undefined
+      this.queryParam.districtName = ''
       this.getCityListRequest(val)
     },
     getCityListRequest (val) {
@@ -315,7 +323,9 @@ export default {
     // 获取区县列表
     getAreaList (val) {
       this.addrDistrictList = []
+	  this.queryParam.cityName = val ? this.addrCityList.find(item => item.code == this.queryParam.cityCode).name : ''
       this.queryParam.districtCode = undefined
+	  this.queryParam.districtName = ''
       this.getAreaListRequest(val)
     },
     getAreaListRequest (val) {
@@ -329,12 +339,20 @@ export default {
         }
       })
     },
+    // 选择区
+    getDistrictCode (val) {
+      this.queryParam.districtName = val ? this.addrDistrictList.find(item => item.code == this.queryParam.districtCode).name : ''
+    },
+    // 选择网点
+    stationNoChange (val) {
+      this.queryParam.name = val ? this.optionData.find(item => item.stationNo == val).name : ''
+    },
     // 导出
     handleExport () {
       const params = this.queryParam
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 00:00:00')
       } else {
         params.beginDate = ''
         params.endDate = ''
@@ -396,8 +414,8 @@ export default {
     getListTotal () {
       const params = this.queryParam
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 00:00:00')
       } else {
         params.beginDate = ''
         params.endDate = ''

+ 1 - 0
src/views/shop/shopOrder.vue

@@ -181,6 +181,7 @@ export default {
       // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
       if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
         this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
+		return
       }
       this.loading = true
       orderExport(params).then(res => {

+ 29 - 26
src/views/userInfo/userManageList.vue

@@ -1,10 +1,10 @@
 <template>
   <a-card :bordered="false" class="userManageList-table-page-search-wrapper">
     <div class="userManageList-searchForm">
-      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="refresh">
+      <a-form-model :model="queryParam" ref="queryForm" layout="inline" v-bind="formItemLayout" @keyup.enter.native="refresh">
         <a-row :gutter="20">
           <a-col :span="6">
-            <a-form-item label="注册时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+            <a-form-model-item label="注册时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-range-picker
                 id="network-time"
                 v-model="registerTime"
@@ -12,10 +12,10 @@
                 :placeholder="['开始时间','结束时间']"
                 :disabledDate="disabledDate"
                 @change="onChangeregisterTime" />
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-item label="最后投递时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+            <a-form-model-item label="最后投递时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-range-picker
                 id="network-time"
                 v-model="lastDeliverTime"
@@ -23,42 +23,49 @@
                 :placeholder="['开始时间','结束时间']"
                 :disabledDate="disabledDate"
                 @change="onChangelastDeliverTime" />
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
-          <a-col :span="6">
-            <a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-col :span="5">
+            <a-form-model-item prop="mobile" label="用户手机" :label-col="{span:8}" :wrapper-col="{span:16}">
               <a-input id="releaseRecordList-mobile" allowClear :maxLength="11" v-model="queryParam.mobile" placeholder="请输入用户手机" />
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
-          <a-col :span="6">
-            <a-form-item label="乐豆余额" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-col :span="4">
+            <a-form-model-item label="乐豆余额" prop="currentGoldMin" :label-col="{span:10}" :wrapper-col="{span:14}">
               <div class="input-number">
-                <a-input-number id="releaseRecordList-inputNumber" v-model="queryParam.currentGoldMin" :max="999999999" />-
-                <a-input-number id="inputNumber" v-model="queryParam.currentGoldMax" :max="999999999" />
+                <a-input-number id="releaseRecordList-inputNumber" v-model="queryParam.currentGoldMin" :max="999999999" />
+				<span style="margin-left: 22%;">-</span>
               </div>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
+		  <a-col :span="2">
+			  <a-form-model-item label=" " prop="currentGoldMax" :colon="false" :label-col="{span:1}" :wrapper-col="{span:23}">
+			    <div class="input-number">
+			      <a-input-number id="inputNumber" v-model="queryParam.currentGoldMax" :max="999999999" />
+			    </div>
+			  </a-form-model-item>
+		  </a-col>
         </a-row>
         <a-row :gutter="20">
           <a-col :span="6">
-            <a-form-item label="账户状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+            <a-form-model-item label="账户状态" prop="state" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <v-select
                 v-model="queryParam.state"
                 id="releaseRecordList-state"
                 code="ENABLE_FLAG"
                 placeholder="请选择账户状态"
                 allowClear></v-select>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-item label="用户身份" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+            <a-form-model-item prop="customerRole" label="用户身份" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <v-select
                 v-model="queryParam.customerRole"
                 id="releaseRecordList-customerRole"
                 code="CUSTOMER_ROLE"
                 placeholder="请选择用户身份"
                 allowClear></v-select>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :span="6">
             <a-button class="handle-btn serach-btn" id="releaseRecordList-btn-serach" type="primary" @click="refresh">查询</a-button>
@@ -72,7 +79,7 @@
           </a-col>
         </a-row>
 
-      </a-form>
+      </a-form-model>
     </div>
     <s-table
       ref="table"
@@ -261,7 +268,7 @@ export default {
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      vm.queryParam = {}
+	  vm.$refs.queryForm.resetFields()
 	  vm.registerTime = []
 	  vm.lastDeliverTime = []
     })
@@ -286,10 +293,10 @@ export default {
       }
     },
     refresh () {
-      const isONull = this.queryParam.currentGoldMin === null
+      const isONull = this.queryParam.currentGoldMin === null || this.queryParam.currentGoldMin === undefined
       const isOEmpty = this.queryParam.currentGoldMin === ''
       const isOZero = this.queryParam.currentGoldMin === 0
-      const isTNull = this.queryParam.currentGoldMax === null
+      const isTNull = this.queryParam.currentGoldMax === null || this.queryParam.currentGoldMax === undefined
       const isTEmpty = this.queryParam.currentGoldMax === ''
       const isTZero = this.queryParam.currentGoldMax === 0
       //  第一个为空(可为null可为空字符)第二个不为空
@@ -345,11 +352,7 @@ export default {
     },
     // 重置
     handleReset () {
-      this.queryParam.mobile = '' //  用户手机
-      this.queryParam.currentGoldMin = '' // 乐豆余额最小值
-      this.queryParam.currentGoldMax = '' // 乐豆余额最大值
-      this.queryParam.state = '' // 账户状态
-      this.queryParam.customerRole = '' // 用户身份
+	  this.$refs.queryForm.resetFields()
       this.queryParam.beginDate = null // 最后投递时间的开始时间
       this.queryParam.endDate = null // 最后投递时间的结束时间
       this.queryParam.beginRegisterTime = null //  注册时间最小值